TDA's recode: replaces variable values by expressions over
the current matrix. Verified in the suite against plain R
recoding.
Usage
tda_recode(data, ..., options = list())Examples
d <- data.frame(age = c(17, 25, 40), inc = c(1, 2, 3))
# TDA's expression language: ge() is >=, so age becomes an adult flag
tda_recode(d, age = "ge(age, 18)", inc = "inc * 1000")
#> age inc
#> 1 0 1000
#> 2 1 2000
#> 3 1 3000