I think it's clunkier than it needs to be. Currently:
- metadata columns for variable label and value labels can have any name in metadata, specified using
.var_label and .val_labels args
- to use metadata without a variable or value label column,
.var_label or .val_labels must be set to NULL
- other columns in metadata can be renamed in codebook by passing named arg to
...
- to include any other columns, their names must be specified in
...
I think it would be better to be stricter about metadata, at the cost of a little flexibility but making the interface easier and more intuitive in most cases. Specifically:
- require variable / value label columns in metadata to be called
label and var_labels.
- no need to set column to
NULL to omit -- just don't include it in metadata.
- all other columns in metadata will be included with their existing names (cannot be renamed in
cb_create() call
- all columns in metadata will be included -- no need to pass names to
...
Would need to be mindful of cb_create_redcap(), for which the existing interface does make more sense.
I think it's clunkier than it needs to be. Currently:
.var_labeland.val_labelsargs.var_labelor.val_labelsmust be set toNULL......I think it would be better to be stricter about
metadata, at the cost of a little flexibility but making the interface easier and more intuitive in most cases. Specifically:labelandvar_labels.NULLto omit -- just don't include it in metadata.cb_create()call...Would need to be mindful of
cb_create_redcap(), for which the existing interface does make more sense.