Learn R Programming

redcapAPI (version 2.7.4)

importToFileRepository: Import a Single File to the File Repository

Description

This method allows you to import a single file into a project's File Repository. The file may be stored in a specific folder in the File Repository if a folder_id is provided.

Usage

importToFileRepository(rcon, file, folder_id = numeric(0), ...)

# S3 method for redcapApiConnection importToFileRepository( rcon, file, folder_id = numeric(0), ..., refresh = TRUE, error_handling = getOption("redcap_error_handling"), config = list(), api_param = list() )

Arguments

rcon

A redcap connection object.

file

character(1) A file on the local system to be imported to the File Repository.

folder_id

integerish(0/1). The ID of the folder into which the file is to be imported. If length is zero, it is imported to the top-level folder.

...

Additional arguments to be passed between methods

refresh

logical(1) When TRUE (default), the cached File Repository data on rcon will be refreshed.

error_handling

An option for how to handle errors returned by the API. see redcap_error

config

list Additional configuration parameters to pass to POST. These are appended to any parameters in rcon$config.

api_param

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.

Author

Benjamin Nutter