project_xml | R Documentation |
Execute an "Export Entire Project as REDCap XML File" API request to fetch all metadata (and optionally also data records) corresponding to a REDCap project.
project_xml(
conn,
meta_only = FALSE,
records = NULL,
fields = NULL,
events = NULL,
filter_logic = NULL,
export_dag = FALSE,
export_survey = FALSE,
export_files = FALSE
)
conn |
A REDCap API connection object (created with |
meta_only |
Logical indicating whether to fetch only the project
metadata (if |
records |
Optional character vector of specific record IDs to fetch
record data for. Only used when |
fields |
Optional character vector of specific fields to fetch record
data for. Only used when |
events |
Optional character vector of specific events to fetch record
data for. Only used when |
filter_logic |
Optional character string containing a REDCap-style expression used to filter records returned by the API (e.g. "[age] > 30") |
export_dag |
Logical indicating whether to export the
redcap_data_access_group field. Defaults to |
export_survey |
Logical indicating whether to export survey identifier
or timestamp fields, if surveys are used in the project. Defaults to
|
export_files |
Logical indicating whether to export uploaded files. Note
this may lead to large exports. Defaults to |
An object of class xml_document
## Not run:
conn <- rconn(
url = "https://redcap.msf.fr/api/",
token = Sys.getenv("MY_REDCAP_TOKEN")
)
project_xml(conn)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.