【发布时间】:2021-12-31 20:33:29
【问题描述】:
我有
---
title: "test"
output: pdf_document
---
Below should be in four lines
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
test<-c("This should be in the first line \n This in the second line \n This in the third line \n This in the fourth line")
```
`r test`
在 PDF 中test 显示在 1 行中。是否可以在 Rmarkdown 中将 test 字符串编织成 4 行,还是必须在 R 中对其进行预处理? \n 似乎没有做这项工作。
【问题讨论】:
标签: r string pdf r-markdown