View source: R/spec_construct.R
| is_artoo_spec | R Documentation |
Report whether an object is a artoo_spec — the validated CDISC
specification that drives the artoo workflow (spec -> apply_spec ->
read_/write_). artoo_spec() builds one; this is the type guard before you
pass it to apply_spec() or reach into it with the spec accessors.
is_artoo_spec(x)
x |
Object to test. |
A <logical(1)>: TRUE when x is a artoo_spec, else FALSE.
artoo_spec() to build one; is_artoo_meta() for the metadata
guard.
# ---- Example 1: guard a built specification ----
#
# artoo_spec() assembles and validates a spec; is_artoo_spec() confirms the
# type before you drive apply_spec() with it.
spec <- artoo_spec(cdisc_sdtm_datasets, cdisc_sdtm_variables, codelists = cdisc_codelists)
is_artoo_spec(spec)
# ---- Example 2: an ordinary object is not a spec ----
#
# Any non-artoo_spec value — a bare data frame, say — returns FALSE.
is_artoo_spec(cdisc_dm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.