eval.js {sendplot} | R Documentation

## 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

### 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

    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

[Package sendplot version 0.2.0 Index]