pierreroudier / clhs

A R implementation of the conditioned Latin Hypercube Sampling method
12 stars 9 forks source link

must.include returns repeated indices #25

Open FeikovZ opened 1 year ago

FeikovZ commented 1 year ago

Including a must.include condition to clhs sampling returns an array with a duplicate index. If this is not a bug, but me misreading instruction, I'd suggest clarifying this in the documentation.

A reproducable example using the mtcars R dataset below:

calIndices <- clhs(mtcars, size = ceiling(0.8 * nrow(mtcars)), must.include = c(which(mtcars$qsec == min(mtcars$qsec)),which(mtcars$qsec == max(mtcars$qsec))))