diff --git a/DESCRIPTION b/DESCRIPTION index 6405f64c..5b2bdb1b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: gsDesign -Version: 3.6.0.2 +Version: 3.6.0.3 Title: Group Sequential Design Authors@R: person(given = "Keaven", family = "Anderson", email = "keaven_anderson@merck.com", role = c('aut','cre')) diff --git a/R/gsqplot.R b/R/gsqplot.R index cd4f8f6c..0b357b05 100644 --- a/R/gsqplot.R +++ b/R/gsqplot.R @@ -815,8 +815,8 @@ plotASN <- function(x, xlab = NULL, ylab = NULL, main = NULL, theta = NULL, xval #' @param offset Integer to offset the numeric labels of the "Analysis" legend #' (default: 0). Only relevant for \code{outtype = 1}. By default will change #' legend title to "Future Analysis". To customize the title, pass the label -#' to the argument \code{titleAnalysisCustom} -#' @param titleAnalysisCustom Label to use as the title for the "Analysis" +#' to the argument \code{titleAnalysisLegend} +#' @param titleAnalysisLegend Label to use as the title for the "Analysis" #' legend (default: NULL) # plotgsPower function [sinew] ---- plotgsPower <- function(x, main = "Boundary crossing probabilities by effect size", @@ -824,12 +824,12 @@ plotgsPower <- function(x, main = "Boundary crossing probabilities by effect siz xlab = NULL, lty = NULL, col = NULL, lwd = 1, cex = 1, theta = if (inherits(x, "gsDesign")) seq(0, 2, .05) * x$delta else x$theta, xval = NULL, base = FALSE, outtype = 1, offset = 0, - titleAnalysisCustom = NULL, ...) { + titleAnalysisLegend = NULL, ...) { stopifnot( is.numeric(offset) && length(offset) == 1, - is.null(titleAnalysisCustom) || - (is.character(titleAnalysisCustom) && length(titleAnalysisCustom) == 1) + is.null(titleAnalysisLegend) || + (is.character(titleAnalysisLegend) && length(titleAnalysisLegend) == 1) ) if (is.null(xval)) { if (inherits(x, "gsDesign")) { @@ -879,8 +879,8 @@ plotgsPower <- function(x, main = "Boundary crossing probabilities by effect siz if (offset > 0) { titleAnalysis <- "Future Analysis" } - if (!is.null(titleAnalysisCustom)) { - titleAnalysis <- titleAnalysisCustom + if (!is.null(titleAnalysisLegend)) { + titleAnalysis <- titleAnalysisLegend } y2$delta <- xval[y$thetaidx] diff --git a/tests/testthat/test-independent-test-plotgsPower.R b/tests/testthat/test-independent-test-plotgsPower.R index ca87dcfd..40fdc867 100644 --- a/tests/testthat/test-independent-test-plotgsPower.R +++ b/tests/testthat/test-independent-test-plotgsPower.R @@ -136,14 +136,14 @@ test_that(desc = 'Test: plotgsPower graphs can use offset arg for Future Analysi ) # Enable custom legend title - plotobj <- plotgsPower(x, titleAnalysisCustom = "custom") + plotobj <- plotgsPower(x, titleAnalysisLegend = "custom") expect_equal( plotobj[["plot_env"]][["titleAnalysis"]], "custom" ) - plotobj <- plotgsPower(x, offset = 1, titleAnalysisCustom = "custom") + plotobj <- plotgsPower(x, offset = 1, titleAnalysisLegend = "custom") expect_equal( plotobj[["plot_env"]][["titleAnalysis"]],