Skip to content

Commit 3c78c3a

Browse files
author
NightlordTW
committed
fix calculation of no. of endpoints
1 parent 9e05e52 commit 3c78c3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/helper.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ print.simss <- function(x, ...) {
2121
output <- data.frame(Parameter = c("Total Sample Size", "Achieved Power", "Power Confidence Interval"),
2222
Value = c(sst, 100*power, paste0(100*lpower, " - ", 100*upower)))
2323

24-
message("Sample Size Calculation Results")
24+
cat("Sample Size Calculation Results\n")
2525
cat("-------------------------------------------------------------\n")
2626
cat(paste0("Study Design: ", x$param.d$dtype, " trial targeting ",100*tpower,"% power with a ",100*alpha, "% type-I error.\n"))
2727
cat("Endpoints Tested:\n")
2828
for (i in 1:length(x$param$list_comparator)) {
29-
nendp <- length(x$param$list_comparator[[i]])
29+
nendp <- length(x$param$list_y_comparator[[i]])
3030
str <- paste0(" - ", paste(x$param$list_comparator[[i]], collapse = " vs. "), ": ",
3131
paste(x$param$list_y_comparator[[i]], collapse = ", "))
3232
if (nendp > 1 & x$param.d$k[i] < nendp) {

0 commit comments

Comments
 (0)