Ash*_*Ash 1 plot r knitr r-markdown
我用R markdown编写了很长的绘图代码。我不想显示代码,但我想显示图形。
我使用了这个建议并将其放在我的R块中
```{r, include=FALSE, results="hide", fig.width=8, fig.height=6}
x = c(1:10)
y = c(40:50)
plot(x~y)
````
Run Code Online (Sandbox Code Playgroud)
但是,这根本不会在编织文件上提供任何输出。有什么建议么?
echo=FALSE既results="hide"不要使用,也不要include=FALSE在您的块选项中使用(我认为后者是您的真正问题)。(如下面@markdly注释所示,这就是{r, echo=FALSE, fig.width=8, fig.height=6}您要使用的选项。)