NickCH-K / vtable

An R package for creating Variable Documentation Files

Home Page:https://nickch-k.github.io/vtable/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sumtable() produces LaTeX error: Missing \endgroup inserted

rossellhayes opened this issue · comments

Using sumtable() to produce LaTeX output gives an error when knitting:

Minimal example:

---
title: "Untitled"
author: "Alexander Rossell Hayes"
date: "2/16/2021"
output: pdf_document
---

```{r include = FALSE}
library(knitr)
library(kableExtra)
library(vtable)
```


```{r results = "asis"}
sumtable(mtcars, out = "latex")
```

Knitting this document produces the following error:

! Missing \endgroup inserted.
<inserted text> 
                \endgroup 
l.158 }

The same error occurs when manually copying and pasting the LaTeX output of sumtable().

Thank you!

In the meantime, using out = "kable" does knit to PDF successfully. That takes care of my use case, but still may be a problem for someone who needs real LaTeX code.

Should be fixed with e93858b let me know.

Also should default consistently to kable in RMarkdown without any out specified (and improved the HTML look of kables).