View source: R/deg_simulation.R
simulate_sample_groups | R Documentation |
Generate sample groups with desired labels and sizes from given sample labels.
simulate_sample_groups(labels, groups, sizes, replace = FALSE)
labels |
a vector containing the label of each sample in the pool. |
groups |
a vector containing the desired label of samples in each group.
The label must be available in the sample pool provided by |
sizes |
integer vector indicating the desired number of samples in each group.
The length must be either one or the same as |
replace |
logical variable indicating whether sampling is with replacement. |
This function will return a list with the same length as groups
.
Each component is a vector containing the indexes of samples that are sampled for
the corresponding group.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.