This method allows you to download a single file stored in the
File Repository by providing the file's doc_id
number. For options
to export multiple files, see exportFileRepository
.
exportFromFileRepository(rcon, doc_id, dir = getwd(), dir_create = FALSE, ...)# S3 method for redcapApiConnection
exportFromFileRepository(
rcon,
doc_id,
dir = getwd(),
dir_create = FALSE,
...,
error_handling = getOption("redcap_error_handling"),
config = list(),
api_param = list()
)
Returns a data.frame
with the directory and
filename of the saved file.
redcapApiConnection
object.
integerish(1)
. The document ID to be downloaded
character(1)
. A directory on the local system to which
the file is to be saved. Defaults to the working directory.
logical(1)
. Create the directory dir
if it does not already exist. Defaults to FALSE.
If dir does not exist and create = FALSE, an error is thrown.
Additional arguments to be passed between 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
.
Benjamin Nutter