Skip to content

Commit

Permalink
Merge pull request #50 from rpact-com/dev/4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fpahlke authored Aug 24, 2024
2 parents 0187716 + 4e46502 commit d229fc9
Show file tree
Hide file tree
Showing 106 changed files with 582 additions and 217 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.0.1.9248
Date: 2024-08-21
Version: 4.0.1.9250
Date: 2024-08-23
Authors@R: c(
person(
given = "Gernot",
Expand Down
9 changes: 9 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ S3method(as.list,Dictionary)
S3method(as.matrix,FieldSet)
S3method(as.vector,Dictionary)
S3method(fetch,ParameterSet)
S3method(kable,FieldSet)
S3method(kable,ParameterSet)
S3method(kable,array)
S3method(kable,character)
S3method(kable,data.frame)
S3method(kable,logical)
S3method(kable,matrix)
S3method(kable,numeric)
S3method(kable,table)
S3method(knit_print,FieldSet)
S3method(knit_print,ParameterSet)
S3method(knit_print,SummaryFactory)
S3method(length,TrialDesignSet)
Expand Down
19 changes: 10 additions & 9 deletions R/class_analysis_dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
## |
## | Contact us for information about our services: info@rpact.com
## |
## | File version: $Revision: 8052 $
## | Last changed: $Date: 2024-07-18 11:19:40 +0200 (Do, 18 Jul 2024) $
## | File version: $Revision: 8113 $
## | Last changed: $Date: 2024-08-21 10:25:39 +0200 (Mi, 21 Aug 2024) $
## | Last changed by: $Author: pahlke $
## |

Expand Down Expand Up @@ -286,11 +286,13 @@ writeDataset <- function(dataset, file, ..., append = FALSE, quote = TRUE, sep =
#' }
#'
#' @examples
#' \dontrun{
#' dataFile <- system.file("extdata", "datasets_rates.csv", package = "rpact")
#' if (dataFile != "") {
#' datasets <- readDatasets(dataFile)
#' datasets
#' }
#' }
#' @export
#'
readDatasets <- function(file, ..., header = TRUE, sep = ",", quote = "\"",
Expand Down Expand Up @@ -2250,7 +2252,7 @@ DatasetMeans <- R6::R6Class("DatasetMeans",
)

#' @examples
#'
#' \dontrun{
#' datasetExample <- getDataset(
#' means1 = c(112.3, 105.1, 121.3),
#' means2 = c(98.1, 99.3, 100.1),
Expand All @@ -2266,7 +2268,8 @@ DatasetMeans <- R6::R6Class("DatasetMeans",
#' randomDataParamName = "outcome", numberOfVisits = 3,
#' fixedCovariates = list(gender = c("f", "m"), bmi = c(17, 40))
#' )
#'
#' }
#'
#' @noRd
#'
.getRandomDataMeans <- function(dataset, ...,
Expand Down Expand Up @@ -2504,6 +2507,7 @@ DatasetMeans <- R6::R6Class("DatasetMeans",
#' @template return_object_ggplot
#'
#' @examples
#' \dontrun{
#' # Plot a dataset of means
#' dataExample <- getDataset(
#' n1 = c(22, 11, 22, 11),
Expand All @@ -2513,9 +2517,7 @@ DatasetMeans <- R6::R6Class("DatasetMeans",
#' stDevs1 = c(1, 2, 2, 1.3),
#' stDevs2 = c(1, 2, 2, 1.3)
#' )
#' \dontrun{
#' if (require(ggplot2)) plot(dataExample, main = "Comparison of Means")
#' }
#'
#' # Plot a dataset of rates
#' dataExample <- getDataset(
Expand All @@ -2524,7 +2526,6 @@ DatasetMeans <- R6::R6Class("DatasetMeans",
#' events1 = c(3, 5, 5, 6),
#' events2 = c(8, 10, 12, 12)
#' )
#' \dontrun{
#' if (require(ggplot2)) plot(dataExample, main = "Comparison of Rates")
#' }
#'
Expand All @@ -2534,7 +2535,7 @@ plot.Dataset <- function(x, y, ..., main = "Dataset", xlab = "Stage", ylab = NA_
legendTitle = "Group", palette = "Set1", showSource = FALSE, plotSettings = NULL) {
markdown <- .getOptionalArgument("markdown", ..., optionalArgumentDefaultValue = NA)
if (is.na(markdown)) {
markdown <- .isMarkdownEnabled()
markdown <- .isMarkdownEnabled("plot")
}

args <- list(
Expand Down Expand Up @@ -4255,7 +4256,7 @@ print.Dataset <- function(x, ..., markdown = NA, output = c("list", "long", "wid
datasetName <- deparse(fCall$x)

if (is.na(markdown)) {
markdown <- .isMarkdownEnabled()
markdown <- .isMarkdownEnabled("print")
}

output <- match.arg(output)
Expand Down
2 changes: 1 addition & 1 deletion R/class_analysis_results.R
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,7 @@ plot.AnalysisResults <- function(x, y, ..., type = 1L,
showSource = FALSE, grid = 1, plotSettings = NULL) {
markdown <- .getOptionalArgument("markdown", ..., optionalArgumentDefaultValue = NA)
if (is.na(markdown)) {
markdown <- .isMarkdownEnabled()
markdown <- .isMarkdownEnabled("plot")
}

args <- list(
Expand Down
11 changes: 4 additions & 7 deletions R/class_analysis_stage_results.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
## |
## | Contact us for information about our services: info@rpact.com
## |
## | File version: $Revision: 8023 $
## | Last changed: $Date: 2024-07-01 08:50:30 +0200 (Mo, 01 Jul 2024) $
## | File version: $Revision: 8113 $
## | Last changed: $Date: 2024-08-21 10:25:39 +0200 (Mi, 21 Aug 2024) $
## | Last changed by: $Author: pahlke $
## |

Expand Down Expand Up @@ -1520,21 +1520,18 @@ as.data.frame.StageResults <- function(x, row.names = NULL,
#' @template return_object_ggplot
#'
#' @examples
#' \dontrun{
#' design <- getDesignGroupSequential(
#' kMax = 4, alpha = 0.025,
#' informationRates = c(0.2, 0.5, 0.8, 1),
#' typeOfDesign = "WT", deltaWT = 0.25
#' )
#'
#' dataExample <- getDataset(
#' n = c(20, 30, 30),
#' means = c(50, 51, 55),
#' stDevs = c(130, 140, 120)
#' )
#'
#' stageResults <- getStageResults(design, dataExample, thetaH0 = 20)
#'
#' \dontrun{
#' if (require(ggplot2)) plot(stageResults, nPlanned = c(30), thetaRange = c(0, 100))
#' }
#'
Expand All @@ -1558,7 +1555,7 @@ plot.StageResults <- function(

markdown <- .getOptionalArgument("markdown", ..., optionalArgumentDefaultValue = NA)
if (is.na(markdown)) {
markdown <- .isMarkdownEnabled()
markdown <- .isMarkdownEnabled("plot")
}

args <- list(
Expand Down
Loading

0 comments on commit d229fc9

Please sign in to comment.