From 3a4cb8ee826a08de8d90bbfc3a27f5a532764fa3 Mon Sep 17 00:00:00 2001 From: JTPetter <61797391+JTPetter@users.noreply.github.com> Date: Fri, 11 Oct 2024 16:46:39 +0200 Subject: [PATCH] Attributes chart and type 1 study data loading --- R/attributesCharts.R | 6 -- R/doeAnalysis.R | 10 +-- R/msaType1Gauge.R | 4 +- inst/Description.qml | 1 + tests/testthat/SPC_P.csv | 21 ------ .../{ => datasets/attributeCharts}/SPC_NP.csv | 0 .../datasets/attributeCharts/SPC_P.csv | 21 ++++++ tests/testthat/test-attributesCharts.R | 15 ++-- tests/testthat/test-doeAnalysis.R | 68 +++++++++++++++++++ tests/testthat/test-msaType1Gauge.R | 5 ++ 10 files changed, 110 insertions(+), 41 deletions(-) delete mode 100644 tests/testthat/SPC_P.csv rename tests/testthat/{ => datasets/attributeCharts}/SPC_NP.csv (100%) create mode 100644 tests/testthat/datasets/attributeCharts/SPC_P.csv diff --git a/R/attributesCharts.R b/R/attributesCharts.R index a306c785..db99cc8d 100644 --- a/R/attributesCharts.R +++ b/R/attributesCharts.R @@ -23,16 +23,10 @@ attributesCharts <- function(jaspResults, dataset, options) { D <- options[["defectiveOrDefect"]] timeStamp <- options$timeStamp - numeric_variables <- c(total, D) - numeric_variables <- numeric_variables[numeric_variables != ""] - # Data reading - if (is.null(dataset)) if (!identical(timeStamp, "")) { - dataset <- .readDataSetToEnd(columns.as.numeric = numeric_variables, columns.as.factor = timeStamp) xLabs <- as.vector(dataset[, timeStamp]) } else { - dataset <- .readDataSetToEnd(columns.as.numeric = numeric_variables) xLabs <- NULL } diff --git a/R/doeAnalysis.R b/R/doeAnalysis.R index 13f1b7c3..cafc4366 100644 --- a/R/doeAnalysis.R +++ b/R/doeAnalysis.R @@ -36,9 +36,12 @@ doeAnalysis <- function(jaspResults, dataset, options, ...) { dependent <- options[["dependentResponseSurface"]] } - dataset <- .doeAnalysisReadData(dataset, options, continuousPredictors, discretePredictors, blocks, covariates, dependent) + dataset <- na.omit(dataset) + + if (length(blocks) > 0 && !identical(blocks, "")) # name of variable should always be "Block" + names(dataset)[names(dataset) == blocks] <- "Block" - if (length(blocks) > 0 && !identical(blocks, "")) # data reading function renames the block variable to "block" + if (length(blocks) > 0 && !identical(blocks, "")) blocks <- "Block" .doeAnalysisCheckErrors(dataset, options, continuousPredictors, discretePredictors, blocks, covariates, dependent, ready) @@ -95,8 +98,7 @@ doeAnalysis <- function(jaspResults, dataset, options, ...) { dataset <- .readDataSetToEnd(columns.as.numeric = numericVars, columns.as.factor = factorVars) dataset <- na.omit(dataset) - if (length(blocks) > 0 && !identical(blocks, "")) # name of variable should always be "Block" - names(dataset)[names(dataset) == blocks] <- "Block" + return(dataset) } diff --git a/R/msaType1Gauge.R b/R/msaType1Gauge.R index b01604bd..1e0590c0 100644 --- a/R/msaType1Gauge.R +++ b/R/msaType1Gauge.R @@ -23,9 +23,7 @@ msaType1Gauge <- function(jaspResults, dataset, options, ...) { ready <- (length(measurements) != 0) - if (is.null(dataset)) { - dataset <- .readDataSetToEnd(columns.as.numeric = measurements, exclude.na.listwise = measurements) - } + dataset <- jaspBase::excludeNaListwise(dataset, columns = measurements) # Bias Run Chart if (options[["runChart"]]) { diff --git a/inst/Description.qml b/inst/Description.qml index 7babc83f..e4a64110 100644 --- a/inst/Description.qml +++ b/inst/Description.qml @@ -12,6 +12,7 @@ Description website: "https://github.com/jasp-stats/jaspQualityControl" license: "GPL (>= 2)" icon: "qualityControl-module.svg" + preloadData: true GroupTitle { diff --git a/tests/testthat/SPC_P.csv b/tests/testthat/SPC_P.csv deleted file mode 100644 index 781cdc0b..00000000 --- a/tests/testthat/SPC_P.csv +++ /dev/null @@ -1,21 +0,0 @@ -"","ï..Month","Size","D","Proportion" -"1","Sep",150,21,0.14 -"2","Oct",153,16,0.105 -"3","Nov",170,30,0.176 -"4","Dec",226,31,0.137 -"5","Jan",154,24,0.156 -"6","Feb",130,33,0.254 -"7","Mar",190,32,0.168 -"8","Apr",165,29,0.176 -"9","May",176,23,0.131 -"10","Jun",144,17,0.118 -"11","Jul",132,14,0.106 -"12","Aug",144,31,0.215 -"13","Sep",156,29,0.186 -"14","Oct",158,25,0.158 -"15","Nov",142,15,0.106 -"16","Dec",212,43,0.203 -"17","Jan",155,20,0.129 -"18","Feb",138,26,0.188 -"19","Mar",141,23,0.163 -"20","Apr",130,28,0.215 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/datasets/attributeCharts/SPC_P.csv b/tests/testthat/datasets/attributeCharts/SPC_P.csv new file mode 100644 index 00000000..6f365a8e --- /dev/null +++ b/tests/testthat/datasets/attributeCharts/SPC_P.csv @@ -0,0 +1,21 @@ +,Month,Size,D,Proportion +1,Sep,150,21,0.14 +2,Oct,153,16,0.105 +3,Nov,170,30,0.176 +4,Dec,226,31,0.137 +5,Jan,154,24,0.156 +6,Feb,130,33,0.254 +7,Mar,190,32,0.168 +8,Apr,165,29,0.176 +9,May,176,23,0.131 +10,Jun,144,17,0.118 +11,Jul,132,14,0.106 +12,Aug,144,31,0.215 +13,Sep,156,29,0.186 +14,Oct,158,25,0.158 +15,Nov,142,15,0.106 +16,Dec,212,43,0.203 +17,Jan,155,20,0.129 +18,Feb,138,26,0.188 +19,Mar,141,23,0.163 +20,Apr,130,28,0.215 diff --git a/tests/testthat/test-attributesCharts.R b/tests/testthat/test-attributesCharts.R index dbdb499b..fbc0d424 100644 --- a/tests/testthat/test-attributesCharts.R +++ b/tests/testthat/test-attributesCharts.R @@ -4,11 +4,12 @@ context("[Quality Control] Attributes Charts") # NP options <- analysisOptions("attributesCharts") options$defectiveOrDefect <- "D" +options$defectiveOrDefect.types <- "scale" 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 +26,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 +36,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 +49,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 +65,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 +75,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 +85,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-doeAnalysis.R b/tests/testthat/test-doeAnalysis.R index 2fd1cd41..7c9bec22 100644 --- a/tests/testthat/test-doeAnalysis.R +++ b/tests/testthat/test-doeAnalysis.R @@ -10,6 +10,8 @@ context("[Quality Control] DoE Analysis") options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("A", "B") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -64,6 +66,8 @@ test_that("1.4 Two factors full factorial Model Summary table results match", { options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("A", "B", "C", "D", "E") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -175,6 +179,9 @@ options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("A", "B", "C", "D", "E") options$covariates <- "Covariate" +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" +options$covariates.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -292,6 +299,8 @@ test_that("3.4 Five factors full factorial with covariates Model Summary table r options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("A", "B", "C", "D", "E") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -367,6 +376,8 @@ test_that("4.4 Five factors fractional factorial Model Summary table results mat options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("A", "B", "C", "D", "E", "F", "G", "H", "J") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -606,6 +617,8 @@ test_that("5.4 Nine factors highest factorial Model Summary table results match" options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("A", "B", "C", "D", "E", "F", "G", "H", "J") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -727,6 +740,8 @@ test_that("6.4 Nine factors smallest fractional Model Summary table results matc options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$continuousFactorsFactorial <- c("A", "B", "C") +options$dependentFactorial.types <- "scale" +options$continuousFactorsFactorial.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -804,6 +819,8 @@ test_that("7.4 One center point Model Summary table results match", { options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$continuousFactorsFactorial <- c("A", "B", "C") +options$dependentFactorial.types <- "scale" +options$continuousFactorsFactorial.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -880,6 +897,8 @@ test_that("8.4 Two center points Model Summary table results match", { options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$continuousFactorsFactorial <- c("A", "B", "C") +options$dependentFactorial.types <- "scale" +options$continuousFactorsFactorial.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -957,6 +976,9 @@ options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$continuousFactorsFactorial <- c("A", "B", "C") options$blocksFactorial <- "Blocks" +options$dependentFactorial.types <- "scale" +options$continuousFactorsFactorial.types <- "scale" +options$blocksFactorial.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -1076,6 +1098,8 @@ test_that("10.4 Two blocks Model Summary table results match", { options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("AHTC", "B") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -1130,6 +1154,8 @@ test_that("13.4 Two factor one HTC Model Summary table results match", { options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("AHTC", "BHTC", "C", "D", "E") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -1241,6 +1267,8 @@ test_that("14.4 Five factor two HTC Model Summary table results match", { options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("AHTC", "BHTC", "CHTC", "D", "E", "F", "G") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -1406,6 +1434,8 @@ test_that("15.4 Seven factor three HTC Model Summary table results match", { options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("A", "B", "C") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- FALSE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -1504,6 +1534,8 @@ test_that("16.5 Three factors three levelsModel Summary table results match", { options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("A", "B", "C") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- FALSE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -1614,6 +1646,8 @@ test_that("17.5 Three factors 2*three and 1*four levels Model Summary table resu options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("A", "B", "C", "D") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- FALSE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -1832,6 +1866,8 @@ options <- analysisOptions("doeAnalysis") options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B", "C") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( @@ -1914,6 +1950,8 @@ options <- analysisOptions("doeAnalysis") options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B", "C", "D", "E") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( @@ -2034,6 +2072,9 @@ options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B", "C") options$fixedFactorsResponseSurface <- c("D", "E") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" +options$fixedFactorsResponseSurface.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( @@ -2147,6 +2188,9 @@ options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B", "C", "D") options$fixedFactorsResponseSurface <- c("E") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" +options$fixedFactorsResponseSurface.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( @@ -2262,6 +2306,8 @@ options <- analysisOptions("doeAnalysis") options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B", "C") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( @@ -2341,6 +2387,8 @@ options <- analysisOptions("doeAnalysis") options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B", "C", "D") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( @@ -2439,6 +2487,8 @@ options <- analysisOptions("doeAnalysis") options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B", "C", "D", "E") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( @@ -2556,6 +2606,9 @@ options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B", "C", "D", "E", "F") options$fixedFactorsResponseSurface <- c("G") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" +options$fixedFactorsResponseSurface.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( @@ -2722,6 +2775,8 @@ test_that("26.4 Six continuous predictors one discrete predictor BBD Model Summa options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("A", "B", "C", "D", "E") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- TRUE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -2876,6 +2931,8 @@ options <- analysisOptions("doeAnalysis") options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B", "C", "D", "E") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( @@ -2962,6 +3019,8 @@ options <- analysisOptions("doeAnalysis") options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B", "C", "D", "E") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( @@ -3050,6 +3109,8 @@ options <- analysisOptions("doeAnalysis") options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B", "C", "D") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( @@ -3129,6 +3190,8 @@ options <- analysisOptions("doeAnalysis") options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B", "C", "D") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" options$codeFactors <- TRUE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( @@ -3206,6 +3269,8 @@ test_that("31.4 Uncoded Squared Terms Model Summary table results match", { options <- analysisOptions("doeAnalysis") options$dependentFactorial <- "Result" options$fixedFactorsFactorial <- c("A", "B", "C") +options$dependentFactorial.types <- "scale" +options$fixedFactorsFactorial.types <- "nominal" options$codeFactors <- FALSE options$codeFactorsMethod <- "automatic" options$tableEquation <- TRUE @@ -3284,6 +3349,9 @@ options$designType <- "responseSurfaceDesign" options$dependentResponseSurface <- "Result" options$continuousFactorsResponseSurface <- c("A", "B") options$fixedFactorsResponseSurface <- c("C", "D") +options$dependentResponseSurface.types <- "scale" +options$continuousFactorsResponseSurface.types <- "scale" +options$fixedFactorsResponseSurface.types <- "nominal" options$codeFactors <- FALSE options$codeFactorsMethod <- "manual" options$codeFactorsManualTable <- list( diff --git a/tests/testthat/test-msaType1Gauge.R b/tests/testthat/test-msaType1Gauge.R index b2aa2de6..8bc6eaf6 100644 --- a/tests/testthat/test-msaType1Gauge.R +++ b/tests/testthat/test-msaType1Gauge.R @@ -8,6 +8,7 @@ set.seed(1) options <- analysisOptions("msaType1Gauge") options$measurement <- "dm" +options$measurement.types <- "scale" options$referenceValue <- -4 options$toleranceRange <- 15 options$histogram <- TRUE @@ -51,6 +52,7 @@ test_that("1.5 Standard settings - t-test of observed bias against 0 table resul options <- analysisOptions("msaType1Gauge") options$measurement <- "dm" +options$measurement.types <- "scale" options$referenceValue <- -4 options$toleranceRange <- 15 options$histogram <- TRUE @@ -97,6 +99,7 @@ test_that("2.5 Alternative settings - t-test of observed bias against 0 table re options <- analysisOptions("msaType1Gauge") options$measurement <- "dmMissing1" +options$measurement.types <- "scale" options$referenceValue <- -4 options$toleranceRange <- 15 options$histogram <- TRUE @@ -140,6 +143,7 @@ test_that("3.5 Missing 1 value - t-test of observed bias against 0 table results options <- analysisOptions("msaType1Gauge") options$measurement <- "dmMissing25" +options$measurement.types <- "scale" options$referenceValue <- -4 options$toleranceRange <- 15 options$histogram <- TRUE @@ -183,6 +187,7 @@ test_that("4.5 Missing half values - t-test of observed bias against 0 table res options <- analysisOptions("msaType1Gauge") options$measurement <- "dmMissing49" +options$measurement.types <- "scale" options$referenceValue <- -4 options$toleranceRange <- 15 options$histogram <- TRUE