char_expression_to_function: Make a function from a character string representing an R...

View source: R/eval.R

char_expression_to_functionR Documentation

Make a function from a character string representing an R expression

Description

Make a function from a character string representing an R expression

Usage

char_expression_to_function(expr)

Arguments

expr

A string representing an R expression e.g. x + y

Value

A function with 2 formal arguments (x, y) which will calculate the value of the given expression at this location

Examples

## Not run: 
f <- char_expression_to_function("x + y")
f(1, 2)

## End(Not run)

ropenscilabs/bnf documentation built on May 15, 2022, 2:20 a.m.