Skip to content

Commit

Permalink
Summary heading default base number set to -2L
Browse files Browse the repository at this point in the history
  • Loading branch information
fpahlke committed Mar 22, 2024
1 parent c17286f commit 4bc2642
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 6 additions & 5 deletions R/class_core_parameter_set.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,22 @@ FieldSet <- R6::R6Class("FieldSet",
line <- paste0(args, collapse = sep)
listItemEnabled <- grepl("^ ", line)

headingBaseNumber <- as.integer(getOption("rpact.print.heading.base.number", 0L))
headingBaseNumber <- as.integer(getOption("rpact.print.heading.base.number",
C_HEADING_BASE_NUMBER_DEFAULT))
if (is.na(headingBaseNumber)) {
headingBaseNumber <- 0L
headingBaseNumber <- C_HEADING_BASE_NUMBER_DEFAULT
}
if (headingBaseNumber < -2) {
warning(
"Illegal option ", sQuote("rpact.print.heading.base.number"),
" (", headingBaseNumber, ") was set to 0"
" (", headingBaseNumber, ") was set to ", C_HEADING_BASE_NUMBER_DEFAULT
)
headingBaseNumber <- 0L
headingBaseNumber <- C_HEADING_BASE_NUMBER_DEFAULT
}
if (headingBaseNumber > 4) {
warning(
"Illgeal option ", sQuote("rpact.print.heading.base.number"),
" (", headingBaseNumber, ") was set to 4 becasue it was too large"
" (", headingBaseNumber, ") was set to 4 because it was too large"
)
headingBaseNumber <- 4L
}
Expand Down
2 changes: 2 additions & 0 deletions R/f_core_constants.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ C_ACCEPT_DEVIATION_INFORMATIONRATES <- 0.05
C_THETA_RANGE_SEQUENCE_LENGTH_DEFAULT <- 50
C_VARIED_PARAMETER_SEQUENCE_LENGTH_DEFAULT <- 30

C_HEADING_BASE_NUMBER_DEFAULT <- -2L

C_CLASS_NAME_TRIAL_DESIGN_GROUP_SEQUENTIAL <- "TrialDesignGroupSequential"
C_CLASS_NAME_TRIAL_DESIGN_INVERSE_NORMAL <- "TrialDesignInverseNormal"
C_CLASS_NAME_TRIAL_DESIGN_FISHER <- "TrialDesignFisher"
Expand Down

0 comments on commit 4bc2642

Please sign in to comment.