Skip to content

rethink interface for passing metadata to cb_create() #35

Description

@ccsarapas

I think it's clunkier than it needs to be. Currently:

  1. metadata columns for variable label and value labels can have any name in metadata, specified using .var_label and .val_labels args
  2. to use metadata without a variable or value label column, .var_label or .val_labels must be set to NULL
  3. other columns in metadata can be renamed in codebook by passing named arg to ...
  4. 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:

  1. require variable / value label columns in metadata to be called label and var_labels.
  2. no need to set column to NULL to omit -- just don't include it in metadata.
  3. all other columns in metadata will be included with their existing names (cannot be renamed in cb_create() call
  4. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions