diff --git a/R/doeFactorial.R b/R/doeFactorial.R index 5746e826..1312e667 100644 --- a/R/doeFactorial.R +++ b/R/doeFactorial.R @@ -337,7 +337,7 @@ doeFactorial <- function(jaspResults, dataset, options, ...) { df <- .doeRsmCategorical2df(options[["categoricalVariables"]]) designSpec <- .doeFactorialGetSelectedDesign(jaspResults, options) if (length(designSpec) == 0) { - return() + stop("No generator provided.") } if (length(unique(df[["name"]])) != options[["numberOfCategorical"]]) { stop("Duplicate factor names are not allowed.") diff --git a/R/doeResponseSurfaceMethodology.R b/R/doeResponseSurfaceMethodology.R index 213d5475..e85689c5 100644 --- a/R/doeResponseSurfaceMethodology.R +++ b/R/doeResponseSurfaceMethodology.R @@ -378,6 +378,9 @@ doeResponseSurfaceMethodology <- function(jaspResults, dataset, options, ...) { if (!dir.exists(dirname(outpath))) return() + if (is.null(design)) + return() + out_design <- design colnames(out_design)[1:2] <- c("RunOrder", "StandardOrder") out_design[["Response"]] <- ""