From d9b45f1aef3cd64b1d33c557e7766868b29f7441 Mon Sep 17 00:00:00 2001 From: JTPetter <61797391+JTPetter@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:33:09 +0200 Subject: [PATCH] Fix 2624 --- R/doeFactorial.R | 2 +- R/doeResponseSurfaceMethodology.R | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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"]] <- ""