Description Usage Arguments Value
This function is designed to ensure that creation of cross-validation groups are well-balanced. Suppose there are k groups and n observations. If n is a multiple of k, each group is represented exactly n/k times. Otherwise, each group is represented either floor(n/k) or floor(n/k)+1 times.
1 | sampleEqually(n, k)
|
n |
The total number of values to be sampled. |
k |
The values to be sampled from (1:k). |
A vector of length n that contains values in 1:k.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.