drop=FALSE needs to be added to the subsetting of "data" in line 40 of FederovOpt.R. Otherwise, you get the error:
Error in apply(data[, numericColumn], 2, mean) :
dim(X) must have a positive length
when the factorial design you input into optFederov only has one numeric variable.
FIX:
if (center) {
means<-apply(data[,numericColumn],2,mean) #drop=FALSE needs to be added here
data[,numericColumn]<-sweep(data[,numericColumn,drop=FALSE],2,means)
}
drop=FALSE needs to be added to the subsetting of "data" in line 40 of FederovOpt.R. Otherwise, you get the error:
when the factorial design you input into optFederov only has one numeric variable.
FIX:
You can recreate this with the design here: