Skip to content

Commit

Permalink
Merge pull request #71 from keaven/issue-68
Browse files Browse the repository at this point in the history
Dependency clean up and function lifecycle management
  • Loading branch information
keaven authored Oct 11, 2022
2 parents 1d23f2c + 703c663 commit f9994a3
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 922 deletions.
44 changes: 23 additions & 21 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
Package: gsDesign
Version: 3.3.0.9000
Version: 3.4.0
Title: Group Sequential Design
Authors@R: person(given = "Keaven", family = "Anderson", email =
"[email protected]", role = c('aut','cre'))
Description: Derives group sequential clinical trial designs and describes
their properties. Particular focus on time-to-event, binary, and
continuous outcomes. Largely based on methods described in
Jennison, Christopher and Turnbull, Bruce W., 2000,
"Group Sequential Methods with Applications to Clinical Trials"
ISBN: 0-8493-0316-8.
Authors@R: person(given = "Keaven", family = "Anderson", email =
"[email protected]", role = c('aut','cre'))
Depends: R (>= 3.5.0), ggplot2 (>= 0.9.2)
License: GPL (>= 3)
Copyright: Copyright 2010, Merck Research Laboratories
URL: https://keaven.github.io/gsDesign/, https://github.com/keaven/gsDesign
BugReports: https://github.com/keaven/gsDesign/issues
Encoding: UTF-8
Depends:
R (>= 3.5.0)
Imports:
stats,
dplyr,
ggplot2 (>= 0.9.2),
graphics,
magrittr,
rlang,
methods,
graphics,
tools,
dplyr,
rlang,
stats,
tidyr,
tools,
xtable
Suggests:
covr,
gridExtra,
gt,
kableExtra,
knitr,
scales,
mvtnorm,
ragg,
rmarkdown,
gt,
scales,
testthat,
covr,
gridExtra,
tibble,
utils,
mvtnorm,
gMCP,
kableExtra,
ragg
VignetteBuilder: knitr
Copyright: Copyright 2010, Merck Research Laboratories
RoxygenNote: 7.1.2
utils
VignetteBuilder:
knitr
RoxygenNote: 7.2.1
12 changes: 7 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# gsDesign 3.3.0.9000

- Removed restriction on gsCP() interim test statistic zi
# gsDesign 3.4.0 (October, 2022)

- Removed restriction on `gsCP()` interim test statistic zi (#63).
- Removed gMCP dependency. Updated vignettes and linked to vignettes in gMCPLite (#69).
- Added deprecation warning to `hGraph()` and suggested using `gMCPLite::hGraph()` instead (#70).
- Moved ggplot2 from `Depends` to `Imports` (#56).

# gsDesign 3.3.0 (May, 2022)

- Addition of vignettes
- Demonstrate cure model and calendar-based analysis timing for time-to-event endpoint design
- Vaccine efficacy design using spending bounds and exact binomial boundary crossing probabilities
- Demonstrate cure model and calendar-based analysis timing for time-to-event endpoint design
- Vaccine efficacy design using spending bounds and exact binomial boundary crossing probabilities
- Minor fix to labeling in print.gsProbability
- Fixed error in sfStep
- Updates to reduce R CMD check and other minor issues
Expand Down
30 changes: 4 additions & 26 deletions R/hgraph.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' @title Create multiplicity graphs using ggplot2
#'
#' @description \code{hGraph()} plots a multiplicity graph defined by user inputs.
#' The graph can also be used with the ***gMCP*** package to evaluate a set of nominal p-values for the tests of the hypotheses in the graph
#' The graph can also be used with the **gMCPLite** package to evaluate a set of nominal p-values for the tests of the hypotheses in the graph
#' @param nHypotheses number of hypotheses in graph
#' @param nameHypotheses hypothesis names
#' @param alphaHypotheses alpha-levels or weights for ellipses
Expand Down Expand Up @@ -30,31 +30,8 @@
#' @param wchar character for alphaHypotheses in ellipses
#' @return A `ggplot` object with a multi-layer multiplicity graph
#' @examples
#' library(tidyr)
#' # Defaults: note clockwise ordering
#' hGraph(5)
#' # Add colors (default is 3 gray shades)
#' hGraph(3,fill=1:3)
#' # Colorblind palette
#' cbPalette <- c("#999999", "#E69F00", "#56B4E9", "#009E73",
#' "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
#' hGraph(6,fill=as.factor(1:6),palette=cbPalette)
#' # Use a hue palette
#' hGraph(4,fill=factor(1:4),palette=scales::hue_pal(l=75)(4))
#' # different alpha allocation, hypothesis names and transitions
#' alphaHypotheses <- c(.005,.007,.013)
#' nameHypotheses <- c("ORR","PFS","OS")
#' m <- matrix(c(0,1,0,
#' 0,0,1,
#' 1,0,0),nrow=3,byrow=TRUE)
#' hGraph(3,alphaHypotheses=alphaHypotheses,nameHypotheses=nameHypotheses,m=m)
#' # Custom position and size of ellipses, change text to multi-line text
#' # Adjust box width
#' # add legend in middle of plot
#' hGraph(3,x=sqrt(0:2),y=c(1,3,1.5),size=6,halfWid=.3,halfHgt=.3, trhw=0.6,
#' palette=cbPalette[2:4], fill = c(1, 2, 2),
#' legend.position = c(.6,.5), legend.name = "Legend:", labels = c("Group 1", "Group 2"),
#' nameHypotheses=c("H1:\n Long name","H2:\n Longer name","H3:\n Longest name"))
#' # 'gsDesign::hGraph' is deprecated.
#' # See the examples in 'gMCPLite::hGraph' instead.
#' @details
#' See vignette **Multiplicity graphs formatting using ggplot2** for explanation of formatting.
#' @importFrom grDevices gray.colors
Expand Down Expand Up @@ -98,6 +75,7 @@ hGraph <- function(
# following is temporary fix from intended {'\u03b1'} for Windows
wchar = if(as.character(Sys.info()[1])=="Windows"){'w'}else{'w'}
){
.Deprecated("gMCPLite::hGraph", old = "gsDesign::hGraph")
#####################################################################
# Begin: Internal functions
#####################################################################
Expand Down
43 changes: 14 additions & 29 deletions man/hGraph.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/gsDesign_independent_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ Validate_comp_sprt_bnd <- function(alpha, beta, p0, p1, nmin, nmax) {
#-------------------------------------------------------------------------------
save_gg_plot <- function(code, width = 4, height = 4) {
path <- tempfile(fileext = ".png")
ggsave(path, plot = code, width = width, height = height, dpi = 72, units = "in")
ggplot2::ggsave(path, plot = code, width = width, height = height, dpi = 72, units = "in")
path
}

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-independent-test-hGraph.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source('../gsDesign_independent_code.R')
#-------------------------------------------------------------------------------
# hGraph : hGraph() plots a multiplicity graph defined by user inputs. The graph
# can also be used with the ***gMCP*** package to evaluate a set of
# can also be used with the **gMCPLite** package to evaluate a set of
# nominal p-values for the tests of the hypotheses in the graph
#-------------------------------------------------------------------------------

Expand Down
Loading

0 comments on commit f9994a3

Please sign in to comment.