Skip to content

Commit

Permalink
Merge branch 'main' into 441-info-frac-driven-design-does-not-work-fo…
Browse files Browse the repository at this point in the history
…r-gs_design_wlr
  • Loading branch information
LittleBeannie authored Aug 23, 2024
2 parents e0e298d + 6c85d78 commit 42a310a
Show file tree
Hide file tree
Showing 15 changed files with 379 additions and 957 deletions.
10 changes: 5 additions & 5 deletions R/ahr_blinded.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ ahr_blinded <- function(
hr = c(1, .6),
ratio = 1) {
# Input checking
if (!is.vector(hr, mode = "numeric") || min(hr) <= 0) {
stop("ahr_blinded: hr must be a vector of positive numbers.")
if (!is.numeric(hr) || min(hr) <= 0) {
stop("'hr' must be a vector of positive numbers.")
}
if (!is.vector(intervals, mode = "numeric") || min(intervals) <= 0) {
stop("ahr_blinded: intervals must be a vector of positive numbers.")
if (!is.numeric(intervals) || min(intervals) <= 0) {
stop("'intervals' must be a vector of positive numbers.")
}
if (length(intervals) != length(hr)) {
stop("ahr_blinded: the piecewise model specified hr and intervals are not aligned.")
stop("the piecewise model specified 'hr' and 'intervals' differ in length.")
}

# Set final element of "intervals" to Inf
Expand Down
Loading

0 comments on commit 42a310a

Please sign in to comment.