This method allows you to import Instrument-Event Mappings into a project (this corresponds to the 'Designate Instruments for My Events' page in the project).
NOTE: This only works for longitudinal projects.
importMappings(rcon, data, refresh = TRUE, ...)# S3 method for redcapApiConnection
importMappings(
rcon,
data,
refresh = TRUE,
...,
error_handling = getOption("redcap_error_handling"),
config = list(),
api_param = list()
)
a redcapConnection object.
data.frame with columns arm_num,
unique_event_name, and form. See Details
logical(1). When TRUE, cached mappings
in the rcon object are refreshed after the import.
Additional arguments to pass to other methods.
An option for how to handle errors returned by the API.
see redcap_error
list Additional configuration parameters to pass to
POST. These are appended to any parameters in
rcon$config.
list Additional API parameters to pass into the
body of the API call. This provides users to execute calls with options
that may not otherwise be supported by redcapAPI.
The arm_num variable will be compared against existing arms
in the project (via rcon$arms(). An error is returned if any of
the arm numbers are not found in the project.
The unique_event_name must exist in rcon$events(). An error
is returned if an value in the data doesn't match.
The values of form must all match a form name in
rcon$instruments(). An error is returned if any values provided
do not match.