camr_pivot_redcap_eav: Extract tables from REDCap EAV downloads

camr_pivot_redcap_eavR Documentation

Extract tables from REDCap EAV downloads

Description

camr_download_redcap() downloads data in entity-attribute-value (EAV) format (one row per datapoint).

Usage

camr_pivot_redcap_eav(
  df_redcap_eav,
  vchr_fields,
  lgl_collapse_checkboxes = FALSE,
  chr_event_pattern = NULL,
  chr_field_column = "field_name",
  chr_value_column = "value",
  chr_event_column = "redcap_event_name"
)

Arguments

df_redcap_eav

A dataframe with REDCap data in EAV format.

vchr_fields

A set of REDCap field names to extract.

lgl_collapse_checkboxes

Whether to collapse checkbox fields with '|'.

chr_event_pattern

Optional. A pattern to validate event names against.

chr_field_column

Optional. Defaults to the API provided "field_name".

chr_value_column

Optional. Defaults to the API provided "value".

chr_event_column

Optional. Defaults to the API provided "redcap_event_name".

Value

A dataframe, with the columns of df_redcap_eav and those specified by vchr_fields.


rettopnivek/camrprojects documentation built on March 26, 2024, 9:17 a.m.