I want to use the tbl_summary function from the gtsummary package to summarize some baseline/demographic data. When trying to replicate the given example, I keep getting an error message regarding the cache directory and I cannot work out why I keep getting this message.
library(gtsummary)
trial2 <- trial %>% select(trt, age, grade)
trial2 %>% tbl_summary()
#> Error in warning("Error using cache directory at '", cache_dir, "'. Using temp dir instead."): object 'cache_dir' not found
Created on 2021-07-23 by the reprex package (v0.3.0)