Skip to content

Commit

Permalink
Fix lintr errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Monika-H committed Mar 5, 2024
1 parent 94c6d7a commit 7fb285a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
4 changes: 2 additions & 2 deletions R/internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/internal_winOdds.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}))
Expand Down
17 changes: 7 additions & 10 deletions R/winOddsPlots.R
Original file line number Diff line number Diff line change
Expand Up @@ -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), ".")
}
Expand Down Expand Up @@ -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"]])) {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7fb285a

Please sign in to comment.