is_artoo_spec: Test for a artoo_spec object

View source: R/spec_construct.R

is_artoo_specR Documentation

Test for a artoo_spec object

Description

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.

Usage

is_artoo_spec(x)

Arguments

x

Object to test. ⁠<any>⁠.

Value

A ⁠<logical(1)>⁠: TRUE when x is a artoo_spec, else FALSE.

See Also

artoo_spec() to build one; is_artoo_meta() for the metadata guard.

Examples

# ---- 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)


artoo documentation built on July 23, 2026, 1:08 a.m.