I have used gtsummary for some time and never encountered any problems. However, recently I am encountering an error no matter what type of plot I am trying to make.
For example:
# Loading packages
library(gtsummary)
library(tidyverse)
# Create summary table
iris %>%
tbl_summary()
Or any other code I try yields this error:
Error in dplyr::mutate()
:
ℹ In argument: stat = as.character(...)
.
Caused by error in glue_data()
:
! is.environment(.envir) is not TRUE
I have tried updating all packages, restarting R, downloading R and RStudio again but to no avail. I would be grateful for any advice.
I had the same issue and upgraded to the last version using
pak::pkg_install("ddsjoberg/gtsummary", dependencies = TRUE)
Now it is ok
S