View source: R/docsDagMethods.R
| dagMethods | R Documentation | 
These methods enable the user to export existing Data Access Groups, import new Data Access Groups, or delete Data Access Groups from a project.
exportDags(rcon, ...)
importDags(rcon, data, ...)
deleteDags(rcon, dags, ...)
## S3 method for class 'redcapApiConnection'
exportDags(rcon, ...)
## S3 method for class 'redcapApiConnection'
importDags(rcon, data, ...)
## S3 method for class 'redcapApiConnection'
deleteDags(rcon, dags, ...)
rcon | 
 A   | 
dags | 
 
  | 
data | 
 A   | 
... | 
 Arguments to pass to other methods  | 
To import new data access groups, the user must provide a value for
data_access_group_name with no value (NA) for unique_group_name.
To modify a group name, provide a new value for data_access_group_name
with the associated unique_group_name. If unique_group_name
is provided, it must match a value currently in the project.
exportDags with the columns
data_access_group_name  | The human readable name for the data access group. | 
unique_group_name  | The internal unique group name. | 
data_access_group_id  | The internal numeric identifier. | 
importDags invisibly returns the number of Data Access Groups imported.
deleteDags invisibly returns the number of Data Access Groups deleted.
exportDags(): Export Data Access Groups from a REDCap Project
importDags(): Import Data Access Groups to a project.
deleteDags(): Delete Data Access Groups from a project.
switchDag(),
exportUserDagAssignments(), 
importUserDagAssignments()
## Not run: 
unlockREDCap(connections = c(rcon = "project_alias"), 
             url = "your_redcap_url", 
             keyring = "API_KEYs", 
             envir = globalenv())
exportDags(rcon)
# Import a new Data Access Group
NewData <- data.frame(data_access_group_name = "New DAG Name", 
                      unique_group_name = NA_character_)
importDags(rcon, 
           data = NewData)
           
# Modify an existing Data Access Group Name
# The user will need to match the unique_group_name to the existing DAGs
ChangeData <- data.frame(data_access_group_name = "Altered DAG Name", 
                         unique_group_name = "new_dag_name")
importDags(rcon, 
           data = ChangeData)
           
# Delete a Data Access Group
deleteDags(rcon, 
           dags = c("new_dag_name"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.