From d4467e61044109f3d1c6a4e9352d9ec15a2b44d9 Mon Sep 17 00:00:00 2001 From: Dr Nathan Green Date: Thu, 22 Feb 2024 20:16:44 +0000 Subject: [PATCH] fixed bug with wtp in polygon_params() --- .Rbuildignore | 1 + R/ceplane.plot.R | 2 +- R/ceplane_base_params.R | 2 +- R/ceplane_base_params_xxx.R | 4 +++- R/ceplane_ggplot_params.R | 4 ++-- R/ceplane_plot_graph.R | 1 + R/prep_ceplane_params.R | 4 ++-- cran-comments.md | 2 +- 8 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index 7bb08579..4abe8285 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -25,3 +25,4 @@ ^CONTRIBUTING\.md$ ^revdep$ ^CRAN-SUBMISSION$ +^CITATION\.cff$ diff --git a/R/ceplane.plot.R b/R/ceplane.plot.R index 8fa1ccd0..70e8989a 100644 --- a/R/ceplane.plot.R +++ b/R/ceplane.plot.R @@ -103,7 +103,7 @@ ceplane.plot.bcea <- function(he, pos = c(0, 1), graph = c("base", "ggplot2", "plotly"), ...) { - + browser() graph <- match.arg(graph) he <- setComparisons(he, comparison) diff --git a/R/ceplane_base_params.R b/R/ceplane_base_params.R index 02737f4c..a3c189c5 100644 --- a/R/ceplane_base_params.R +++ b/R/ceplane_base_params.R @@ -8,7 +8,7 @@ ceplane_base_params <- function(he, c(list( setup = setup_params(graph_params), points = points_params(graph_params), - polygon = polygon_params(graph_params, wtp), + polygon = polygon_params(graph_params), k_txt = k_text(graph_params, wtp), wtp = wtp, ref_first = graph_params$ref_first), diff --git a/R/ceplane_base_params_xxx.R b/R/ceplane_base_params_xxx.R index 80cb4ffc..8ece3392 100644 --- a/R/ceplane_base_params_xxx.R +++ b/R/ceplane_base_params_xxx.R @@ -17,7 +17,9 @@ setup_params <- function(graph_params) { #' @keywords dplot #' -polygon_params <- function(graph_params, wtp) { +polygon_params <- function(graph_params) { + + wtp <- graph_params$wtp_value x_max <- graph_params$xlim[2] y_min <- graph_params$ylim[1] diff --git a/R/ceplane_ggplot_params.R b/R/ceplane_ggplot_params.R index 6ab5bd80..d539e57a 100644 --- a/R/ceplane_ggplot_params.R +++ b/R/ceplane_ggplot_params.R @@ -13,11 +13,11 @@ ceplane_ggplot_params <- function(he, pos_legend, graph_params, ...) { - + ext_params <- ceplane_geom_params(...) graph_params$area <- - modifyList(polygon_params(graph_params, wtp), + modifyList(polygon_params(graph_params), graph_params$area) graph_params$legend <- make_legend_ggplot(he, pos_legend) diff --git a/R/ceplane_plot_graph.R b/R/ceplane_plot_graph.R index ca3bf676..c8f8071a 100644 --- a/R/ceplane_plot_graph.R +++ b/R/ceplane_plot_graph.R @@ -140,6 +140,7 @@ ceplane_plot_base <- function(he, ...) { ceplane_plot_ggplot.bcea <- function(he, pos_legend, graph_params, ...) { + browser() # single long format for ggplot data delta_ce <- merge( diff --git a/R/prep_ceplane_params.R b/R/prep_ceplane_params.R index dd5f6829..ffdfc7c6 100644 --- a/R/prep_ceplane_params.R +++ b/R/prep_ceplane_params.R @@ -14,7 +14,7 @@ #' @keywords internal #' prep_ceplane_params <- function(he, wtp_params, ...) { - + browser() graph_params <- list(...) # back compatibility @@ -35,7 +35,7 @@ prep_ceplane_params <- function(he, wtp_params, ...) { ifelse(he$n_comparisons == 1, #he$change_comp, yes = intervs_in_title, no = "")) - browser() + axes_lim <- xy_params(he, wtp_params$value, graph_params) default_params <- diff --git a/cran-comments.md b/cran-comments.md index 39b96e6e..be5b6fc1 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,5 @@ ## R CMD check results -0 errors | 0 warnings | 0 note +0 errors | 0 warnings | 0 notes * This is an updated release.