Description Usage Arguments Value Examples
Given the boundaries of a set and the observations it contains, use this function to repartition the set into 2 equal subsets containing the same number of observations.
1 | split_subset(x, limits)
|
x |
The observations belonging to the set. |
limits |
A vector of length 2, giving the boundaries of the subset (1D). |
A matrix, where each row gives the limits of the new subsets.
1 2 3 | x <- runif(10,-1,1)
split_subset(x,c(-1,1)) # Returns a matrix of two intervals, which each contain
# 5 of the randomly generated points.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.