Description Usage Arguments Details
View source: R/balanceset.R View source: R/rf.R
Balance samples
given a factor, sample the overrepresented groups such that each factor level is represented the same number of times
1 2 3 | balanceset(x)
balanceset(x)
|
x |
a factor |
n |
optionally, how many samples should be in each group |
replace |
whether sampling with replacement |
x |
a vector |
Given a factor, sample the overrepresented groups such that each factor level is represented the same number of times. The function counts the number of occurences of the factor levels, and resamples each group with number of occurences higher than minimal.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.