Skip to content

Commit

Permalink
[skip style] [skip vbump] Restyle files
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 6, 2025
1 parent c475a98 commit 3a65c36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 8 additions & 4 deletions R/plotBeta.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,14 @@ plotBetaDiff <- function(parY, # parameters of experimental arm
if (shade == TRUE) {
pbetadiff_plot <- ggplot2::ggplot(data = data, aes(x = grid, y = density)) +
ggplot2::geom_line(colour = "#888888") +
geom_area(data = data[data$grid < Stop_cut,], fill = "#FF0046",
mapping = aes(x = ifelse(grid < 0.2 & grid < 0.5, grid, 0))) +
geom_area(data = data[data$grid > Go_cut,], fill = "#009E73",
mapping = aes(x = ifelse(grid > 0.3, grid, 0))) +
geom_area(
data = data[data$grid < Stop_cut, ], fill = "#FF0046",
mapping = aes(x = ifelse(grid < 0.2 & grid < 0.5, grid, 0))
) +
geom_area(
data = data[data$grid > Go_cut, ], fill = "#009E73",
mapping = aes(x = ifelse(grid > 0.3, grid, 0))
) +
xlab("Difference between treatment") +
ggplot2::ylab(quote(f(x))) +
ggplot2::ggtitle(plot_title)
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-plotBetaDiff.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ test_that("plotBetaDiff works as expected", {
)
vdiffr::expect_doppelganger("", result)
vdiffr::expect_doppelganger("", result)

})

0 comments on commit 3a65c36

Please sign in to comment.