Apply label and variable ordering attributes to domains

apply_metadata(
  df,
  filename,
  add_adsl = TRUE,
  adsl_filename = "metadata/ADSL.yml"
)

Arguments

df

data frame to which metadata are applied.

filename

yaml file containing domain metadata.

add_adsl

logical to control merging of ADSL data to domain

adsl_filename

yaml file containing ADSL metadata.

Examples

seed <- 1
ADSL <- suppressWarnings(radsl(seed = seed))
ADLB <- radlb(ADSL, seed = seed)
if (FALSE) {
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)
ADLB <- random.cdisc.data:::apply_metadata(
  ADLB, file.path(yaml_path, "ADLB.yml"), TRUE,
  file.path(yaml_path, "ADSL.yml")
)
}