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

deleteRecords

Delete Records From a Project


Description

Delete records from a project. This is a destructive action that will result in deletion of any events and data associated with the arm. Data loss is non-reversible. The user must have 'Delete Record' privileges in the database.

Usage

deleteRecords(rcon, records, arms = NULL, ...)

## S3 method for class 'redcapDbConnection'
deleteRecords(rcon, records, arms = NULL, ...)

## S3 method for class 'redcapApiConnection'
deleteRecords(
  rcon,
  records,
  arms = NULL,
  ...,
  error_handling = getOption("redcap_error_handling")
)

Arguments

rcon

A REDCap connection object as generated by redcapConnection.

records

a vector of record names to be deleted.

arms

integerish, the arm number of the arm in which the record(s) should be deleted. (This can only be used if the project is longitudinal with more than one arm.) NOTE: If the arm parameter is not provided, the specified records will be deleted from all arms in which they exist. Whereas, if arm is provided, they will only be deleted from the specified arm.

...

Additional arguments to pass to other methods.

error_handling

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

Value

The number of deleted records.

REDCap API Documentation

This method allows you to delete one or more records from a project in a single API request.

REDCap Version

At least 8.1.17+ (and likely some earlier versions)

References

Please refer to your institution's API documentation.


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.