Skip to contents

Specs

Build a artoo_spec — the canonical CDISC-shaped description of your datasets, one CDISC standard each — or read one from native JSON, a Pinnacle 21 workbook, or Define-XML, and write it back out. Amend it in R when the data disagrees, then read any slot back with the spec_* accessors.

artoo_spec()
Construct a CDISC specification
read_spec()
Read a specification from JSON, Excel, or Define-XML
write_spec()
Write a specification to native JSON or a P21 Excel workbook
set_type()
Override a variable's dataType in a spec
repair_spec()
Repair a spec from its conformance findings
is_artoo_spec()
Test for a artoo_spec object
spec_standard()
The CDISC standard a spec implements
spec_study()
Study-level metadata
spec_datasets()
Dataset names in a spec
spec_variables()
Variables in a spec
spec_codelists()
Codelist terms
spec_keys()
Sort keys for a dataset
spec_methods()
Derivation methods in a spec
spec_comments()
Comment definitions in a spec
spec_documents()
Document references in a spec

Conform & validate

Apply the spec to a raw frame — coerce, order, sort, stamp metadata — decode single variables through its codelists, and read or replace the artoo_meta the result carries. Then surface every conformance finding for one dataset or a whole study, plus the spec’s own integrity, with the control object that scopes both.

apply_spec()
Conform a data frame to its spec
decode_column()
Derive or translate a variable through its codelist
get_meta()
Read the metadata a dataset carries
set_meta()
Attach metadata to a dataset
sync_meta()
Re-align metadata with a transformed data frame
is_artoo_meta()
Test for a artoo_meta object
check_spec()
Check a dataset against its spec
check_study()
Check a whole study against its spec
validate_spec()
Validate a specification for submission-readiness
conformance()
Read the conformance findings a dataset carries
artoo_checks()
Control which conformance checks run
is_artoo_checks()
Test for a artoo_checks control

Read and write

Lossless dataset I/O across every supported format — generic dispatch on the file extension, plus a short wrapper per format — and the SAS-viewer-style variable pane and dataset inventory for any file.

read_dataset()
Read a dataset from any supported format
write_dataset()
Write a dataset to any supported format
read_xpt()
Read a dataset from SAS XPORT
write_xpt()
Write a dataset to SAS XPORT
read_json()
Read a dataset from CDISC Dataset-JSON
write_json()
Write a dataset to CDISC Dataset-JSON
read_ndjson()
Read a dataset from CDISC Dataset-JSON NDJSON
write_ndjson()
Write a dataset to CDISC Dataset-JSON NDJSON
read_parquet()
Read a dataset from Apache Parquet
write_parquet()
Write a dataset to Apache Parquet
read_rds()
Read a dataset from rds
write_rds()
Write a dataset to rds
columns()
View a dataset's variable attributes, SAS-style
members()
List the datasets in a file or directory
xpt_members()
List the members of a SAS XPORT transport file

Reference data

Reference tables for the codecs this session can read and write and the encoding names R, SAS, and Python share, plus the bundled CDISC pilot specs, metadata tables, and datasets used throughout the docs — all rebuilt from public sources.

artoo_formats()
Report which formats are available
artoo_encodings()
Encodings for clinical datasets, across R, SAS, and Python
adam_spec sdtm_spec
Bundled CDISC specifications (ADaM and SDTM)
cdisc_adam_datasets cdisc_adam_variables cdisc_sdtm_datasets cdisc_sdtm_variables cdisc_codelists
CDISC demo specification tables (one standard per pair)
cdisc_adsl
Demo subject-level analysis dataset (ADaM ADSL)
cdisc_adae
Demo adverse events analysis dataset (ADaM ADAE)
cdisc_dm
Demo demographics dataset (SDTM DM)
cdisc_vs
Demo vital signs dataset (SDTM VS)
cdisc_ts
Demo trial summary dataset (SDTM TS)
cdisc_suppdm
Demo supplemental qualifiers dataset (SDTM SUPPDM)