R MarkDown和R NoteBook之间的区别 [英] Difference between R MarkDown and R NoteBook

查看:1330
本文介绍了R MarkDown和R NoteBook之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从更高层次上理解R MarkdownR NoteBook之间的区别.我知道它们是相互关联的,但我想弄清楚它们之间是如何关联的.我的理解是这样的:

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 figure out how they are related. My understanding is this:

我知道R Notebooks实际上是R Markdown文档,但是我对术语感到困惑.

I know R Notebooks are really R Markdown documents but I am confused about the terminologies.

RStudio新文件选项同时具有R MarkdownR NoteBook,并且选择其中的任意一个都会打开R Markdown文件,但有微小差异. 所以只是想弄清楚为什么有两个选项,两者之间有什么区别?

RStudio new file option has both R Markdown and R NoteBook and selecting either of them opens an R Markdown file but with minor differences. So just trying to figure out why are there two options and what is the difference between the two?

我了解R笔记本电脑是新推出的,R Markdown已经存在了一段时间.造成混淆的部分原因可能是因为我在引入R Notebook之前从未使用过R Markdown,所以我的相关或更具体的问题是

I understand R Notebooks are newly introduced and R Markdown has been there for a while. Part of the confusion could be because I never used R Markdown before R Notebook was introduced so my related or more specific question is

与使用R MarkDown相比,R NoteBook有何不同之处?R NoteBook带来了哪些新功能?

我在网络搜索中的所有热度都指向R Notebook使用R Markdown,但是我没有找到关于两者之间明显不同的任何帮助.

All my hits on web search are pointing that R Notebook uses R Markdown but I did not find any help on what is specifically different between the two.

推荐答案

据我了解,从我的设置来看,没有编码上的区别. 区别在于渲染.文件扩展名是相同的.

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.

制作新的R Notebook时,它将在标题的输出选项中添加html_notebook.那是区别.然后,您无需编织就可以快速预览渲染.每次保存时,它也会刷新预览.但是,在该预览中,您没有代码输出(没有数字,没有表格..)(至少在我的设置中).如果在输出中没有html_notebook,则没有按钮预览

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.

但是,如果标题中没有html_notebook,则只能编织代码以查看其外观(整本书)(请忽略我在图片中添加的其他默认选项)

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.

这篇关于R MarkDown和R NoteBook之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆