%%capture
%%R
field_names <- redcap_variables(
redcap_uri = url,
token = token,
verbose = TRUE,
config_options = NULL
)$data12 Field Names
Using the export field names method will export all fields including the <form_name>_complete fields and the checkbox fields in a wide format, unlike when exporting the project’s metadata.
It will exclude:
- Any survey timestamp or survey identifier fields (automatically generated when a form is enabled as a survey).
- Any fields that are part of the unique key aside from the
record_id(i.e.redcap_event_name,redcap_repeat_instrumentandredcap_repeat_instance).
redcap_variables()
export_field_names()
project.export_field_names(format_type="df").head(15)| choice_value | export_field_name | |
|---|---|---|
| original_field_name | ||
| record_id | NaN | record_id |
| first_name | NaN | first_name |
| last_name | NaN | last_name |
| phone_num | NaN | phone_num |
| zip_code | NaN | zip_code |
| dob | NaN | dob |
| age | NaN | age |
| ethnicity | NaN | ethnicity |
| race | NaN | race |
| gender | NaN | gender |
| demographics_complete | NaN | demographics_complete |
| symptoms_yesno | NaN | symptoms_yesno |
| symptom_onset | NaN | symptom_onset |
| symptoms_exp | 1.0 | symptoms_exp___1 |
| symptoms_exp | 2.0 | symptoms_exp___2 |