Description Usage Arguments See Also Examples
using group_by with sample returns a sample of the observations within a group. This function instead returns all observations for a sample of groups.
1 2 3 | g_sample_frac(tbl, group, ...)
g_sample_n(tbl, group, ...)
|
tbl |
tbl of data |
group |
grouping variable |
... |
Arguments passed on to
|
See sample
for details on sample function.
1 2 | g_sample_frac(airquality, Month, .3)
g_sample_n(airquality, Month, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.