My question: Is there any way to randomize this data using the factor labels with two reps rather than using just the numbers?
Here is my R-code using the SixSigma package for Experimental Design:
My data:
ExperimentDesign <- expand.grid(Flame = gl(2, 1, labels = c("Low", "High")),
Pan = gl(2, 1, labels = c("Small", "Large")),
Cover = gl(2, 1, labels = c("None", "Glass")),
Salt = gl(2, 1, labels = c("Yes", "No")))
My Sample:
ExperimentDesign$ord <- sample(1:16,16)
ExperimentDesign[order(ExperimentDesign$ord), ]
Replications:
ss.data.doe1 <- data.frame(repl = rep(1:2, each = 16),
rbind(ExperimentDesign))
ss.data.doe1