Add a derived variable with its definition
Usage
derive_studyframe(x, variable, values, inputs, description)
Arguments
- x
A studyframe.
- variable
A variable_spec for a new variable.
- values
Values in current row order, exactly one per row.
- inputs
Stable identifiers of input variables.
- description
Human-readable derivation; arbitrary code is not evaluated.
Value
A studyframe. Roster rows outside the current view receive NA for the new
measurement. Existing measurements and collection facts cannot be overwritten.