Skip to content

Commit

Permalink
Values for LSL, USL, target labels and unit tests updates
Browse files Browse the repository at this point in the history
  • Loading branch information
JTPetter committed Oct 16, 2024
1 parent 19502db commit 862cb10
Show file tree
Hide file tree
Showing 56 changed files with 335 additions and 334 deletions.
9 changes: 5 additions & 4 deletions R/processCapabilityStudies.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 862cb10

Please sign in to comment.