spec_type_to_var_spec {metacore} | R Documentation |
Spec to var_spec
Description
Creates the var_spec 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. (Note: the keep column will be converted logical)
Usage
spec_type_to_var_spec(
doc,
cols = c(variable = "[N|n]ame|[V|v]ariables?", length = "[L|l]ength", label =
"[L|l]abel", type = "[T|t]ype", dataset = "[D|d]ataset|[D|d]omain", format =
"[F|f]ormat"),
sheet = "[V|v]ar"
)
Arguments
doc |
Named list of datasets @seealso |
cols |
Named vector of column names. The column names can be regular expressions for more flexibility. But, the names must follow the given pattern |
sheet |
Regular expression for the sheet name |
Value
a dataset formatted for the metacore object
See Also
Other spec builders:
spec_type_to_codelist()
,
spec_type_to_derivations()
,
spec_type_to_ds_spec()
,
spec_type_to_ds_vars()
,
spec_type_to_value_spec()
[Package metacore version 0.1.3 Index]