Description Usage Arguments Details Author(s) Examples
Provides a consistent interface for adding a derivation.
1 | derivation.add(derivations, targets, types, deps, data, fun, aept.list, verbose = TRUE)
|
derivations |
A data frame of derivation rules |
targets |
Names of derived variables, whitespace delimited |
types |
Types of derived variables, in sense of |
deps |
Names of dependency data frames, whitespace delimited |
data |
Parseable text of code to extract data |
fun |
Parseable text of code to derive variables |
aept.list |
Not used, for guessing derivation rules |
verbose |
Whether to print progress messages |
Read the code or see the examples.
Toby Johnson Toby.x.Johnson@gsk.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
clindata <- derivation.add("path/to/clinical/export/")
data(derivations.standard)
derivations.custom <-
derivation.add(derivations.standard,
targets = 'vsanal.SBP.mean4wk',
types = 'double',
deps = 'vitals',
data = 'subset(vsanal, VSTEST == "Systolic BP~(mmHg)" &
ATTYPE == "On-therapy" &
VSACTDY >= 1 & VSACTDY <= 35)',
fun = 'safe(mean, VSSTRESN)')
gxvars <- clinical.derive(clindata, derivations.custom)
summary(gxvars)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.