From 3a65c36ac6b78e8708c9d19f75947e990d8f40ba Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:24:21 +0000 Subject: [PATCH] [skip style] [skip vbump] Restyle files --- R/plotBeta.R | 12 ++++++++---- tests/testthat/test-plotBetaDiff.R | 1 - 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/R/plotBeta.R b/R/plotBeta.R index d4d71a77..b51f0370 100644 --- a/R/plotBeta.R +++ b/R/plotBeta.R @@ -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) diff --git a/tests/testthat/test-plotBetaDiff.R b/tests/testthat/test-plotBetaDiff.R index e7c2a091..1ee0a36e 100644 --- a/tests/testthat/test-plotBetaDiff.R +++ b/tests/testthat/test-plotBetaDiff.R @@ -18,5 +18,4 @@ test_that("plotBetaDiff works as expected", { ) vdiffr::expect_doppelganger("", result) vdiffr::expect_doppelganger("", result) - })