eval_coding: Evaluates a coding expression in a safe environment

View source: R/coding.R

eval_codingR Documentation

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)

Arguments

expr

An expression

Value

An evaluated 'coding' object

Examples

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

rcoder documentation built on Oct. 6, 2023, 9:06 a.m.