Returns the rows from var_spec that belong to the specified dataset,
ordered by the order column if present.
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(),
scaffold_vars(),
sort_keys(),
spec_codelist(),
spec_datasets(),
spec_study(),
write_define_html(),
write_define_xml(),
write_spec()
Examples
spec <- herald_spec(
ds_spec = data.frame(dataset = "DM", label = "Demographics",
stringsAsFactors = FALSE),
var_spec = data.frame(dataset = "DM", variable = c("STUDYID", "USUBJID"),
label = c("Study ID", "Subject ID"), order = 1:2,
stringsAsFactors = FALSE)
)
spec_vars(spec, "DM")
#> dataset variable label order
#> 1 DM STUDYID Study ID 1
#> 2 DM USUBJID Subject ID 2
