rc_tidy: Tidy list of datasets from REDCap.

View source: R/tidy_redcap.R

rc_tidyR Documentation

Tidy list of datasets from REDCap.

Description

Tidy list of datasets from REDCap.

Usage

rc_tidy(
  object,
  ids = NULL,
  label = FALSE,
  label_checkbox = TRUE,
  repeated = "exclude"
)

Arguments

object

An named list containing the following data.frames; metadata (dd), events (evnt), instruments (inst) and records (rcrd).

ids

Names of identifiers, for inclusion on all output datasets.

label

Add labels to variables. Supply name of labelling package, Hmisc or sjlabelled.

label_checkbox

If labels are applied, how should checkbox items be labelled? If set to TRUE then choice labels are returned, if FALSE then the field label is returned for all items. If a character value is provided, the both the field label and choick label are return separated by the character value.

repeated

How shall repeated forms be treated in datasets assembled by event. Options are: exclude, include, or nest. Nest uses 'tidyr' package to collapse by row id.

Value

A list of dataframes, with variables grouped by event or by data collection form.


jwilliman/redcapTidy documentation built on Nov. 22, 2023, 7:07 a.m.