if (FALSE) {
unlockREDCap(connections = c(rcon = "project_alias"),
url = "your_redcap_url",
keyring = "API_KEYs",
envir = globalenv())
# Export all mappings
exportMappings(rcon)
# Export mappings for a specific arm
exportMappings(rcon,
arms = 1)
# Import mappings
NewMapping <-
data.frame(arm_num = c(1, 1, 2),
unique_event_name = c("event_1_arm_1",
"event_2_arm_1",
"event_1_arm_2"),
form = c("registration",
"follow_up",
"registration"))
importMapping(rcon,
data = NewMapping)
}
Run the code above in your browser using DataLab