且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

更改 rmarkdown 保存由 r 代码生成的图像的位置

更新时间:2023-02-07 14:31:54

类似:

---
title: "my test"
author: "daniel"
date: "18/08/2015"
output:
  md_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r opts, echo = FALSE}
knitr::opts_chunk$set(
  fig.path = "images/"
)
```

将所有生成的图形保存到 images 子目录(如果该目录不存在,则创建该目录).

will save all generated figures to the images sub-directory (and create said directory if it does not exist).