7

我有一个 R 降价文件:

---
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/美人鱼图表:

graph LR
    A-->B

如何在 R-markdown 中添加图表?

4

1 回答 1

8

其实很简单:


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
")
```
于 2016-11-25T11:54:09.363 回答