Reputation: 1565
I was wondering whether it was possible to disable chunk output for RStudio's html_notebook
s in the Source pane, so that output is only displayed in the Viewer pane (or in a separate Window, depending on your settings).
include=FALSE
, but this obviously also affects the Viewer pane where I would like to have my output displayed. html_notebook
format as updating changes with the notebook preview is much faster than knitting an html_document
. test.Rmd
):---
title: "R Notebook Test"
output: html_notebook
---
HSome text here.
```{r chunk1}
2+2
```
Some more text here.
The MWE results in the following output in the Source pane ...
... and the following output in the Viewer pane:
I am happy with the Viewer pane but do not want to see the output in the Source pane.
I think the option of having output displayed in the Source pane is nice but since inline code chunks are not also rendered in the Source pane I prefer just having the output displayed once in the Viewer pane.
Upvotes: 2
Views: 1001
Reputation: 642
It seems to me that what you need is html_document, (not html_notebook) where the source pane only has your code, but the viewer pane contains the processed chunks ?
Try changing html_notebook
to html_document
and see if that is what you need. That will give you a clean source document and processed output in the window/viewer.
The html_notebook mode is specifically for dealing with
" chunks that can be executed independently and interactively, with output visible immediately beneath the input."
(see http://rmarkdown.rstudio.com/r_notebooks.html).
Upvotes: 1