startz
1
The following looks like a bug to me.
---
output: beamer_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
```{r}
library(gt)
library(janitor)
temp <- mtcars |> tabyl(vs,am)
temp
temp |> gt()
```
gives
! LaTeX Error: Environment longtable undefined.
cderv
2
Thanks for the report : this is bug on rmarkdown for beamer_presentation
I opened to track and fix for next release
As a workaround you can add manually the missing package required for gt
---
output:
beamer_presentation: default
header-includes: |
% gt packages
\usepackage{booktabs}
\usepackage{caption}
\usepackage{longtable}
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
```{r}
library(gt)
library(janitor)
temp <- mtcars |> tabyl(vs,am)
temp
temp |> gt()
```
I got them from
1 Like
system
Closed
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.