| is_artoo_meta | R Documentation |
Report whether an object is a artoo_meta — the CDISC-shaped metadata a
conformed dataset carries through the artoo workflow (spec -> apply_spec ->
read_/write_). get_meta() returns one; this is the type guard before you
inspect its @dataset and @columns slots.
is_artoo_meta(x)
x |
Object to test. |
A <logical(1)>: TRUE when x is a artoo_meta, else FALSE.
get_meta() and set_meta() to read and attach metadata.
# ---- Example 1: guard before inspecting metadata ----
#
# get_meta() yields a artoo_meta; is_artoo_meta() confirms the type before
# you reach into its slots.
spec <- artoo_spec(cdisc_adam_datasets, cdisc_adam_variables, codelists = cdisc_codelists)
adsl <- apply_spec(cdisc_adsl, spec, "ADSL")
meta <- get_meta(adsl)
is_artoo_meta(meta)
# ---- Example 2: a bare data frame carries no meta object ----
#
# The raw frame itself is not a artoo_meta — only the object get_meta()
# returns is.
is_artoo_meta(cdisc_adsl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.