| simbase_list {WoodSimulatR} | R Documentation |
Wrapper for the simbase_* functions for grouped data
Description
If a function of the simbase_* family encounters grouped data
(as caused by group_by), it should invoke simbase_list
to create a collection of separate simbases for each group.
Usage
simbase_list(data, simbase_constructor, ..., suffix = "_lst")
Arguments
data |
A grouped dataset (see |
simbase_constructor |
A function which returns a |
... |
Further arguments passed to the |
suffix |
Suffix to be added to the individual simbase labels if they are all the same (see details). |
Value
A simbase_list object; this is essentially a
tibble with the grouping columns of data and a column
.simbase which contains the simbase_* objects.
Technical details
Currently, the "simbase_* family" only consists of
simbase_covar (although, in a broader sense,
simbase_list can also be thought to be part of this "family").
It is planned to add further simulation types in a later release.
The functions of the simbase_* family support label
generation (see e.g. simbase_covar). These functions should
generate the label before invoking simbase_list, so that there
is a common label for all of the simbases; simbase_list adds a suffix
suffix. A warning is issued if the labels of the different simbases
are not all equal; no suffix is added in this case.