ard_stack {cards}R Documentation

Stack ARDs

Description

Stack multiple ARD calls sharing common input data and by variables. Optionally incorporate additional information on represented variables (i.e. big N's, missingness, attributes) and/or tidy for use in displays with shuffle_ard().

Usage

ard_stack(
  data,
  by = NULL,
  ...,
  .overall = FALSE,
  .missing = FALSE,
  .attributes = FALSE,
  .shuffle = FALSE
)

Arguments

data

(data.frame)
a data frame

by

(tidy-select)
columns to tabulate by in the series of ARD function calls

...

(dynamic-dots)
Series of ARD function calls to be run and stacked

.overall

(logical)
logical indicating whether overall statistics should be calculated (i.e. re-run all ⁠ard_*()⁠ calls with by=NULL). Default is FALSE.

.missing

(logical)
logical indicating whether to include the results of ard_missing() for all variables represented in the ARD. Default is FALSE.

.attributes

(logical)
logical indicating whether to include the results of ard_attributes() for all variables represented in the ARD. Default is FALSE.

.shuffle

(logical)
logical indicating whether to perform shuffle_ard() on the final result. Default is FALSE.

Value

a transformed ARD data frame (of class 'card' if .shuffle = FALSE)

Examples

ard_stack(
  data = ADSL,
  by = "ARM",
  ard_categorical(variables = "AGEGR1"),
  ard_continuous(variables = "AGE")
)

ard_stack(
  data = ADSL,
  by = "ARM",
  ard_categorical(variables = "AGEGR1"),
  ard_continuous(variables = "AGE"),
  .shuffle = TRUE
)


[Package cards version 0.1.0 Index]