Takes a random sample of size N-1
from the population.
See the Details section below for further information.
Details
The leave-one-out is a particular case of the leave-p-out, where
p = 1
.
A random sample of size 1
is taken from the population and used as holdout
data.
This function returns a sample of size N-1
obtained by removing the holdout
sample from the population.
Examples
#Set seed for reproducibility
set.seed(seed = 5381L)
#Take one sample leaving out 1 element
leaveOneOutSample(N = 10)
#> [1] 2 3 4 5 6 7 8 9 10