diff --git a/src/splitobs.jl b/src/splitobs.jl index c8b9015..32fcfd9 100644 --- a/src/splitobs.jl +++ b/src/splitobs.jl @@ -42,9 +42,13 @@ end Partition the `data` into two or more subsets. -When `at` is a number (between 0 and 1) this specifies the proportion in the first subset. -When `at` is a tuple, each entry specifies the proportion an a subset, -with the last having `1-sum(at)`. In all there are `length(at)+1` subsets returned. +When `at` is a number between 0 and 1, this specifies the proportion in the first subset. + +When `at` is an integer, it specifies the number of observations in the first subset. + +When `at` is a tuple, entries specifies the number or proportion in each subset, except +for the last which will contain the remaning observations. +The number of returned subsets is `length(at)+1`. If `shuffle=true`, randomly permute the observations before splitting. A random number generator `rng` can be optionally passed as the first argument.