View source: R/sample_frac_group.R
sample_frac_group | R Documentation |
Sample by a proportion of a grouping variable
sample_frac_group(data, proportion = 0.1, id = id_physician_npi, seed = 1234)
data |
A data frame. |
proportion |
A value between 0 and 1. |
id |
The bare column name containing the grouping variable whose labels you wish to sample. |
when the data is too big, we sample the data (usually
A filtered data frame containing roughly the proportion of id labels provided.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.