R gt package: error in latex (“there's no line here to end”)
问题 I am trying to include a table generated with the gt() function in a tex file. I create a .Rnw file, then weave it with knitr and compile with pdflatex. During compilation I get an error: "there no line here to end", caused by a newline inserted by gt() in the table header. This is a MWE: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{booktabs} \usepackage{longtable} \usepackage{caption} \begin{document} <<setup, include=FALSE>>= library(knitr) library(tidyverse) library(gt)