```{r, echo = FALSE, results='asis', comment=NA, warning=FALSE, message = FALSE}
library(knitr)
library(ggplot2)
library(quantmod)
getSymbols("TYU2.F", src = "yahoo", verbose = TRUE, from = "2018-05-01")
tyu2 <- data.frame(TYU2.F)
tyu <- c(tyu2$TYU2.F.Open)
ggplot(data = tyu2 , aes(x=1:29,y=tyu))+geom_bar(stat = "identity", fill = "blue")+
scale_x_continuous(breaks = seq(1,30,1))+
scale_y_continuous(breaks = seq(0,0.2,0.01))
```
此代码正常工作并提供输出。但是当我复制到markdown并编织时。该图显示了所有过程(向下)。如何删除它。
downloading TYU2.F
done. [1] “TYU2.F”
还有一种方法可以在这里插入一些闪亮的代码块,以便在编织时变得更具交互性
答案 0 :(得分:1)
创建新的RMarkdown文件时,第一个块设置为{r setup, include=FALSE}
您应该切换到include=TRUE