Description Usage Arguments Value
Randomly select a specified number elements from each level (group) of a factor.
1 | sample_from_levels(x, sizes, replace = TRUE)
|
x |
A factor from whose levels should be sampled. |
sizes |
Number of elements that should be sampled from each level of
|
replace |
Should samples be drawn with replacement? |
An numeric vector containing indices of the elements sampled from each level.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.