1

我使用 R Markdown 从数据框中生成了一些表格kable,这些表格对于纵向页面来说太大了。所以我试图在针织 pdf 中将纵向侧更改为横向侧。问题是,如果表格中没有标题或脚注,它只对我有用。有没有简单的方法来改变这个?

在代码中,我向您展示了到目前为止我尝试过的所有内容。

header-includes: 

  \usepackage{pdflscape}

  \usepackage{lscape}

  \usepackage{rotating}


\begingroup

\begin{landscape}

\begin{sidewaystable}

```{r comment='1', echo=FALSE, results='asis',}

load(file = "Data/VPNCondition.RData")
kable(VPNCondition, format="latex",booktabs=TRUE, 
      caption="Distribution of subjects between conditions and trials") %>%
  kableExtra::landscape() %>%
  footnote(general=c('This table shows the breakdown of the experimental groups.',
                     'These subjects were able to survive all claims and exclusion criteria of the pre-analysis',
                     'and preparation of the data and are included in the data analysis.')) %>%
  kable_styling(bootstrap_options="basic", font_size=14, full_width=FALSE,
                latex_options=c("scale_down"))
```
\endgroup
\end{landscape}
\end{sidewaystable}
4

0 回答 0