John Dwyer
John Dwyer

Reputation: 189

Hiding code in rmarkdown

Im getting started with R-markdown and am trying to create some interactive reports. I get the whole thing but im running into some issues when Im trying to calculate some things that should not show up in the report.

So lets say I have:

 ```{r message = FALSE}
 x <- c(1,2)
 y <- c(3,4)

 df <- data.frame(x,y)
 ```

```{r, echo=FALSE}
plot(df)
```

And I only would like to show the graph. How should I then code this part:

     ```{r message = FALSE}
 x <- c(1,2)
 y <- c(3,4)

 df <- data.frame(x,y)
 ```

Upvotes: 2

Views: 2416

Answers (1)

bartoszukm
bartoszukm

Reputation: 703

Best source of knowledge about chunk options in knitr is the site: http://yihui.name/knitr/options/

In your case it will be echo=FALSE and results="hide".

Upvotes: 3

Related Questions