Description Usage Arguments Details Value Source Examples
Random grouping function for indexes of dataset’s row to divide into k groups.
1 |
data |
dataset that needs to be grouped by row. |
k |
the number of groups. |
Randomly split the number of dataset’s rows into k mutually exclusive groups. Divide the number of dataset’s rows by k and round the outcome. The result is regarded as the number of samples of each group. Use the sample( ) to extract k-1 groups out in the index of dataset’s rows, until the last group remains.
The value returned is a list of k-group-index, each element of the list is the sample in indexes of rows of the grouping results.
For sample, based on
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.
Ripley, B. D. (1987) Stochastic Simulation. Wiley.
1 | intest = subnum(rawdata, k=10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.