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.

eval_coding(expr)

Arguments

expr

An expression

Value

An evaluated `coding` object

Examples

eval_coding('coding(code("Yes", 1), code("No", 0))')
#> [1] "coding(code(\"Yes\", 1), code(\"No\", 0))"