R标记:将图形放在单独的页面上,并进行横向定位

R标记:将图形放在单独的页面上,并进行横向定位,r,r-markdown,knitr,R,R Markdown,Knitr,我正试图在R标记中插入一个数字。我想把这幅图做成一整页,放平(横向) 这是我的密码: # lots of text... {r pressure, echo=FALSE, fig.cap="Fig. 1: Treatment durations...", out.width = '100%'} knitr::include_graphics("E:/CZ/Graphs5/Again/Scam_0hrs.png") # lots of text... 假设您正在谈论PDF: --- output

我正试图在R标记中插入一个数字。我想把这幅图做成一整页,放平(横向)

这是我的密码:

# lots of text...
{r pressure, echo=FALSE, fig.cap="Fig. 1: Treatment durations...", out.width = '100%'}
knitr::include_graphics("E:/CZ/Graphs5/Again/Scam_0hrs.png")
# lots of text...

假设您正在谈论PDF:

---
output: pdf_document
header-includes:
  - \usepackage{lscape}
---

# lots of text...

\begin{landscape}

```{r pressure, echo=FALSE, fig.cap="Fig. 1: Treatment durations...", out.width = '100%'}
plot(pressure)
```

\end{landscape}

# lots of text...

这是我知道的唯一方法,它只适用于PDF。

谢谢。这很有帮助。