Creates the ds_vars from a list of datasets (optionally filtered by the sheet
input). The named vector cols
is used to determine which is the correct
sheet and renames the columns
spec_type_to_ds_vars(
doc,
cols = c(dataset = "[D|d]ataset|[D|d]omain", variable =
"[V|v]ariable [[N|n]ame]?|[V|v]ariables?", order =
"[V|v]ariable [O|o]rder|[O|o]rder", keep = "[K|k]eep|[M|m]andatory"),
key_seq_sep_sheet = TRUE,
key_seq_cols = c(dataset = "Dataset", key_seq = "Key Variables"),
sheet = "[V|v]ar|Datasets"
)
Named list of datasets @seealso read_all_sheets()
for exact
format
Named vector of column names. The column names can be regular expressions for more flexibility. But, the names must follow the given pattern
A boolean to indicate if the key sequence is on a
separate sheet. If set to false add the key_seq column name to the cols
vector.
names vector to get the key_sequence for each dataset
Regular expression for the sheet names
a dataset formatted for the metacore object
Other spec builder:
spec_type_to_codelist()
,
spec_type_to_derivations()
,
spec_type_to_ds_spec()
,
spec_type_to_value_spec()
,
spec_type_to_var_spec()