Skip to content

Commit 6a1ca3d

Browse files
committed
correct input checking
1 parent ae22747 commit 6a1ca3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/gs_info_ahr.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ gs_info_ahr <- function(enroll_rate = define_enroll_rate(duration = c(2, 2, 10),
111111
}
112112
# if both `analysis_time` and `event` are provided, check they are of same length
113113
if (!is.null(analysis_time) && !is.null(event)) {
114-
stop("gs_info_ahr(): If both event and analysis_time specified, must have same length")
114+
if (length(analysis_time) != length(event)) {
115+
stop("gs_info_ahr(): If both event and analysis_time specified, must have same length")
116+
}
115117
}
116118

117119
# -------------------------- #

0 commit comments

Comments
 (0)