View source: R/statistical_simulation.r
| simbase_list | R Documentation |
simbase_* functions for grouped dataIf a function of the simbase_* family encounters grouped data
(as caused by dplyr::group_by()), it should invoke simbase_list
to create a collection of separate simbases for each group.
simbase_list(data, simbase_constructor, ..., suffix = "_lst")
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). |
A simbase_list object; this is essentially a
tibble::tibble with the grouping columns of data and a column
.simbase which contains the simbase_* objects.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.