You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A gtsummary user reported an error when exporting to PDF in R markdown (https://stackoverflow.com/questions/74334481). Below is an abridged example illustrating the error. Thank you!! ❤️
---
title: "test"
author: "Tengku Hanis"
date: "`r Sys.Date()`"
output: pdf_document
---
```{r pressure, echo=FALSE}
devtools::dev_mode(on = TRUE)
packageVersion("gt")
# build regression model
mod <- lm(mpg ~ ., data = mtcars)
summary(mod)
# summarize with gtsummary
x <- gtsummary::tbl_regression(mod, intercept = TRUE)
# this is the data frame I want to print
x$table_body
# but this fails when exporting to PDF
x$table_body |>
gt::gt(groupname_col = NULL, caption = NULL) |>
gt::sub_missing(columns = gt::everything(), missing_text = "")
```
This is the error I see in the RStudio IDE "Render" tab.
@ddsjoberg This should no longer be a problem. I fixed the LaTeX issue with ( characters failing in specific locations. Just tested the .Rmd and it renders now!
Hello! 🍁
A gtsummary user reported an error when exporting to PDF in R markdown (https://stackoverflow.com/questions/74334481). Below is an abridged example illustrating the error. Thank you!! ❤️
This is the error I see in the RStudio IDE "Render" tab.
Session info
The text was updated successfully, but these errors were encountered: