Tutorial by Topics: lua



In JavaScript, the eval function evaluates a string as if it were JavaScript code. The return value is the result of the evaluated string, e.g. eval('2 + 2') returns 4.

eval is available in the global scope. The lexical scope of the evaluation is the local scope unless invoked indirectly (e.g. var geval = eval; geval(s);).

The use of eval is strongly discouraged. See the Remarks section for details.

Redis provides a couple of mechanisms for extending the functionality of the database. One mechanism is through the use of server-side LUA scripts that can be executed to manipulate data. Lua scripts can be useful to perform expensive operations or to implement atomic operations that require logic.

Dplyr and many modern libraries in R use non-standard evaluation (NSE) for interactive programming and standard evaluation (SE) for programming1.

For instance, the summarise() function use non-standard evaluation but relies on the summarise_() which uses standard evaluation.

The lazyeval library makes it easy to turn standard evaluation function into NSE functions.


Page 1 of 1