Skip to content

Commit

Permalink
fixed bug with wtp in polygon_params()
Browse files Browse the repository at this point in the history
  • Loading branch information
n8thangreen committed Feb 22, 2024
1 parent 3d8a770 commit d4467e6
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
^CONTRIBUTING\.md$
^revdep$
^CRAN-SUBMISSION$
^CITATION\.cff$
2 changes: 1 addition & 1 deletion R/ceplane.plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion R/ceplane_base_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 3 additions & 1 deletion R/ceplane_base_params_xxx.R
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions R/ceplane_ggplot_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions R/ceplane_plot_graph.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions R/prep_ceplane_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' @keywords internal
#'
prep_ceplane_params <- function(he, wtp_params, ...) {

browser()
graph_params <- list(...)

# back compatibility
Expand All @@ -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 <-
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit d4467e6

Please sign in to comment.