g <- Grid(levels = list("Temp" = c(400, 450, 500),
"Bore" = c(0, 600, 1200, 1800, 2400)))
X1 <- sampleIn(g, size = 4)
X2 <- sampleIn(g, size = 4, atSample = TRUE)
## this must be zero
sum(abs(as.matrix(g)[attr(X2, "index"), ] - X2))
Run the code above in your browser using DataLab