Skip to contents

Extract records from a REDCap project XML file (e.g. returned by project_xml) and assemble into a tidy long-form data frame, with one row for each combination of record x field x event x instance.

Usage

parse_xml(x)

Arguments

x

A REDCap project XML obect of class xml_document, e.g. returned by project_xml

Value

A tibble-style data frame with 6 columns:

  • record_id

  • form

  • redcap_event

  • redcap_repeat_instance

  • field

  • value

Examples

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

parse_xml(project_xml(conn))
} # }