Skip to content

Commit d98ed03

Browse files
committed
Fix lintr error and small change to ensure ellipsis shape
1 parent bed6481 commit d98ed03

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

R/internal.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
# To create ellipsis shape and avoid overlapping between both of them,
286286
# set the height to 80% of the SE (minimum scaled in x-axis or y-axis range)
287287
width <- (100 - start_binary_endpoint) * min(binary_meta$se) / 100
288-
y_range <- ((max(actv_y, ctrl_y) + 10) * min(binary_meta$se) / 100) * 0.6
288+
y_range <- (max(actv_y, ctrl_y) + 10) * (width / 100)
289289
y_height <- min(c(0.4 * abs(actv_y - ctrl_y), 0.8 * min(width, y_range)))
290290

291291
# Create ellipsis centered around proportion estimate (x0) as well as

R/internal_winOdds.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,16 @@
211211
plot <- plot +
212212
ggplot2::geom_vline(xintercept =
213213
seq(0.5, length(levels(wins_forest$GROUP)) + 1.5,
214-
1),
214+
1),
215215
linetype = 2, linewidth = 0.3, color = "darkgray") +
216216
scale_color_manual(values = c("black", "grey50")) +
217217
scale_fill_manual(values = c("black", "grey50")) +
218218
ylab("Win Odds / Win Ratio") +
219219
theme_bw() +
220220
theme(legend.position = "bottom",
221221
legend.title = element_blank(),
222-
panel.grid.major.y = ggplot2::element_blank(),
223-
panel.grid.minor.y = ggplot2::element_blank())
222+
panel.grid.major.y = ggplot2::element_blank(),
223+
panel.grid.minor.y = ggplot2::element_blank())
224224
}
225225

226226
return(plot)

0 commit comments

Comments
 (0)