nest_for_ard {cards} | R Documentation |
ARD Nesting
Description
This function is similar to tidyr::nest()
, except that it retains
rows for unobserved combinations (and unobserved factor levels) of by
variables, and unobserved combinations of stratifying variables.
The levels are wrapped in lists so they can be stacked with other types of different classes.
Usage
nest_for_ard(
data,
by = NULL,
strata = NULL,
key = "data",
rename_columns = TRUE,
list_columns = TRUE,
include_data = TRUE
)
Arguments
data |
( |
by , strata |
(
Arguments may be used in conjunction with one another. |
key |
( |
rename_columns |
( |
list_columns |
( |
include_data |
(scalar |
Value
a nested tibble
Examples
nest_for_ard(
data =
ADAE |>
dplyr::left_join(ADSL[c("USUBJID", "ARM")], by = "USUBJID") |>
dplyr::filter(AOCCSFL %in% "Y"),
by = "ARM",
strata = "AESOC"
)