Skip to contents

[Stable]

Function is a wrapper around teal_data() and guesses join_keys for given datasets whose names match ADAM datasets names.

Usage

cdisc_data(
  ...,
  join_keys = teal.data::default_cdisc_join_keys[names(rlang::list2(...))],
  code = character(0),
  check = FALSE
)

Arguments

...

any number of objects (presumably data objects) provided as name = value pairs.

join_keys

(join_keys) object or a single (join_key_set) object

(optional) object with datasets column names used for joining. If empty then it would be automatically derived basing on intersection of datasets primary keys. For ADAM datasets it would be automatically derived.

code

(character, language) optional code to reproduce the datasets provided in .... Note this code is not executed and the teal_data may not be reproducible

check

(logical) reproducibility check - whether to perform a check that the pre-processing code included in the object definitions actually produces those objects. If check is true and preprocessing code is empty an error will be thrown.

Value

A teal_data object.

Details

This function checks if there were keys added to all data sets.

Examples

data <- cdisc_data(
  join_keys = join_keys(
    join_key("ADSL", "ADTTE", c("STUDYID" = "STUDYID", "USUBJID" = "USUBJID"))
  )
)

data <- within(data, {
  ADSL <- example_cdisc_data("ADSL")
  ADTTE <- example_cdisc_data("ADTTE")
})