Learn R Programming

redcapAPI (version 2.7.4)

fieldChoiceMapping: Splits a Field Choice Mapping Into a Two Column Matrix

Description

Uses the string from the select_choices_or_calculations for the meta data to create a matrix of codes and their mapped labels.

Usage

fieldChoiceMapping(object, field_name, ...)

# S3 method for character fieldChoiceMapping(object, field_name, ...)

# S3 method for redcapApiConnection fieldChoiceMapping(object, field_name, ...)

Value

Returns a matrix with two columns, choice_value and choice_label

Arguments

object

May be either a character(1) with the content of the field choices (i.e. meta_data$select_choices_or_calculations), or a redcapConnection object.

field_name

character(1) gives the field name for which to make the choice mapping.

...

arguments to pass to other methods.

Author

Benjamin Nutter, Shawn Garbett