Learn R Programming

rcoder (version 0.3.0)

eval_coding: Evaluates a coding expression in a safe environment

Description

To prevent requiring attaching the `rcoder` package, this function takes in an unevaluated expression -- assumed to be a `coding()` call -- and evaluates the expression with _only_ `coding` and `code` provided to guard against rogue code.

Usage

eval_coding(expr)

Value

An evaluated `coding` object

Arguments

expr

An expression

Examples

Run this code
eval_coding('coding(code("Yes", 1), code("No", 0))')

Run the code above in your browser using DataLab