Skip to content

Commit

Permalink
Merge pull request #72 from rpact-com/dev/4.1.1
Browse files Browse the repository at this point in the history
README updated
  • Loading branch information
fpahlke authored Jan 31, 2025
2 parents a6516fa + 863a6c0 commit dd4318f
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 28 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rpact
Title: Confirmatory Adaptive Clinical Trial Design and Analysis
Version: 4.1.1.9279
Date: 2025-01-27
Version: 4.1.1.9280
Date: 2025-01-28
Authors@R: c(
person(
given = "Gernot",
Expand Down
17 changes: 9 additions & 8 deletions R/class_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
## |
## | Contact us for information about our services: [email protected]
## |
## | File version: $Revision: 8508 $
## | Last changed: $Date: 2025-01-24 09:01:34 +0100 (Fr, 24 Jan 2025) $
## | File version: $Revision: 8518 $
## | Last changed: $Date: 2025-01-29 15:42:08 +0100 (Mi, 29 Jan 2025) $
## | Last changed by: $Author: pahlke $
## |

Expand Down Expand Up @@ -1008,7 +1008,7 @@ SummaryFactory <- R6::R6Class("SummaryFactory",
}
}

if (any(is.nan(formattedValue)) || any(trimws(formattedValue) == "NaN")) {
if (any(is.nan(formattedValue), na.rm = TRUE) || any(trimws(formattedValue) == "NaN", na.rm = TRUE)) {
formattedValue[is.nan(formattedValue) | trimws(formattedValue) == "NaN"] <- NA_real_
showNA <- TRUE
}
Expand Down Expand Up @@ -1922,7 +1922,7 @@ SummaryFactory <- R6::R6Class("SummaryFactory",
if (!.isDelayedInformationEnabled(design = design) &&
((.isTrialDesignInverseNormalOrGroupSequential(design) &&
any(design$futilityBounds > C_FUTILITY_BOUNDS_DEFAULT, na.rm = TRUE)) ||
(.isTrialDesignFisher(design) && any(design$alpha0Vec < 1)))) {
(.isTrialDesignFisher(design) && any(design$alpha0Vec < 1, na.rm = TRUE)))) {
header <- .concatenateSummaryText(
header,
paste0(ifelse(design$bindingFutility, "binding", "non-binding"), " futility")
Expand Down Expand Up @@ -3224,7 +3224,7 @@ SummaryFactory <- R6::R6Class("SummaryFactory",
)

if (.isTrialDesignFisher(design)) {
if (any(design$alpha0Vec < 1)) {
if (any(design$alpha0Vec < 1, na.rm = TRUE)) {
summaryFactory$addParameter(design,
parameterName = "alpha0Vec",
parameterCaption = "Futility boundary (separate p-value scale)",
Expand All @@ -3233,7 +3233,7 @@ SummaryFactory <- R6::R6Class("SummaryFactory",
)
}
} else {
if (any(design$futilityBounds > C_FUTILITY_BOUNDS_DEFAULT)) {
if (any(design$futilityBounds > C_FUTILITY_BOUNDS_DEFAULT, na.rm = TRUE)) {
summaryFactory$addParameter(design,
parameterName = "futilityBounds",
parameterCaption = .getSummaryParameterCaptionFutilityBounds(design),
Expand Down Expand Up @@ -3892,7 +3892,7 @@ SummaryFactory <- R6::R6Class("SummaryFactory",
probsH1$rejectPerStage <- probsH1$rejectPerStage[1:(design$kMax - 1)]
}

if (any(design$futilityBounds > C_FUTILITY_BOUNDS_DEFAULT)) {
if (any(design$futilityBounds > C_FUTILITY_BOUNDS_DEFAULT, na.rm = TRUE)) {
if (is.matrix(probsH1$earlyStop)) {
probsH1$earlyStop <- matrix(probsH1$earlyStop[1:(design$kMax - 1), ],
ncol = ncol(probsH1$earlyStop)
Expand Down Expand Up @@ -3983,7 +3983,8 @@ SummaryFactory <- R6::R6Class("SummaryFactory",
if (any(design$futilityBounds > C_FUTILITY_BOUNDS_DEFAULT, na.rm = TRUE) &&
!is.null(designPlan[["futilityPerStage"]]) &&
!any(is.na(designPlan[["futilityPerStage"]])) &&
any(designPlan$futilityPerStage != 0) && any(designPlan$futilityPerStage > 1e-08)) {
any(designPlan$futilityPerStage != 0) &&
any(designPlan$futilityPerStage > 1e-08)) {
summaryFactory$addParameter(designPlan,
parameterName = "futilityPerStage",
parameterCaption = "Exit probability for futility", # under H1
Expand Down
4 changes: 2 additions & 2 deletions R/f_core_utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
## |
## | Contact us for information about our services: [email protected]
## |
## | File version: $Revision: 8473 $
## | Last changed: $Date: 2025-01-13 18:47:32 +0100 (Mo, 13 Jan 2025) $
## | File version: $Revision: 8518 $
## | Last changed: $Date: 2025-01-29 15:42:08 +0100 (Mi, 29 Jan 2025) $
## | Last changed by: $Author: pahlke $
## |

Expand Down
54 changes: 48 additions & 6 deletions R/f_design_group_sequential.R
Original file line number Diff line number Diff line change
Expand Up @@ -1038,13 +1038,34 @@ getDesignInverseNormal <- function(...,
sided = 1L, # C_SIDED_DEFAULT
informationRates = NA_real_,
futilityBounds = NA_real_,
typeOfDesign = c("OF", "P", "WT", "PT", "HP", "WToptimum", "asP", "asOF", "asKD", "asHSD", "asUser", "noEarlyEfficacy"), # C_DEFAULT_TYPE_OF_DESIGN,
typeOfDesign = c(
"OF",
"P",
"WT",
"PT",
"HP",
"WToptimum",
"asP",
"asOF",
"asKD",
"asHSD",
"asUser",
"noEarlyEfficacy"), # C_DEFAULT_TYPE_OF_DESIGN,
deltaWT = NA_real_,
deltaPT1 = NA_real_,
deltaPT0 = NA_real_,
optimizationCriterion = c("ASNH1", "ASNIFH1", "ASNsum"), # C_OPTIMIZATION_CRITERION_DEFAULT
optimizationCriterion = c(
"ASNH1",
"ASNIFH1",
"ASNsum"), # C_OPTIMIZATION_CRITERION_DEFAULT
gammaA = NA_real_,
typeBetaSpending = c("none", "bsP", "bsOF", "bsKD", "bsHSD", "bsUser"), # C_TYPE_OF_DESIGN_BS_NONE
typeBetaSpending = c(
"none",
"bsP",
"bsOF",
"bsKD",
"bsHSD",
"bsUser"), # C_TYPE_OF_DESIGN_BS_NONE
userAlphaSpending = NA_real_,
userBetaSpending = NA_real_,
gammaB = NA_real_,
Expand Down Expand Up @@ -1713,13 +1734,34 @@ getDesignGroupSequential <- function(
sided = 1L, # C_SIDED_DEFAULT
informationRates = NA_real_,
futilityBounds = NA_real_,
typeOfDesign = c("OF", "P", "WT", "PT", "HP", "WToptimum", "asP", "asOF", "asKD", "asHSD", "asUser", "noEarlyEfficacy"), # C_DEFAULT_TYPE_OF_DESIGN,
typeOfDesign = c(
"OF",
"P",
"WT",
"PT",
"HP",
"WToptimum",
"asP",
"asOF",
"asKD",
"asHSD",
"asUser",
"noEarlyEfficacy"), # C_DEFAULT_TYPE_OF_DESIGN,
deltaWT = NA_real_,
deltaPT1 = NA_real_,
deltaPT0 = NA_real_,
optimizationCriterion = c("ASNH1", "ASNIFH1", "ASNsum"), # C_OPTIMIZATION_CRITERION_DEFAULT
optimizationCriterion = c(
"ASNH1",
"ASNIFH1",
"ASNsum"), # C_OPTIMIZATION_CRITERION_DEFAULT
gammaA = NA_real_,
typeBetaSpending = c("none", "bsP", "bsOF", "bsKD", "bsHSD", "bsUser"), # C_TYPE_OF_DESIGN_BS_NONE
typeBetaSpending = c(
"none",
"bsP",
"bsOF",
"bsKD",
"bsHSD",
"bsUser"), # C_TYPE_OF_DESIGN_BS_NONE
userAlphaSpending = NA_real_,
userBetaSpending = NA_real_,
gammaB = NA_real_,
Expand Down
6 changes: 3 additions & 3 deletions R/f_design_plan_survival.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
## |
## | Contact us for information about our services: [email protected]
## |
## | File version: $Revision: 8416 $
## | Last changed: $Date: 2024-11-18 16:13:44 +0100 (Mo, 18 Nov 2024) $
## | File version: $Revision: 8518 $
## | Last changed: $Date: 2025-01-29 15:42:08 +0100 (Mi, 29 Jan 2025) $
## | Last changed by: $Author: pahlke $
## |

Expand Down Expand Up @@ -1512,7 +1512,7 @@ NULL
}

if (!is.null(designCharacteristics$futilityProbabilities) &&
any(designPlan$.design$futilityBounds != C_FUTILITY_BOUNDS_DEFAULT)) {
any(designPlan$.design$futilityBounds != C_FUTILITY_BOUNDS_DEFAULT, na.rm = TRUE)) {
designPlan$futilityPerStage <- matrix(designCharacteristics$futilityProbabilities,
nrow = designPlan$.design$kMax - 1
)
Expand Down
6 changes: 3 additions & 3 deletions R/f_design_plan_utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
## |
## | Contact us for information about our services: [email protected]
## |
## | File version: $Revision: 8225 $
## | Last changed: $Date: 2024-09-18 09:38:40 +0200 (Mi, 18 Sep 2024) $
## | File version: $Revision: 8518 $
## | Last changed: $Date: 2025-01-29 15:42:08 +0100 (Mi, 29 Jan 2025) $
## | Last changed by: $Author: pahlke $
## |

Expand Down Expand Up @@ -243,7 +243,7 @@ NULL
designPlan$.setParameterType("earlyStop", C_PARAM_GENERATED)
}
if (!is.null(sampleSizeSequential$futilityPerStage) &&
any(designPlan$.design$futilityBounds != C_FUTILITY_BOUNDS_DEFAULT)) {
any(designPlan$.design$futilityBounds != C_FUTILITY_BOUNDS_DEFAULT, na.rm = TRUE)) {
designPlan$futilityPerStage <- matrix(sampleSizeSequential$futilityPerStage,
nrow = designPlan$.design$kMax - 1
)
Expand Down
4 changes: 2 additions & 2 deletions R/f_quality_assurance.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
## |
## | Contact us for information about our services: [email protected]
## |
## | File version: $Revision: 8482 $
## | Last changed: $Date: 2025-01-15 16:25:01 +0100 (Mi, 15 Jan 2025) $
## | File version: $Revision: 8518 $
## | Last changed: $Date: 2025-01-29 15:42:08 +0100 (Mi, 29 Jan 2025) $
## | Last changed by: $Author: pahlke $
## |

Expand Down
5 changes: 5 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ The documentation is hosted at [www.rpact.org](https://www.rpact.org)
The vignettes are hosted at
[www.rpact.org/vignettes](https://www.rpact.org/vignettes/)

## RPACT Connect

Connecting you to insights, downloads, and premium support:
[connect.rpact.com](https://connect.rpact.com)

## The rpact user group

The *rpact project* has an active user group consisting of decision-makers and
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ The documentation is hosted at [www.rpact.org](https://www.rpact.org)
The vignettes are hosted at
[www.rpact.org/vignettes](https://www.rpact.org/vignettes/)

## RPACT Connect

Connecting you to insights, downloads, and premium support:
[connect.rpact.com](https://connect.rpact.com)

## The rpact user group

The *rpact project* has an active user group consisting of
Expand Down
15 changes: 15 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
url: https://rpact-com.github.io/rpact/

template:
bootstrap: 5
includes:
in_header: |
<meta name="keywords" content="rpact, adaptive designs, clinical trials, simulation, analysis, rstats, Shiny, r-project, R package"/>
<link href="reference/figures/favicon.ico" rel="icon"/>
<link href="reference/figures/favicon.ico" rel="apple-touch-icon"/>
<link href="reference/figures/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon"/>
home:
links:
- text: RPACT Connect
href: https://connect.rpact.com
- text: RPACT Cloud
href: https://cloud.rpact.com
- text: rpact R package website
href: https://www.rpact.org
4 changes: 2 additions & 2 deletions inst/doc/rpact_getting_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<meta name="author" content="Friedrich Pahlke and Gernot Wassmer" />

<meta name="date" content="2025-01-24" />
<meta name="date" content="2025-01-28" />

<title>Getting started with rpact</title>

Expand Down Expand Up @@ -239,7 +239,7 @@

<h1 class="title toc-ignore">Getting started with rpact</h1>
<h4 class="author">Friedrich Pahlke and Gernot Wassmer</h4>
<h4 class="date">2025-01-24</h4>
<h4 class="date">2025-01-28</h4>



Expand Down
Binary file added man/figures/favicon.ico
Binary file not shown.

0 comments on commit dd4318f

Please sign in to comment.