【发布时间】:2015-06-08 03:34:13
【问题描述】:
我想在我的 kable 表中包含长文本。下面是一个简单的表格示例,其中的列文本太长,需要换行以使表格适合页面。
---
title: "test"
output: pdf_document
---
```{r setup, include=FALSE}
library(knitr)
```
This is my test
```{r test, echo=FALSE}
test <- data.frame(v1=c("This is a long string. This is a long string. This is a long string. This is a long string. This is a long string.",
"This is a another long string. This is a another long string. This is a another long string. This is a another long string. This is a another long string."),
v2=c(1, 2))
kable(test)
```
【问题讨论】: