R 项目/包开发的 ESS 工作流程
谁能分享他在 ESS 下 R 项目开发工作流程的经验吗?我尝试了好几次学习emacs,但还是没有掌握。作为编辑我可以理解ESS,但是ESS中有项目视图吗?设置/查看 R 项目目录、编码和测试的有效方法是什么?ESS 如何具有促进整个过程的优势?
您是否仅将 ESS 用作良好的 R 编辑器,还是倾向于在 ESS 中模拟 R IDE 环境?
感谢您的任何建议。
Can anyone share his experience on workflow for R peject development under ESS? I tried several times to learn emacs but I have not get it yet. I can understand ESS as an editor, but is there a project view in ESS? what's the efficient ways to set up/view R project directory, coding, and testing, and how's ESS has an edge to facilitate the whole process?
Do you use ESS as a good R editor only or tend to emulate a R IDE environment within ESS?
Thanks for any advices.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
听起来你在问两个不同的问题。
其中一个问题涉及工作流程,另一个问题涉及 ESS 的使用。
由于我使用 StatET 和 Eclipse,因此我将分享我关于您问题的工作流程方面的经验。
与 Vincent 一样,我也遵循 Josh Reich 在这里制定的工作流程(另请参阅 Hadley 的有用评论):
统计分析和报告撰写的工作流程
尽管项目之间可能有所不同,我倾向于有几个主要的 R 文件
的目的是让 import.R 和 analysis.R 代表生成任何分析的最终结果的完整且最终的工作流程。
就分析项目的目录结构而言,我通常还会有以下文件夹
StatET 和 Eclipse 可以轻松地与此类文件系统进行交互。
当然,考虑到所有使用 ESS 和 Emacs 的 R 专家,我确信它也能很好地处理与文件系统的交互。
It sounds like you're asking two separate questions.
One question concerns workflow and the other concerns using ESS.
As I use StatET and Eclipse, I'll just share my experience regarding the workflow aspect of your question.
As with Vincent I also follow something like the workflow set out by Josh Reich here (also see Hadley's useful comments):
Workflow for statistical analysis and report writing
Although it can vary between projects, I tend to have a couple of main R files
The aim is for import.R and analyse.R to represent the complete and final workflow for producing the final results of any analyses.
In terms of a directory structure for an analysis project, I'll often also have the following folders
StatET and Eclipse make it easy to interact with such a file system.
Of course, given all the R gurus that use ESS and Emacs, I'm sure it also handles interactions with the file system well.
我不太确定您对此问题的答案有何期望。举个例子,我偷了(并改编)了不久前(Josh Reich)在这里建议的系统 :
为每个项目创建一个文件夹,并将您的工作分成一堆不同的 .R 文件:
如果这不适合您的风格,只需更改它即可。
然后,您可以使用一个主文件来依次调用每个部分(有利于再现性),或者在不同阶段保存并让各个脚本加载适当的数据(如果某些准备工作需要大量计算,则很好) /时间密集)。
**
另一方面,链接中发布的技巧确实帮助我进入了 ESS。它将 Shift-Enter 变成一站式 ESS 商店:http://www.kieranhealy.org/blog/archives/2009/10/12/make-shift-enter-do-a-lot-in-ess/
I'm not exactly sure what you expect as an answer on this one. I, for one, have stolen (and adapted) a system that was suggested here a little while ago (by Josh Reich):
Create a folder for every project, and split up your work in a bunch of different .R files:
If that doesn't fit your style, just change it.
Then, you can either have a master file to call each of the parts one after each other (good for reproducibility), or save at different stages and have the individual scripts load the appropriate data (good if some of the prep work is very computationally/time intensive).
**
On a different note, the trick that is posted at the link really helped me get into ESS. It turns Shift-Enter into a one-stop-ESS-shop: http://www.kieranhealy.org/blog/archives/2009/10/12/make-shift-enter-do-a-lot-in-ess/
其他人为您提供了一些关于如何为项目设置目录/文件结构的好主意。
您还询问了“项目视图”,在这种情况下您可能需要查看 Emacs 代码浏览器 (欧洲央行)。
您可以在其网站上找到一些实际运行的屏幕截图:
http://ecb.sourceforge.net/screenshots/index.html
Others have given you some good ideas about how to setup your directory/file structure for a project.
You also asked about "project views," in which case you might want to look into the Emacs Code Browser (ECB).
You can find some screen shots of it in action on its site, here:
http://ecb.sourceforge.net/screenshots/index.html