View source: R/exportProjectXml.R
exportProjectXml | R Documentation |
These methods enable the user to export a project's settings as an XML file in CDISC ODM format. This file may be used to transfer the project to another project, REDCap instance, or any other CDISC ODM compliant database.
exportProjectXml(
rcon,
file,
return_metadata_only = TRUE,
records = NULL,
fields = NULL,
events = NULL,
survey = FALSE,
dag = FALSE,
export_files = FALSE,
...
)
## S3 method for class 'redcapApiConnection'
exportProjectXml(
rcon,
file,
return_metadata_only = TRUE,
records = NULL,
fields = NULL,
events = NULL,
survey = FALSE,
dag = FALSE,
export_files = FALSE,
...
)
rcon |
A |
file |
|
return_metadata_only |
|
records |
|
fields |
|
events |
A |
survey |
|
dag |
|
export_files |
|
... |
Arguments to pass to other methods |
The entire project (all records, events, arms, instruments, fields, and project attributes) can be downloaded as a single XML file, which is in CDISC ODM format (ODM version 1.3.1). This XML file can be used to create a clone of the project (including its data, optionally) on this REDCap server or on another REDCap server (it can be uploaded on the Create New Project page). Because it is in CDISC ODM format, it can also be used to import the project into another ODM-compatible system.
When the return_metadata_only
parameter is set to FALSE
, the
Data Export user rights will be applied to any data returned. For example,
if the user has 'De-Identified' or 'Remove All Identifier Fields'
data export rights, then some data fields might be removed and
filtered out of the data set. To make sure that no data is
unnecessarily filtered out of the API request, the user should have
'Full Data Set' export rights in the project.
createRedcapProject()
## Not run:
unlockREDCap(connections = c(rcon = "token_alias"),
url = "your_redcap_url",
keyring = "API_KEYs",
envir = globalenv())
xml_file <- tempfile(file.ext = ".xml")
exportProjectXml(rcon,
file = xml_file)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.