addVariable-set: Add a variable to a dpp object

Description Usage Arguments

Description

All purpose function to add a variable, more precisely instructions (a function) which creates the variable (can use one or all of the regis data)

Usage

1
2
3
addVariable(x, target, data, type = c("merge", "join", "rbind"),
  depends = NULL, priority = c("late", "early"), by = NULL,
  ...) <- value

Arguments

x

dpp object

target

Character. The name of a baseline date or "fup" for the followup dataset. Where to store the result.

data

Optional the name of the data table in which to evaluate value.

type

Character that determines how to add the variable to the data set. One of "merge", "join" or "rbind"

depends

vector of names of other instructions (inclusion, exclusion, variables) that should be evaluated before this one.

priority

Processing priority. Maybe changed by depends.

by

Character vector. Specifying subsets in which value is evaluated. E.g., if set to "pnr" then value is applied to the data of each subject separately.

...

not (yet) used

value

A function obtained with the all-purpose function selector or one of the specialized functions. See dpp.


tagteam/heaven documentation built on Feb. 16, 2019, 8:21 p.m.