Difference between R MarkDown and R NoteBook

后端 未结 8 1834
时光说笑
时光说笑 2021-01-29 20:01

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

8条回答
  •  感动是毒
    2021-01-29 20:42

    As far as I understand and from my setup there is no coding difference. The difference is in the rendering. The file extension is the same.

    When you make a new R Notebook it adds html_notebook in the output option in the header. That's the difference. You can then preview the rendering quickly without having to knit it. It also refreshes the preview every time you save. However in that preview you don't have the code output (no figures, no tables..) (at least in my setup). Without html_notebook in the output there is no button preview

    as you can see the Preview options shows up but you can also knit it in any format you want. It will add it to the header code when you do so.

    However if you don't have that html_notebook in your header, you can only knit your code to see what it looks like (the entire book) (please ignore the additional default option I put in with the picture)

    and the option to preview doesn't show in the drop down menu

    Otherwise it works the same. For some default configuration the output is also hidden by default in the code section.

    Note that you can mix several output options in your header so that you can keep the preview and keep your knit options for export.

提交回复
热议问题