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

deleteFiles

Delete a File attached to a Record


Description

This function allows you to remove a document that has been attached to an individual record

Usage

deleteFiles(rcon, record, field, event, ...)

## S3 method for class 'redcapDbConnection'
deleteFiles(rcon, record, field, event, ...)

## S3 method for class 'redcapApiConnection'
deleteFiles(
  rcon,
  record = NULL,
  field = NULL,
  event = NULL,
  ...,
  bundle = getOption("redcap_bundle"),
  error_handling = getOption("redcap_error_handling")
)

Arguments

rcon

A REDCap connection object as generated by redcapConnection

record

The record ID in which the desired file is stored. Must be length 1.

field

The field name in which the file is stored. Must be length 1.

event

The event name for the file. Must be length 1. This applies only to longitudinal projects. If the event is not supplied for a longitudinal project, the API will return an error message.

...

Arguments to be passed to other methods

bundle

A redcapBundle object as created by exportBundle.

error_handling

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

Author(s)

Benjamin Nutter

References

Please refer to your institution's API documentation.

Additional details on API parameters are found on the package wiki at https://github.com/nutterb/redcapAPI/wiki/REDCap-API-Parameters


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.