vectorToApiBodyList: Convert R Vector To List for the API Call Body
Description
Converts an R vector to a list that will be suitable for
makeApiCall.
Usage
vectorToApiBodyList(vector, parameter_name)
Arguments
- vector
An atomic vector.
- parameter_name
character(1). The REDCap API parameter name.
Functional Requirements
Return a named list.
The name of each element in the list starts with the value of parameter_name
Throw an error if x is not an atomic vector
Throw an error if parameter_name is not a character(1)
Author
Benjamin Nutter with thanks to Philip Chase for showing me how
these need to be formatted.