Skip to contents

Execute an "Export List of Export Field Names" API request to fetch a tibble-style data frame containing field (i.e. variable) names as listed in the project codebook (column original_field_name) and the corresponding exported variable name(s) (column export_field_name).

Original and exported field names will be identical except in the case of checkbox-type variables. A given checkbox variable (e.g. "patient_status") will have a single entry in the codebook (i.e. field_name = "patient_status"), but will be exported as multiple variables — one for each possible choice value.

original_field_namechoice_valueexport_field_name
patient_status1patient_status___1
patient_status2patient_status___2
patient_status3patient_status___3
patient_status88patient_status___88

Usage

meta_fields(conn)

Arguments

conn

A REDCap API connection object (created with rconn)

Value

A tibble-style data frame with 3 columns:

  • original_field_name

  • choice_value

  • export_field_name

Examples

if (FALSE) { # \dontrun{
conn <- rconn(
  url = "https://redcap.msf.fr/api/",
  token = Sys.getenv("MY_REDCAP_TOKEN")
)

meta_fields(conn)
} # }