Learn R Programming

redcapAPI (version 2.7.4)

importFileRepository: Import a Folder and its Contents to the File Repository

Description

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

Usage

importFileRepository(rcon, dir, folder_id = numeric(0), ...)

# S3 method for redcapApiConnection importFileRepository( rcon, dir, folder_id = numeric(0), dag_id = numeric(0), role_id = numeric(0), recursive = FALSE, ..., refresh = TRUE, error_handling = getOption("redcap_error_handling"), config = list(), api_param = list() )

Arguments

rcon

A redcap connection object.

dir

character(1) A directory on the local system with the files 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

dag_id

integerish(0/1) The ID of a data access group. If provided, access to the folder will be restricted to the DAG.

role_id

integerish(0/1) The ID of a role. If provided, access to the folder will be restricted to users with that role.

recursive

logical(1). If FALSE, only the files in the immediate directory are loaded to the File Repository. If TRUE subfolders and their contents will also be added.

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