Skip to contents

List the datasets a specification defines. The result is the set of names you pass as the dataset argument to the other accessors and to apply_spec().

Usage

spec_datasets(spec)

Arguments

spec

The specification to read. <artoo_spec>: required.

Value

A character vector of dataset names, de-duplicated and with NAs dropped. Empty when the spec has no datasets.

See also

spec_variables() for one dataset's variables; spec_keys() for its sort keys.

Examples

# ---- Example 1: the datasets the pilot ADaM spec defines ----
#
# Build the spec from the bundled CDISC-pilot tables and list its
# datasets — the names you pass to the other accessors.
spec <- artoo_spec(
  cdisc_adam_datasets, cdisc_adam_variables,
  codelists = cdisc_codelists
)
spec_datasets(spec)
#> [1] "ADSL"