Description Usage Arguments Value
Wraps dplyr::sample_n. Subsampling will be done at the level of the
specified group column, within any grouping that already exists
in the input tbl.
1 | sample_n_groups(tbl, group, n, ...)
|
tbl |
tbl of data |
group |
(quoted) grouping variable |
n |
number of samples |
... |
additional arguments are passed to dplyr::sample_n. |
A tbl with n levels of group randomly sampled within
each existing grouping level of tbl. Any grouping of tbl is
preserved in the return value.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.