prepUserImportData {redcapAPI} | R Documentation |
Prepare User Data for Import
Description
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
.
Usage
prepUserImportData(data, rcon, consolidate = TRUE, user_role = FALSE)
Arguments
data |
|
rcon |
A |
consolidate |
|
user_role |
|
Value
Returns a data.frame
with user settings that will be accepted by the
API for import.
See Also
importUsers()
,
importUserRoles()
Examples
## 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)
[Package redcapAPI version 2.9.1 Index]