diff --git a/R/internal.R b/R/internal.R index ab9664a..8c87607 100644 --- a/R/internal.R +++ b/R/internal.R @@ -278,8 +278,8 @@ average = 100 * as.numeric(stats::prop.test(x, n)$estimate), se = abs(average - - (100 * as.numeric(stats::prop.test(x, n)$conf.int)[1]) - )) %>% + (100 * as.numeric(stats::prop.test(x, n)$conf.int)[1]) + )) %>% dplyr::ungroup() # To create ellipsis shape and avoid overlapping between both of them, diff --git a/R/internal_winOdds.R b/R/internal_winOdds.R index 2bbddbc..6d4f051 100644 --- a/R/internal_winOdds.R +++ b/R/internal_winOdds.R @@ -77,7 +77,7 @@ wins <- calcs_lst[[i]]$wins nm <- c("value", "LCL", "UCL", "p value") f <- rbind(data.frame(setNames(wins$WO, nm), "method" = "win odds"), - data.frame(setNames(wins$WR1, nm), "method" = "win ratio")) + data.frame(setNames(wins$WR1, nm), "method" = "win ratio")) f$GROUP <- labs[i] return(f) })) diff --git a/R/winOddsPlots.R b/R/winOddsPlots.R index 15988bf..14c4a7e 100644 --- a/R/winOddsPlots.R +++ b/R/winOddsPlots.R @@ -169,8 +169,7 @@ cumulative_plot <- function(x, ...) { } #' @export -cumulative_plot.default <- function(x, - ...) { +cumulative_plot.default <- function(x, ...) { paste0("cumulative_plot() function can only handle inputs of class ", "'hce' or 'maraca'. Your input has class ", class(x), ".") } @@ -209,9 +208,7 @@ cumulative_plot.default <- function(x, #' cumulative_plot(maraca_dat) #' #' @export -cumulative_plot.maraca <- function(x, - theme = "maraca", - ...) { +cumulative_plot.maraca <- function(x, theme = "maraca", ...) { # Check that win odds were calculated for the maraca object if (is.null(x[["wins_forest"]]) || is.null(x[["wo_bar"]])) { @@ -279,11 +276,11 @@ cumulative_plot.maraca <- function(x, #' @export #' cumulative_plot.hce <- function(x, last_outcome = "C", - arm_levels = c(active = "A", control = "P"), - fixed_followup_days = NULL, - theme = "maraca", - continuous_outcome = lifecycle::deprecated(), - ...) { + arm_levels = c(active = "A", control = "P"), + fixed_followup_days = NULL, + theme = "maraca", + continuous_outcome = lifecycle::deprecated(), + ...) { # Create maraca object maraca_dat <- .maraca_from_hce_data(x, last_outcome, arm_levels,