recode_directly: recode directly to a value

Description Usage Arguments Details

Description

recode directly to a value

Usage

1
recode_directly(.data, to_expression, questionnaire = NULL, ...)

Arguments

.data

an ongoing recoding (see new_recoding())

to_expression

R code as a character string; evaluated in the namespace of the input data, and result will be the 'to' value; will overwrite everything that is not NA here

questionnaire

if you supply a questionnaire, you will be able to use 'is_skipped()' in the expression.

Details

the expression is evaluated _on each row individually_. in that world, each variable corresponds to an _individual value_. This allows you to do for example max(var1, var2) - this will return the larger value between var1 and var2 of _each record_.


mabafaba/composr documentation built on June 10, 2019, 8:17 a.m.