Description Usage Arguments Value
View source: R/sample_n_groups.R
dplyr::sample_n lacks the functionality of sampling group_by variables. Instead, it is only capable of sampling rows in a table. sample_n_groups() samples a number of groups in a previously grouped_by tibble. the tibble must be grouped before calling the function.
1 | sample_n_groups(tbl, size, replace = FALSE, weight = NULL)
|
tbl |
A tibble |
size |
number of groups to sample |
replace |
sample with or without replacement |
weight |
sampling weights |
A tibble
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.