sdtm_hardcode | R Documentation |
sdtm_hardcode()
is an internal function packing the same functionality as
hardcode_no_ct()
and hardcode_ct()
together but aimed at developers only.
As a user please use either hardcode_no_ct()
or hardcode_ct()
.
sdtm_hardcode(
tgt_dat = NULL,
tgt_var,
raw_dat,
raw_var,
tgt_val,
ct_spec = NULL,
ct_clst = NULL,
id_vars = oak_id_vars()
)
tgt_dat |
Target dataset: a data frame to be merged against |
tgt_var |
The target SDTM variable: a single string indicating the name of variable to be derived. |
raw_dat |
The raw dataset (dataframe); must include the
variables passed in |
raw_var |
The raw variable: a single string indicating the name of the
raw variable in |
tgt_val |
The target SDTM value to be hardcoded into the variable
indicated in |
ct_spec |
Study controlled terminology specification: a dataframe with a
minimal set of columns, see |
ct_clst |
A codelist code indicating which subset of the controlled
terminology to apply in the derivation. This parameter is optional, if left
as |
id_vars |
Key variables to be used in the join between the raw dataset
( |
The returned data set depends on the value of tgt_dat
:
If no target dataset is supplied, meaning that tgt_dat
defaults to
NULL
, then the returned data set is raw_dat
, selected for the variables
indicated in id_vars
, and a new extra column: the derived variable, as
indicated in tgt_var
.
If the target dataset is provided, then it is merged with the raw data set
raw_dat
by the variables indicated in id_vars
, with a new column: the
derived variable, as indicated in tgt_var
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.