4
The RMarkdown
has become a very popular interface and file type in recent years. I believe this is due to the fact that it allows using a single software to write complete statistical analysis reports, with texts, tables, graphs, figures and references formatted. It also allows the compilation of these reports into html pages on the internet. After we learn to use it, we no longer need to switch between R/Stata/Sas/SPSS windows and Word, Excel, Latex, etc. There are even packages to help write books and doctoral theses with it. Obviously, there are also limitations and difficulties (at least for me) but that are beyond the scope of the question.
I recently noticed that when we choose the option to create a new Rnotebook document, a Rmarkdown document is also opened. The only difference that seems to exist is in YAML, where there is the parameter:
output: html_notebook
When this parameter is maintained, the button knit
becomes a button preview
, which allows the preview of the document as a page html
. But after we finish the work and choose to compile the document (even as html), the YAML parameter is automatically changed to:
html_document:
df_print: paged
The button preview
also disappears and in its place, returns the option knit
. When we save the file, R saves with the same extension as Rmarkdown.
That is, there seems to be no more difference between the two types of document. Is that right? Is there any substantive and objective difference between Rmarkdown and Rnotebook? If so, could you give me examples?