Learn R Programming

redcapAPI (version 2.7.4)

deleteEvents: Delete Events from a Project

Description

This method allows you to delete Events from a project. Notice: Because of this method's destructive nature, it is only available for use for projects in Development status. Additionally, please be aware that deleting an event will automatically delete any records/data that have been collected under that event (this is non-reversible data loss).

Usage

deleteEvents(
  rcon,
  events = NULL,
  refresh = TRUE,
  ...,
  error_handling = getOption("redcap_error_handling"),
  config = list(),
  api_param = list()
)

deleteEvents( rcon, events = NULL, refresh = TRUE, ..., error_handling = getOption("redcap_error_handling"), config = list(), api_param = list() )

Arguments

rcon

A redcapConnection object.

events

character vector giving the unique event names of the events to be deleted.

refresh

logical(1) If TRUE, cached event data will be refreshed after the deletion.

...

Additional arguments to pass to other methods.

error_handling

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

config

list Additional configuration parameters to pass to POST. These are appended to any parameters in rcon$config.

api_param

list Additional API parameters to pass into the body of the API call. This provides users to execute calls with options that may not otherwise be supported by redcapAPI.