View source: R/prepUserImportData.R
prepUserImportData | R Documentation |
Prepares a data frame for import via the API. Allows for
data to be passed in either the raw format or the labeled data
received from exportUsers
.
prepUserImportData(data, rcon, consolidate = TRUE, user_role = FALSE)
data |
|
rcon |
A |
consolidate |
|
user_role |
|
Returns a data.frame
with user settings that will be accepted by the
API for import.
importUsers()
,
importUserRoles()
## Not run:
unlockREDCap(connections = c(rcon = "project_alias"),
url = "your_redcap_url",
keyring = "API_KEYs",
envir = globalenv())
# Prep user data
NewData <- data.frame(username = "target_user",
design = 1,
api_export = "Access",
api_import = "No Access",
surveys_enabled = 0)
prepUserImportData(data = NewData,
rcon = rcon)
# Prep user role data
NewData <- data.frame(unique_role_name = "target_user",
design = 1,
api_export = "Access",
api_import = "No Access",
surveys_enabled = 0)
prepUserImportData(data = NewData,
rcon = rcon)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.