【问题标题】:Fitting a large table into a pdf using rmarkdown - and scale_down使用 rmarkdown - 和 scale_down 将大表放入 pdf
【发布时间】:2020-01-28 22:56:12
【问题描述】:

我正在尝试使用Rmarkdown 在 pdf 页面上放置一个相当大的表格。该表对于一页来说太大了,但 scale_down 不起作用。我从Scale kable table to fit page width 知道我可以缩小宽度。如何强制此表适合一页。对象 m,有 64 行,目前只打印了约 50 行。

---
title: "Untitled"
date: "`r format(Sys.time(), '%B %d, %Y')`"
output: 
  pdf_document: default
  html_document: default
---

```{r setup, include=FALSE}

library(knitr)
library(rmarkdown)
library( kableExtra )

m <- rbind( mtcars, mtcars)
m$rows<- 1:nrow( m )


outfinish3 <- knitr::kable( m , format = 'latex',  align = 'c' , booktabs=TRUE) %>% 
 kable_styling(latex_options = c("scale_down")) 

```

`r outfinish3 `

【问题讨论】:

    标签: r latex r-markdown markdown


    【解决方案1】:

    不完全确定如何缩小,但您可以将其拆分为两个表。

    [https://stackoverflow.com/a/44490399/10821503][1]

    【讨论】:

      猜你喜欢
      • 2020-09-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-12
      • 2018-09-10
      • 2017-11-13
      • 2018-11-13
      • 2010-09-09
      相关资源
      最近更新 更多