When trying to use as_forest_plot from the bstfun package, I get an error :
Error in select()
:
ℹ In argument: all_of(c("label", col_names))
.
Caused by error in all_of()
:
! Can’t subset elements that don’t exist.
✖ Element ci
doesn’t exist.
library(tidyverse)
library(gtsummary)
library(bstfun)
mod <- glm(
response ~ grade * age + trt,
data = trial,
family = binomial
)
This works:
mod %>%
tbl_regression(exponentiate = TRUE) %>%
add_inline_forest_plot()
This does not:
mod %>%
tbl_regression() %>%
as_forest_plot()
I get the follonwing error: Error in select()
: ℹ In argument:all_of(c("label", col_names))
. Caused by error in all_of()
: ! Can’t subset elements that don’t exist. ✖ Element ci
doesn’t exist. Run rlang::last_trace()
to see where the error occurred.
1