Description Usage Arguments Examples
Sample groups from a data set just as one would do using sample_n(). Based on a similar function from TJ Mahr's package tjmisc.
1 | sample_n_of(data, size, replace = TRUE, ...)
|
data |
A tibble or data frame. |
size |
The number of groups you want to sample. |
replace |
Whether to sample with replacement or not. Defaults to TRUE. |
... |
The group you want to sample. |
1 | sample_n_of(iris, 2, replace = FALSE, Species)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.