deleteRecords: Delete Records From a Project

Description Usage Arguments Value REDCap API Documentation REDCap Version References

View source: R/deleteRecords.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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 documentation built on Feb. 18, 2020, 1:09 a.m.