Apply Metadata
apply_metadata.Rd
Apply label and variable ordering attributes to domains.
Arguments
- df
(
data.frame
)
Data frame to which metadata is applied.- filename
(
yaml
)
File containing domain metadata.- add_adsl
(
logical
)
Should ADSL data be merged to domain.- adsl_filename
(
yaml
)
File containing ADSL metadata.
Examples
seed <- 1
adsl <- radsl(seed = seed)
adsub <- radsub(adsl, seed = seed)
yaml_path <- file.path(path.package("random.cdisc.data"), "inst", "metadata")
adsl <- random.cdisc.data:::apply_metadata(adsl, file.path(yaml_path, "ADSL.yml"), FALSE)
adsub <- random.cdisc.data:::apply_metadata(
adsub, file.path(yaml_path, "ADSUB.yml"), TRUE,
file.path(yaml_path, "ADSL.yml")
)