Skip to contents

Use the REDCap project metadata to parse the variable labels. Creates a tibble with the values and labels for each categorical variable.

Usage

bhhi_rc_variable_labels(x)

Arguments

x

Either a string with the name of the stored REDCap project API token, or an xml2 object representing the REDCap project XML.

Value

A tibble with three columns:

  • variable: the name of the variable as stored in REDCap

  • value: the integer value of the variable

  • label: the corresponding text label

Details

When provided with the name of an API token, it will download the project XML from REDCap and then parse it.

When provided directly with the project XML, it will parse it.