
Build a herald_spec from an inline YAML fixture
Source:R/spec-fixture.R
herald_spec_from_fixture.RdConvenience constructor for tests, examples, and documentation. The
input is a YAML string whose top-level keys are herald_spec()
slot names (ds_spec, var_spec, value_spec,
codelist, methods, comments, documents,
study, dictionaries, arm_displays,
arm_results). Each key is an array of objects, one per row,
with field names matching the corresponding data frame columns.
Details
Coercion is delegated to jsonlite::fromJSON(...,
simplifyDataFrame = TRUE), which handles heterogeneous objects by
padding absent fields with NA. All subsequent validation
(required slot presence, schema conformance) is delegated to
herald_spec().
See also
Other specification:
apply_spec(),
coerce_types(),
decode_var(),
detect_adam_class(),
detect_adam_classes(),
drop_unspec_vars(),
herald_spec(),
order_cols(),
read_spec(),
read_spec_define(),
retained_variable_convention(),
scaffold_vars(),
sort_keys(),
spec_codelist(),
spec_datasets(),
spec_study(),
spec_vars(),
variable_codelist(),
variable_is_required(),
write_define_html(),
write_define_xml(),
write_spec()