I am trying to understand at a high level what the differences between R Markdown
and R NoteBook
. I know they are interrelated but I would like to figu
From jrnold:
R notebook files show the output inside the editor, while hiding the console. R markdown files shows the output inside the console, and does not show output inside the editor. They differ in the value of output in their YAML headers.
The YAML header for the R notebook will have the line,
---
ouptut: html_notebook
---
The YAML header for the R markdown file will have the line,
ouptut: html_document
Copying the YAML header from an R notebook to a R markdown file changes it to an R markdown file, and vice-versa. More specifically, changing the value of output
to This is because the RStudio IDE when opening and the rmarkdown package when knitting uses the YAML header of a file, and in particular the value of the output
key in the YAML header, to determine what type of document it is.