- data
(data.frame
)
a data frame
- by, strata
(character
)
columns to nest by/stratify by. Arguments are similar,
but with an important distinction:
by
: data frame is nested by all combinations of the columns specified,
including unobserved combinations and unobserved factor levels.
strata
: data frame is nested by all observed combinations of the
columns specified.
Arguments may be used in conjunction with one another.
- key
(string
)
the name of the new column with the nested data frame. Default is "data"
.
- rename_columns
(logical
)
logical indicating whether to rename the by
and strata
variables.
Default is TRUE
.
- list_columns
(logical
)
logical indicating whether to put levels of by
and
strata
columns in a list. Default is TRUE
.
- include_data
(scalar logical
)
logical indicating whether to include the data subsets as a list-column.
Default is TRUE
.
- include_by_and_strata
(logical
)
When TRUE
, the by
and strata
variables are included in the nested
data frames.