redcap_delete_records: Delete Records

redcap_delete_recordsR Documentation

Delete Records

Description

Delete Records

Usage

redcap_delete_records(
  redcap_uri = "https://redcap.wustl.edu/redcap/api/",
  token,
  records,
  arm
)

Arguments

redcap_uri

The URI (uniform resource identifier) of the REDCap project.

token

The API token specific to your REDCap project and username (each token is unique to each user for each project). See the section on the left-hand menu for obtaining a token for a given project.

records

an array of record names specifying specific records you wish to delete

arm

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.

Value

httr::response() object containing the number of records deleted.

Examples

## Not run: 
## delete two records from static
token <- REDCapR::retrieve_credential_local("~/.REDCapR", 7842)$token
redcap_delete_records(
  token,
  records = redcap_array("records", c(16227, 16342))
)

## End(Not run)

RoeLabWustl/roelabr documentation built on Aug. 27, 2022, 9:57 a.m.