Learn R Programming

sendplot (version 4.0.0)

eval.js: A JAVASCRIPT-LIKE EVAL FUNCTION

Description

This function evaluates expressions.

Usage

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

Value

  • will return the evaluated expression

Details

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

References

R base package function eval

See Also

eval

Examples

Run this code
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

Run the code above in your browser using DataLab