Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

genericApiCall

Generic Interface the REDCap API.


Description

Permits users to make generic calls to the REDCap API. This allows use of API methods that do not yet have dedicated support.

Usage

genericApiCall(
  rcon,
  content,
  make_data_frame = TRUE,
  colClasses = NA,
  returnFormat = "csv",
  ...
)

## S3 method for class 'redcapDbConnection'
genericApiCall(
  rcon,
  content,
  make_data_frame = TRUE,
  colClasses = NA,
  returnFormat = "csv",
  ...
)

## S3 method for class 'redcapApiConnection'
genericApiCall(
  rcon,
  content,
  make_data_frame = TRUE,
  colClasses = NA,
  returnFormat = "csv",
  ...,
  error_handling = getOption("redcap_error_handling")
)

Arguments

rcon

A REDCap connection object as generated by redcapConnection.

content

character(1) The content argument for the API call.

make_data_frame

logical(1). When TRUE, an attempt is made to coerce the output to a data frame with read.csv. Otherwise, it is returned as a character vector.

colClasses

A named list of column names and classes to apply via read.csv

returnFormat

character(1) The format for the return. Defaults to "csv".

...

Additional named arguments giving arguments to the API method.

error_handling

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


redcapAPI

Interface to 'REDCap'

v2.3
GPL-2
Authors
Benjamin Nutter [aut, ctb, cre], Stephen Lane [ctb], Will Beasley [ctb], Jeffrey Horner [ctb], Will Gray [ctb], Jeremy Stephens [ctb], Marcus Lehr [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.