eval.js: A JAVASCRIPT-LIKE EVAL FUNCTION

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

This function evaluates expressions.

Usage

1
2
3
eval.js(expr,
        envir=parent.frame(),
        enclos=if(is.list(envir)||is.pairlist(envir)) parent.frame())

Arguments

expr

character string of an expression to evaluate

envir

passed to eval function. see eval

enclos

passed to eval function. see eval

Details

Wrapper to the eval functions from the R base package. Evaluates character expression.

Value

will return the evaluated expression

Note

uses function eval from base package

Author(s)

James Java

References

R base package function eval

See Also

eval

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
df = list()
df$a = rep(1,5)
df$b = rep("one",5)
df = as.data.frame(df)

#for comparison view
df

eval.js("df$new = NA")
df

 

lshep/sendplot documentation built on May 29, 2019, 3:42 a.m.