如何在 Rmarkdown 文件中包含 DiagrammeR/mermaid 流程图
How to include DiagrammeR/mermaid flowchart in a Rmarkdown file
我有一个 R markdown 文件:
---
title: "Untitled"
author: "Me"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document.
以及 DiagrammeR/mermaid 图表:
graph LR
A-->B
如何在 R-markdown 中添加图表?
其实很琐碎:
---
title: "Untitled"
author: "Me"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document.
```{r}
library(DiagrammeR)
mermaid("
graph LR
A-->B
")
```
我有一个 R markdown 文件:
---
title: "Untitled"
author: "Me"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document.
以及 DiagrammeR/mermaid 图表:
graph LR
A-->B
如何在 R-markdown 中添加图表?
其实很琐碎:
---
title: "Untitled"
author: "Me"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document.
```{r}
library(DiagrammeR)
mermaid("
graph LR
A-->B
")
```