# Example 1
y <- rnorm(40, 5, 2)
findSubsample(x = y, size = 6)
# Example 2
f <- function(x) diff(range(x)) # max(x) - min(x)
findSubsample(x = y, size = 6, fun = f, minimize = FALSE, niter = 20000)
# End (not run)
Run the code above in your browser using DataLab