Skip to content

Commit

Permalink
Merge pull request #63 from TimTaylor/partial-matching
Browse files Browse the repository at this point in the history
Fix some partial matching
  • Loading branch information
giabaio committed Mar 27, 2024
2 parents 975cd65 + bf104aa commit 58548d8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions R/compute_eib_cri.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ compute_eib_cri <- function(he,
alpha_cri = 0.05,
cri.quantile = TRUE) {

if (he$n_comparison > 1) {
if (he$n_comparisons > 1) {
margin <- c(1, 3)
} else {
margin <- 1
Expand All @@ -39,7 +39,7 @@ compute_eib_cri <- function(he,
c(apply(he$ib, margin, FUN = compute_cri, low = FALSE)),
comp =
as.factor(
rep(1:he$n_comparison, each = length(he$k))),
rep(1:he$n_comparisons, each = length(he$k))),
k = he$k)

return(cri)
Expand Down
2 changes: 1 addition & 1 deletion R/eib_plot_graph.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ eib_plot_ggplot <- function(he,
k = c(he$k),
eib = c(he$eib),
comparison =
as.factor(rep(1:he$n_comparison,
as.factor(rep(1:he$n_comparisons,
each = length(he$k))))

ggplot(data_psa,
Expand Down
2 changes: 1 addition & 1 deletion R/ib.plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ib.plot.bcea <- function(he,
base.graphics <- all(pmatch(graph, c("base", "ggplot2")) != 2)

if (!is.null(comparison))
stopifnot(comparison <= he$n_comparison)
stopifnot(comparison <= he$n_comparisons)

if (base.graphics) {
ib_plot_base(he,
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 @@ -39,8 +39,8 @@ prep_ceplane_params <- function(he, wtp, ...) {
list(xlab = "Incremental effectiveness",
ylab = "Incremental cost",
title = plot_title,
xlim = axes_lim$x,
ylim = axes_lim$y,
xlim = axes_lim$xlim,
ylim = axes_lim$ylim,
point = list(
color = grey.colors(n = he$n_comparisons,
end = 0.7,
Expand Down

0 comments on commit 58548d8

Please sign in to comment.