if (FALSE) {
y <- runif(1000)
# Samples with replacement, 500 vectors of length 1000:
ps <- presample(y)
# Samples, as above, with 63 observations held out:
ps <- presample(y, nHoldout = 63)
# Samples without replacement, 250 vectors of length 500:
ps2 <- presample(y, nTree=250, nSamp=500, withRepl = FALSE)
}
Run the code above in your browser using DataLab