简体   繁体   English

编织降价未在R中显示基本图

[英]knitr markdown not displaying basic plot in r

I am trying to print a simple plot with knitr markdown. 我正在尝试打印带有编织降价的简单图。

below is my code. 下面是我的代码。

```{Simple plot}
library(datasets)
with(airquality, plot(Wind, Ozone))
```

If I run this in r code file, it returns the plot properly. 如果我在r代码文件中运行它,它将正确返回绘图。

However, when running this in a markdown file, it only shows code but no plot to the printed document. 但是,在markdown文件中运行该文件时,它仅显示代码,但不显示打印文档的图。

what am I doing wrong? 我究竟做错了什么?

Use ```{r} where r means R langage : 使用```{r},其中r表示R语言:

```{r}
library(datasets)
with(airquality, plot(Wind, Ozone))
```

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM