| artoo_checks | R Documentation |
Build a reusable control that selects which dimensions check_spec()
evaluates. Construct one per study and thread it through every
check_spec() call so the conformance surface is consistent. Each toggle is validated at construction, so a
mistyped name or value aborts early rather than being silently ignored.
artoo_checks(
missing_variable = TRUE,
missing_permissible = TRUE,
extra_variable = TRUE,
type_mismatch = TRUE,
invalid_encoding = TRUE,
length_overflow = TRUE,
char_length_limit = TRUE,
codelist_membership = TRUE,
codelist_membership_extensible = TRUE,
label_match = TRUE,
key_uniqueness = TRUE,
display_format = TRUE,
variable_name = TRUE,
dataset_name = TRUE,
label_length = TRUE,
integer_overflow = TRUE,
integer_fraction = TRUE,
iso8601_format = TRUE
)
missing_variable |
Flag mandatory spec variables absent from the
data. |
missing_permissible |
Flag permissible (non-mandatory) spec variables
absent from the data. |
extra_variable |
Flag data columns the spec does not declare.
|
type_mismatch |
Flag columns whose storage differs from the spec
dataType. |
invalid_encoding |
Flag character values whose bytes are not valid
UTF-8. |
length_overflow |
Flag character values longer than the spec length.
|
char_length_limit |
Flag character values longer than the SAS XPORT
v5 / FDA 200-byte limit. |
codelist_membership |
Flag values outside their closed codelist.
|
codelist_membership_extensible |
Flag values outside an extensible
codelist's enumerated terms. |
label_match |
Flag a column whose label attribute differs from the
spec label. |
key_uniqueness |
Flag a dataset whose spec key variables do not
uniquely identify its rows. |
display_format |
Flag a date/datetime/time variable whose
displayFormat is not a recognized SAS format of that family.
|
variable_name |
Flag a data column name that violates the XPORT
naming rules. |
dataset_name |
Flag a dataset name that violates the XPORT naming
rules. |
label_length |
Flag a column label attribute over the 40-byte XPORT
v5 / FDA limit. |
integer_overflow |
Flag an integer-typed variable holding values
beyond R's 32-bit integer range. |
integer_fraction |
Flag an integer-typed variable holding fractional
values. |
iso8601_format |
Flag a character date/datetime/time variable whose
values are not valid ISO 8601 text. |
Selection, not severity. This control decides which findings are
produced; apply_spec()'s conformance argument (warn, abort, off)
decides what to do with the findings its full-default check raises. A
disabled dimension is skipped entirely, so the findings frame stays
clean.
A <artoo_checks> control object. Pass it as the checks
argument to check_spec().
check_spec(), which consumes it; apply_spec() for the
findings disposition.
# ---- Example 1: the default runs every conformance dimension ----
#
# With no arguments, every conformance dimension is enabled.
artoo_checks()
# ---- Example 2: silence one dimension for a whole study ----
#
# Turn off the length check (e.g. while a spec's lengths are provisional)
# and reuse the control across every dataset.
spec <- artoo_spec(cdisc_sdtm_datasets, cdisc_sdtm_variables, codelists = cdisc_codelists)
ck <- artoo_checks(length_overflow = FALSE)
nrow(check_spec(cdisc_dm, spec, "DM", checks = ck))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.