From 72f87a29fc181924776d132337d46d1f8d8d0aa2 Mon Sep 17 00:00:00 2001 From: Dr Nathan Green Date: Tue, 14 Jan 2025 12:35:49 +0000 Subject: [PATCH] delete some trouble code --- NEWS.md | 8 ++++---- R/evppi.default.R | 14 -------------- man/evppi.Rd | 6 ------ 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/NEWS.md b/NEWS.md index af5985a4..fb8d0b26 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,10 +7,10 @@ _January 2025_ * In `ceplane.plot()` for `{ggplot2}` version used the ggplot syntax thats already used for other plotting arguments so that we can now pass, e.g. `wtp = list(value = 20000, colour = "blue", x = 10, y = 10, size = 4)`. This closes issue #151 so can do something like `wtp = list(size = 0)` to hide the willingness to pay text. (3d8a770) * Small features added which were missing for the new edition of the BCEA book: - - Extended `ggplot` version legend to take a vertical or horizontal part to the `pos` argument (85ba87f) - - Relative font size argument `rel` for ceplane and ceac plot (8d1586f) - - Added text size `ggplot` argument to `eib_plot` (1e32788) and `evi_plot` (84aaa2f) - - `label.pos` logical argument fixed in `ceplane.plot` for `ggplot` (92e9eb0) and base `R` (c7351e4) + - Extended `ggplot` version legend to take a vertical or horizontal part to the `pos` argument (85ba87f). + - `ceplane.plot()` and `ceac plot` relative font size argument `rel` fixed (8d1586f). + - `eib_plot` and `evi_plot` text size `ggplot` argument added (1e32788) and (84aaa2f). + - `ceplane.plot()` now has`label.pos` logical argument fixed for `ggplot` (92e9eb0) and base `R` (c7351e4). # BCEA 2.4.6 diff --git a/R/evppi.default.R b/R/evppi.default.R index ed32e31a..09f54176 100644 --- a/R/evppi.default.R +++ b/R/evppi.default.R @@ -10,13 +10,6 @@ evppi.default <- function(he, ...) { #' @rdname evppi #' @import voi #' -#' @examples -#' data(Vaccine, package = "BCEA") -#' treats <- c("Status quo", "Vaccination") -#' bcea_vacc <- bcea(e.pts, c.pts, ref = 2, interventions = treats) -#' inp <- createInputs(vaccine_mat) -#' BCEA::evppi(bcea_vacc, c("beta.1.", "beta.2."), inp$mat) -#' #' @export #' evppi.bcea <- function(he, @@ -27,13 +20,6 @@ evppi.bcea <- function(he, residuals = TRUE, method = NULL, ...) { - if (!requireNamespace("voi", quietly = TRUE)) { - stop( - "Package \"voi (>= 1.0.1)\" must be installed to use this function.", - call. = FALSE - ) - } - comp_ids <- c(he$comp, he$ref) outputs <- list(e = he$e[, comp_ids], c = he$c[, comp_ids], diff --git a/man/evppi.Rd b/man/evppi.Rd index d3fd3466..312b5140 100644 --- a/man/evppi.Rd +++ b/man/evppi.Rd @@ -222,12 +222,6 @@ EVPPI <- BCEA::evppi(m, c(2,3), inp$mat, h.value = 0.0000005) plot(EVPPI) } -data(Vaccine, package = "BCEA") -treats <- c("Status quo", "Vaccination") -bcea_vacc <- bcea(e.pts, c.pts, ref = 2, interventions = treats) -inp <- createInputs(vaccine_mat) -BCEA::evppi(bcea_vacc, c("beta.1.", "beta.2."), inp$mat) - } \references{ \insertRef{Strong2014}{BCEA}