From 862cb1026ecb175d6fc520af8d05f5faabde6fb1 Mon Sep 17 00:00:00 2001 From: JTPetter <61797391+JTPetter@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:18:54 +0200 Subject: [PATCH 1/2] Values for LSL, USL, target labels and unit tests updates --- R/processCapabilityStudies.R | 9 +++++---- .../capability-of-the-process1-subplot-1.svg | 12 ++++++------ .../capability-of-the-process12-subplot-1.svg | 12 ++++++------ .../capability-of-the-process12-subplot-2.svg | 12 ++++++------ .../capability-of-the-process12-subplot-3.svg | 12 ++++++------ .../capability-of-the-process13-subplot-1.svg | 12 ++++++------ .../capability-of-the-process13-subplot-2.svg | 12 ++++++------ .../capability-of-the-process14-subplot-1.svg | 12 ++++++------ .../capability-of-the-process16-subplot-1.svg | 12 ++++++------ .../capability-of-the-process17-subplot-1.svg | 12 ++++++------ .../capability-of-the-process18-subplot-1.svg | 12 ++++++------ .../capability-of-the-process19-subplot-1.svg | 12 ++++++------ .../capability-of-the-process2-subplot-1.svg | 12 ++++++------ .../capability-of-the-process2-subplot-2.svg | 12 ++++++------ .../capability-of-the-process20-subplot-1.svg | 12 ++++++------ .../capability-of-the-process20-subplot-2.svg | 12 ++++++------ .../capability-of-the-process20-subplot-3.svg | 12 ++++++------ .../capability-of-the-process3-subplot-1.svg | 12 ++++++------ .../capability-of-the-process4-subplot-1.svg | 12 ++++++------ .../capability-of-the-process4-subplot-2.svg | 12 ++++++------ .../capability-of-the-process5-subplot-1.svg | 12 ++++++------ .../capability-of-the-process5-subplot-2.svg | 12 ++++++------ .../capability-of-the-process6-subplot-1.svg | 12 ++++++------ .../capability-of-the-process6-subplot-2.svg | 12 ++++++------ .../capability-of-the-process7-subplot-1.svg | 12 ++++++------ .../capability-of-the-process7-subplot-2.svg | 12 ++++++------ .../capability-of-the-process8-subplot-1.svg | 12 ++++++------ .../capability-of-the-process8-subplot-2.svg | 12 ++++++------ .../capability-of-the-process9-subplot-1.svg | 12 ++++++------ .../capability-of-the-process9-subplot-2.svg | 12 ++++++------ .../capability-of-the-processw1-subplot-1.svg | 12 ++++++------ .../capability-of-the-processw10-subplot-1.svg | 12 ++++++------ .../capability-of-the-processw10-subplot-2.svg | 12 ++++++------ .../capability-of-the-processw10-subplot-3.svg | 12 ++++++------ .../capability-of-the-processw12-subplot-1.svg | 12 ++++++------ .../capability-of-the-processw14-subplot-1.svg | 12 ++++++------ .../capability-of-the-processw15-subplot-1.svg | 12 ++++++------ .../capability-of-the-processw2-subplot-1.svg | 12 ++++++------ .../capability-of-the-processw2-subplot-2.svg | 12 ++++++------ .../capability-of-the-processw3-subplot-1.svg | 12 ++++++------ .../capability-of-the-processw4-subplot-1.svg | 12 ++++++------ .../capability-of-the-processw5-subplot-1.svg | 12 ++++++------ .../capability-of-the-processw6-subplot-1.svg | 12 ++++++------ .../capability-of-the-processw7-subplot-1.svg | 12 ++++++------ .../process-capability-report21-subplot-7.svg | 12 ++++++------ .../process-capability-report22-subplot-4.svg | 12 ++++++------ .../process-capability-report22-subplot-9.svg | 12 ++++++------ .../process-capability-report23-subplot-4.svg | 12 ++++++------ .../process-capability-report23-subplot-9.svg | 12 ++++++------ .../process-capability-report24-subplot-5.svg | 12 ++++++------ .../process-capability-reportw16-subplot-7.svg | 12 ++++++------ .../process-capability-reportw17-subplot-4.svg | 12 ++++++------ .../process-capability-reportw17-subplot-9.svg | 12 ++++++------ .../process-capability-reportw18-subplot-4.svg | 12 ++++++------ .../process-capability-reportw18-subplot-9.svg | 12 ++++++------ .../process-capability-reportw19-subplot-5.svg | 12 ++++++------ 56 files changed, 335 insertions(+), 334 deletions(-) diff --git a/R/processCapabilityStudies.R b/R/processCapabilityStudies.R index ba7c3e22..5f47111a 100644 --- a/R/processCapabilityStudies.R +++ b/R/processCapabilityStudies.R @@ -743,18 +743,19 @@ processCapabilityStudies <- function(jaspResults, dataset, options) { colnames(specLimitsDf) <- c("label", "xIntercept", "lty", "yPosLabel", "color") yPosLabel <- max(ggplot2::layer_scales(p)$y$range$range) if (options[["target"]]) { - specLimitsDf <- rbind(specLimitsDf, data.frame(label = gettext("Target"), xIntercept = options[["targetValue"]], - lty = "solid", yPosLabel = yPosLabel, color = "darkgreen")) + specLimitsDf <- rbind(specLimitsDf, data.frame(label = gettextf("Target = %g", round(options[["targetValue"]], .numDecimals)), + xIntercept = options[["targetValue"]], lty = "solid", yPosLabel = yPosLabel, + color = "darkgreen")) } if (options[["lowerSpecificationLimit"]]) { lslLty <- if (options[["lowerSpecificationLimitBoundary"]]) "solid" else "dotted" - lslLabel <- if (options[["lowerSpecificationLimitBoundary"]]) "LB" else "LSL" + lslLabel <- if (options[["lowerSpecificationLimitBoundary"]]) gettextf("LB = %g", round(options[["lowerSpecificationLimitValue"]], .numDecimals)) else gettextf("LSL = %g", round(options[["lowerSpecificationLimitValue"]], .numDecimals)) specLimitsDf <- rbind(specLimitsDf, data.frame(label = lslLabel, xIntercept = options[["lowerSpecificationLimitValue"]], lty = lslLty, yPosLabel = yPosLabel, color = "darkred")) } if (options[["upperSpecificationLimit"]]) { uslLty <- if (options[["upperSpecificationLimitBoundary"]]) "solid" else "dotted" - uslLabel <- if (options[["upperSpecificationLimitBoundary"]]) "UB" else "USL" + uslLabel <- if (options[["upperSpecificationLimitBoundary"]]) gettextf("UB = %g", round(options[["upperSpecificationLimitValue"]], .numDecimals)) else gettextf("USL = %g", round(options[["upperSpecificationLimitValue"]], .numDecimals)) specLimitsDf <- rbind(specLimitsDf, data.frame(label = uslLabel, xIntercept = options[["upperSpecificationLimitValue"]], lty = uslLty, yPosLabel = yPosLabel, color = "darkred")) } diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process1-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process1-subplot-1.svg index d232b2dc..5cfd3a50 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process1-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process1-subplot-1.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process12-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process12-subplot-1.svg index 6730c68b..52991c9e 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process12-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process12-subplot-1.svg @@ -46,12 +46,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process12-subplot-2.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process12-subplot-2.svg index f5574eaa..c1531d3b 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process12-subplot-2.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process12-subplot-2.svg @@ -46,12 +46,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process12-subplot-3.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process12-subplot-3.svg index e3b3a11a..d31ec0f5 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process12-subplot-3.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process12-subplot-3.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process13-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process13-subplot-1.svg index a60bee6f..babbb397 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process13-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process13-subplot-1.svg @@ -46,12 +46,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process13-subplot-2.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process13-subplot-2.svg index 3215ee71..47b7469f 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process13-subplot-2.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process13-subplot-2.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process14-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process14-subplot-1.svg index 842f0b81..e86849aa 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process14-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process14-subplot-1.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process16-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process16-subplot-1.svg index b3977be2..8cbedfb8 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process16-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process16-subplot-1.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process17-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process17-subplot-1.svg index dbf9b7cf..49823fe1 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process17-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process17-subplot-1.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process18-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process18-subplot-1.svg index 49b14afd..edb83016 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process18-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process18-subplot-1.svg @@ -48,12 +48,12 @@ - -Target - -LB - -UB + +Target = 6 + +LB = 0 + +UB = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process19-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process19-subplot-1.svg index 75c76ca9..c17625ba 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process19-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process19-subplot-1.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process2-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process2-subplot-1.svg index 74542697..928be8b4 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process2-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process2-subplot-1.svg @@ -46,12 +46,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process2-subplot-2.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process2-subplot-2.svg index c27856b7..cc299645 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process2-subplot-2.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process2-subplot-2.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process20-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process20-subplot-1.svg index ef253a68..9ab5e607 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process20-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process20-subplot-1.svg @@ -46,12 +46,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process20-subplot-2.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process20-subplot-2.svg index 1b2955c5..03f9e3a5 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process20-subplot-2.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process20-subplot-2.svg @@ -56,12 +56,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process20-subplot-3.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process20-subplot-3.svg index 43616f2a..79fde95c 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process20-subplot-3.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process20-subplot-3.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process3-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process3-subplot-1.svg index b4fbe669..5701386e 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process3-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process3-subplot-1.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process4-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process4-subplot-1.svg index 74542697..928be8b4 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process4-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process4-subplot-1.svg @@ -46,12 +46,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process4-subplot-2.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process4-subplot-2.svg index c27856b7..cc299645 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process4-subplot-2.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process4-subplot-2.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process5-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process5-subplot-1.svg index 4d99eef3..9798778b 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process5-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process5-subplot-1.svg @@ -45,12 +45,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process5-subplot-2.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process5-subplot-2.svg index 01ba9db0..7a8104d1 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process5-subplot-2.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process5-subplot-2.svg @@ -47,12 +47,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process6-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process6-subplot-1.svg index c39dab1f..3c6281bc 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process6-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process6-subplot-1.svg @@ -45,12 +45,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process6-subplot-2.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process6-subplot-2.svg index b7eb39ba..da4c48e6 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process6-subplot-2.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process6-subplot-2.svg @@ -47,12 +47,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process7-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process7-subplot-1.svg index 243a0233..b85b529a 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process7-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process7-subplot-1.svg @@ -45,12 +45,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process7-subplot-2.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process7-subplot-2.svg index a0e35d79..cc4df7fd 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process7-subplot-2.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process7-subplot-2.svg @@ -47,12 +47,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process8-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process8-subplot-1.svg index c4c34f2e..2607d1b7 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process8-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process8-subplot-1.svg @@ -45,12 +45,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process8-subplot-2.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process8-subplot-2.svg index f52c2ca2..c281d977 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process8-subplot-2.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process8-subplot-2.svg @@ -47,12 +47,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process9-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process9-subplot-1.svg index 66512a77..30fc8874 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process9-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process9-subplot-1.svg @@ -46,12 +46,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process9-subplot-2.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process9-subplot-2.svg index c27856b7..cc299645 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process9-subplot-2.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-process9-subplot-2.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw1-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw1-subplot-1.svg index 3fdbe90d..d241e967 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw1-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw1-subplot-1.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw10-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw10-subplot-1.svg index 1c9b0c8f..b97b1e45 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw10-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw10-subplot-1.svg @@ -46,12 +46,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw10-subplot-2.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw10-subplot-2.svg index 9cad9992..fac7c4e6 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw10-subplot-2.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw10-subplot-2.svg @@ -46,12 +46,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw10-subplot-3.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw10-subplot-3.svg index e97f6fdb..71ec7d33 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw10-subplot-3.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw10-subplot-3.svg @@ -56,12 +56,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw12-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw12-subplot-1.svg index 41806682..b57b2306 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw12-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw12-subplot-1.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw14-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw14-subplot-1.svg index 6d948a12..02402de9 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw14-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw14-subplot-1.svg @@ -48,12 +48,12 @@ - -Target - -LB - -UB + +Target = 6 + +LB = 0 + +UB = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw15-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw15-subplot-1.svg index 74e8ae38..50ebbbd1 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw15-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw15-subplot-1.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw2-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw2-subplot-1.svg index 788646f5..7e5087a5 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw2-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw2-subplot-1.svg @@ -46,12 +46,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw2-subplot-2.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw2-subplot-2.svg index 5279a3fd..059bc10b 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw2-subplot-2.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw2-subplot-2.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw3-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw3-subplot-1.svg index d2537fa7..1ee34b84 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw3-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw3-subplot-1.svg @@ -47,12 +47,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw4-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw4-subplot-1.svg index 2d001ba8..f0c6314c 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw4-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw4-subplot-1.svg @@ -47,12 +47,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw5-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw5-subplot-1.svg index 54ede17f..f268f920 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw5-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw5-subplot-1.svg @@ -47,12 +47,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw6-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw6-subplot-1.svg index 71778e12..dd5f6b7e 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw6-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw6-subplot-1.svg @@ -47,12 +47,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw7-subplot-1.svg b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw7-subplot-1.svg index 1fb9ac7e..31293634 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw7-subplot-1.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/capability-of-the-processw7-subplot-1.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/process-capability-report21-subplot-7.svg b/tests/testthat/_snaps/processCapabilityStudies/process-capability-report21-subplot-7.svg index 074352d1..40127d70 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/process-capability-report21-subplot-7.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/process-capability-report21-subplot-7.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/process-capability-report22-subplot-4.svg b/tests/testthat/_snaps/processCapabilityStudies/process-capability-report22-subplot-4.svg index c27856b7..cc299645 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/process-capability-report22-subplot-4.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/process-capability-report22-subplot-4.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/process-capability-report22-subplot-9.svg b/tests/testthat/_snaps/processCapabilityStudies/process-capability-report22-subplot-9.svg index 74542697..928be8b4 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/process-capability-report22-subplot-9.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/process-capability-report22-subplot-9.svg @@ -46,12 +46,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/process-capability-report23-subplot-4.svg b/tests/testthat/_snaps/processCapabilityStudies/process-capability-report23-subplot-4.svg index 01ba9db0..7a8104d1 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/process-capability-report23-subplot-4.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/process-capability-report23-subplot-4.svg @@ -47,12 +47,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/process-capability-report23-subplot-9.svg b/tests/testthat/_snaps/processCapabilityStudies/process-capability-report23-subplot-9.svg index 4d99eef3..9798778b 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/process-capability-report23-subplot-9.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/process-capability-report23-subplot-9.svg @@ -45,12 +45,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/process-capability-report24-subplot-5.svg b/tests/testthat/_snaps/processCapabilityStudies/process-capability-report24-subplot-5.svg index fc04cc3b..36fe77a8 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/process-capability-report24-subplot-5.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/process-capability-report24-subplot-5.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw16-subplot-7.svg b/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw16-subplot-7.svg index dc14c316..67f3d608 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw16-subplot-7.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw16-subplot-7.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw17-subplot-4.svg b/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw17-subplot-4.svg index 5279a3fd..059bc10b 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw17-subplot-4.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw17-subplot-4.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw17-subplot-9.svg b/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw17-subplot-9.svg index 788646f5..7e5087a5 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw17-subplot-9.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw17-subplot-9.svg @@ -46,12 +46,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw18-subplot-4.svg b/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw18-subplot-4.svg index df5acf0b..06dcf563 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw18-subplot-4.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw18-subplot-4.svg @@ -47,12 +47,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw18-subplot-9.svg b/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw18-subplot-9.svg index 4ac7d366..e7e8021c 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw18-subplot-9.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw18-subplot-9.svg @@ -45,12 +45,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 diff --git a/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw19-subplot-5.svg b/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw19-subplot-5.svg index 75f20467..c1f341a1 100644 --- a/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw19-subplot-5.svg +++ b/tests/testthat/_snaps/processCapabilityStudies/process-capability-reportw19-subplot-5.svg @@ -48,12 +48,12 @@ - -Target - -LSL - -USL + +Target = 6 + +LSL = 0 + +USL = 12 From 072ca777b5371977eb56cae9d0b2e4351165a630 Mon Sep 17 00:00:00 2001 From: JTPetter <61797391+JTPetter@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:37:27 +0200 Subject: [PATCH 2/2] fix unit tests --- .../{ => datasets/attributeCharts}/SPC_NP.csv | 0 .../{ => datasets/attributeCharts}/SPC_P.csv | 2 +- tests/testthat/test-attributesCharts.R | 14 ++--- tests/testthat/test-doeFactorial.R | 51 +++++++------------ .../test-doeResponseSurfaceMethodology.R | 30 ++++------- 5 files changed, 35 insertions(+), 62 deletions(-) rename tests/testthat/{ => datasets/attributeCharts}/SPC_NP.csv (100%) rename tests/testthat/{ => datasets/attributeCharts}/SPC_P.csv (92%) diff --git a/tests/testthat/SPC_NP.csv b/tests/testthat/datasets/attributeCharts/SPC_NP.csv similarity index 100% rename from tests/testthat/SPC_NP.csv rename to tests/testthat/datasets/attributeCharts/SPC_NP.csv diff --git a/tests/testthat/SPC_P.csv b/tests/testthat/datasets/attributeCharts/SPC_P.csv similarity index 92% rename from tests/testthat/SPC_P.csv rename to tests/testthat/datasets/attributeCharts/SPC_P.csv index 781cdc0b..2fdd999f 100644 --- a/tests/testthat/SPC_P.csv +++ b/tests/testthat/datasets/attributeCharts/SPC_P.csv @@ -1,4 +1,4 @@ -"","ï..Month","Size","D","Proportion" +"","Month","Size","D","Proportion" "1","Sep",150,21,0.14 "2","Oct",153,16,0.105 "3","Nov",170,30,0.176 diff --git a/tests/testthat/test-attributesCharts.R b/tests/testthat/test-attributesCharts.R index dbdb499b..bd10a0e3 100644 --- a/tests/testthat/test-attributesCharts.R +++ b/tests/testthat/test-attributesCharts.R @@ -8,7 +8,7 @@ options$total <- "Size" options$attributesChart <- "defectives" options$attributesChartDefectivesChartType <- "npChart" set.seed(1) -results <- runAnalysis("attributesCharts", "SPC_NP.csv", options) +results <- runAnalysis("attributesCharts", "datasets/attributeCharts/SPC_NP.csv", options) test_that("np Chart plot matches", { plotName <- results[["results"]][["NPchartPlot"]][["data"]] @@ -25,7 +25,7 @@ test_that("Test results for np chart table results match", { # P options$attributesChartDefectivesChartType <- "pChart" -results <- runAnalysis("attributesCharts", "SPC_P.csv", options) +results <- runAnalysis("attributesCharts", "datasets/attributeCharts/SPC_P.csv", options) test_that("p Chart plot matches", { plotName <- results[["results"]][["PchartPlot"]][["data"]] @@ -35,7 +35,7 @@ test_that("p Chart plot matches", { # Laney's P options$attributesChartDefectivesChartType <- "laneyPPrimeChart" -results <- runAnalysis("attributesCharts", "SPC_P.csv", options) +results <- runAnalysis("attributesCharts", "datasets/attributeCharts/SPC_P.csv", options) test_that("Laney p' Chart plot matches", { plotName <- results[["results"]][["LaneyPPlot"]][["data"]] @@ -48,7 +48,7 @@ test_that("Laney p' Chart plot matches", { options$attributesChartDefectivesChartType <- "npChart" options$attributesChart <- "defects" options$attributesChartDefectsChartType <- "cChart" -results <- runAnalysis("attributesCharts", "SPC_NP.csv", options) +results <- runAnalysis("attributesCharts", "datasets/attributeCharts/SPC_NP.csv", options) test_that("c Chart plot matches", { plotName <- results[["results"]][["CchartPlot"]][["data"]] @@ -64,7 +64,7 @@ test_that("Test results for c chart table results match", { # U options$attributesChartDefectsChartType <- "uChart" -results <- runAnalysis("attributesCharts", "SPC_P.csv", options) +results <- runAnalysis("attributesCharts", "datasets/attributeCharts/SPC_P.csv", options) test_that("u Chart plot matches", { plotName <- results[["results"]][["UchartPlot"]][["data"]] @@ -74,7 +74,7 @@ test_that("u Chart plot matches", { # Laneys U options$attributesChartDefectsChartType <- "laneyUPrimeChart" -results <- runAnalysis("attributesCharts", "SPC_P.csv", options) +results <- runAnalysis("attributesCharts", "datasets/attributeCharts/SPC_P.csv", options) test_that("Laney u' Chart plot matches", { plotName <- results[["results"]][["LaneyUPlot"]][["data"]] @@ -84,7 +84,7 @@ test_that("Laney u' Chart plot matches", { ## I MR options$attributesChart <- "xmr" -results <- runAnalysis("attributesCharts", "SPC_P.csv", options) +results <- runAnalysis("attributesCharts", "datasets/attributeCharts/SPC_P.csv", options) test_that("Individuals and Moving Range Chart plot matches", { plotName <- results[["results"]][["IPlotA"]][["data"]] diff --git a/tests/testthat/test-doeFactorial.R b/tests/testthat/test-doeFactorial.R index 7a470032..37a592c4 100644 --- a/tests/testthat/test-doeFactorial.R +++ b/tests/testthat/test-doeFactorial.R @@ -23,8 +23,7 @@ options$selectedDesign2 <- list(list(levels = "Row 0", name = "data 1", values = options$selectedRow <- 0 # select design options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("1.1 Two Factor Two Level Factorial Design table results match", { @@ -59,8 +58,7 @@ options$selectedDesign2 <- list(list(levels = c("Row 0", "Row 1", "Row 2"), name options$selectedRow <- 2 # select design options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("2.1 Five Factor Two Level Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] @@ -106,8 +104,7 @@ options$selectedDesign2 <- list(list(levels = c("Row 0", "Row 1", "Row 2"), name options$selectedRow <- 0 # select design options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("3.1 Five Factor Two Level Frac. Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] @@ -158,8 +155,7 @@ options$selectedDesign2 <- list(list(levels = c("Row 0", "Row 1", "Row 2", "Row options$selectedRow <- 3 # select design options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("4.1 Nine Factor Two Level Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] @@ -288,8 +284,7 @@ options$selectedDesign2 <- list(list(levels = c("Row 0", "Row 1", "Row 2", "Row options$selectedRow <- 0 # select design options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("5.1 Nine Factor Two Level Frac. Factorial Design table results match", { @@ -337,8 +332,7 @@ options$selectedRow <- 1 # select design options$centerpoints <- 1 options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("6.1 One Center Point Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] @@ -374,8 +368,7 @@ options$selectedRow <- 1 # select design options$centerpoints <- 2 options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("7.1 Two Center Point Factorial Design table results match", { @@ -412,8 +405,7 @@ options$selectedRow <- 1 # select design options$centerpoints <- 4 options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("8.1 Four Center Point Factorial Design table results match", { @@ -453,8 +445,7 @@ options$selectedRow <- 1 # select design options$blocks <- "2" options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("9.1 Two Blocks Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] @@ -490,8 +481,7 @@ options$selectedRow <- 1 # select design options$blocks <- "4" options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("10.1 Four Blocks Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] @@ -527,8 +517,7 @@ options$selectedRow <- 1 # select design options$blocks <- "8" options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("11.1 Eight Blocks Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] @@ -570,8 +559,7 @@ options$selectedDesign2 <- list(list(levels = "Row 0", name = "data 1", values = options$selectedRow <- 0 # select design options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("12.1 Two Factor One HTC Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] @@ -605,8 +593,7 @@ options$selectedDesign2 <- list(list(levels = "Row 0", name = "data 1", values = options$selectedRow <- 1 # select design options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("13.1 Five Factor Two HTC Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] @@ -653,8 +640,7 @@ options$selectedDesign2 <- list(list(levels = "Row 0", name = "data 1", values = options$selectedRow <- 1 # select design options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("14.1 Seven Factor Three HTC Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] @@ -756,8 +742,7 @@ options$factorialType <- "generalFullFactorial" options$runOrder <- "runOrderStandard" options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("15.1 Three Factor Three Level General Full Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] @@ -797,8 +782,7 @@ options$factorialType <- "generalFullFactorial" options$runOrder <- "runOrderStandard" options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("16.1 Three Factor Four Level General Full Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] @@ -842,8 +826,7 @@ options$factorialType <- "generalFullFactorial" options$runOrder <- "runOrderStandard" options$setSeed <- TRUE set.seed(1) -dataset <- NULL -results <- runAnalysis("doeFactorial", dataset, options) +results <- runAnalysis("doeFactorial", "debug.csv", options) test_that("17.1 Four Factor Six Level General Full Factorial Design table results match", { table <- results[["results"]][["displayDesign"]][["data"]] diff --git a/tests/testthat/test-doeResponseSurfaceMethodology.R b/tests/testthat/test-doeResponseSurfaceMethodology.R index f664fb70..f462c073 100644 --- a/tests/testthat/test-doeResponseSurfaceMethodology.R +++ b/tests/testthat/test-doeResponseSurfaceMethodology.R @@ -30,8 +30,7 @@ options$selectedDesign2 <- list( # give design list, always five lists, number o list(levels = c("Row 0", "Row 1"), name = "data 5", values = c(1.682, 1.633)) # alpha ) options$selectedRow <- 1 # select design -dataset <- NULL -results <- runAnalysis("doeResponseSurfaceMethodology", dataset, options) +results <- runAnalysis("doeResponseSurfaceMethodology", "debug.csv", options) test_that("1.1 Three Cont. Pred. Central Composite Design table results match", { table <- results[["results"]][["designTable"]][["data"]] @@ -79,8 +78,7 @@ options$selectedDesign2 <- list( # give design list, always five lists, number o list(levels = c("Row 0", "Row 1"), name = "data 5", values = c(2.378, 2.366)) # alpha ) options$selectedRow <- 1 # select design -dataset <- NULL -results <- runAnalysis("doeResponseSurfaceMethodology", dataset, options) +results <- runAnalysis("doeResponseSurfaceMethodology", "debug.csv", options) test_that("2.1 Five Cont. Pred. Central Composite Design table results match", { table <- results[["results"]][["designTable"]][["data"]] @@ -150,8 +148,7 @@ options$selectedDesign2 <- list( # give design list, always five lists, number o list(levels = c("Row 0", "Row 1"), name = "data 5", values = c(1.682, 1.633)) # alpha ) options$selectedRow <- 1 # select design -dataset <- NULL -results <- runAnalysis("doeResponseSurfaceMethodology", dataset, options) +results <- runAnalysis("doeResponseSurfaceMethodology", "debug.csv", options) test_that("3.1 Three Cont. Pred. Two. Disc. Pred. Central Composite Design table results match", { @@ -239,8 +236,7 @@ options$selectedDesign2 <- list( # give design list, always five lists, number o list(levels = c("Row 0", "Row 1"), name = "data 5", values = c(2, 2)) # alpha ) options$selectedRow <- 1 # select design -dataset <- NULL -results <- runAnalysis("doeResponseSurfaceMethodology", dataset, options) +results <- runAnalysis("doeResponseSurfaceMethodology", "debug.csv", options) test_that("4.1 Four Cont. Pred. One. Disc. Pred. Central Composite Design table results match", { @@ -310,8 +306,7 @@ options$selectedDesign2 <- list( # give design list, always five lists, number o ) options$selectedRow <- 1 # select design options$alphaType <- "faceCentered" -dataset <- NULL -results <- runAnalysis("doeResponseSurfaceMethodology", dataset, options) +results <- runAnalysis("doeResponseSurfaceMethodology", "debug.csv", options) test_that("5.1 Three Cont. Pred. Face Centered Central Composite Design table results match", { table <- results[["results"]][["designTable"]][["data"]] @@ -358,8 +353,7 @@ options$selectedDesign2 <- list( # give design list, always five lists, number o ) options$selectedRow <- 1 # select design options$alphaType <- "faceCentered" -dataset <- NULL -results <- runAnalysis("doeResponseSurfaceMethodology", dataset, options) +results <- runAnalysis("doeResponseSurfaceMethodology", "debug.csv", options) @@ -414,8 +408,7 @@ options$selectedDesign2 <- list( # give design list, always three lists, number list(levels = c("Row 0"), name = "data 3", values = c(3)) # centre points ) options$selectedRow <- 0 # select design -dataset <- NULL -results <- runAnalysis("doeResponseSurfaceMethodology", dataset, options) +results <- runAnalysis("doeResponseSurfaceMethodology", "debug.csv", options) test_that("7.1 Three Cont. Pred. Box-Behnken Design table results match", { table <- results[["results"]][["designTable"]][["data"]] @@ -461,8 +454,7 @@ options$selectedDesign2 <- list( # give design list, always three lists, number list(levels = c("Row 0"), name = "data 3", values = c(3)) # centre points ) options$selectedRow <- 0 # select design -dataset <- NULL -results <- runAnalysis("doeResponseSurfaceMethodology", dataset, options) +results <- runAnalysis("doeResponseSurfaceMethodology", "debug.csv", options) test_that("8.1 Four Cont. Pred. Box-Behnken Design table results match", { @@ -516,8 +508,7 @@ options$selectedDesign2 <- list( # give design list, always three lists, number list(levels = c("Row 0"), name = "data 3", values = c(3)) # centre points ) options$selectedRow <- 0 # select design -dataset <- NULL -results <- runAnalysis("doeResponseSurfaceMethodology", dataset, options) +results <- runAnalysis("doeResponseSurfaceMethodology", "debug.csv", options) test_that("9.1 Five Cont. Pred. Box-Behnken Design table results match", { table <- results[["results"]][["designTable"]][["data"]] @@ -582,8 +573,7 @@ options$selectedDesign2 <- list( # give design list, always three lists, number list(levels = c("Row 0"), name = "data 3", values = c(6)) # centre points ) options$selectedRow <- 0 # select design -dataset <- NULL -results <- runAnalysis("doeResponseSurfaceMethodology", dataset, options) +results <- runAnalysis("doeResponseSurfaceMethodology", "debug.csv", options) test_that("10.1 Six Cont. Pred. One Disc. Pred. Box-Behnken Design table results match", {