Setting default "open" behavior of a `.R` file in Windows?
Q: In Windows, how can I set .R
files to open by default in the R Editor? A bonus would be if they opened AND set the workspace to the directory in which they live.
Windows is able to open .ssc
files in the Splus script editor by default. Not sure why I can't get the same behavior for .R
files in the R Editor.
I've already tried Right Click -> Open With -> Choose Default Program and gone through R.exe
and other similar options. Nothing seems t开发者_如何学JAVAo work.
I assume what is happening is that when you associate R with .R files, R opens them and runs them rather than opening them in the editor.
There's an easy solution, but it doesn't involve the R editor: Use a real text editor. There are quite a few, but I'm partial to jEdit or Eclipse with STAT/ET (which offers a full IDE), or the new RStudio.
Other suggestions have been posted in the past.
Set the default program to Tinn-R ( or Emacs and use ESS. Here's a handy bundled Emacs for Windows.
http://vgoulet.act.ulaval.ca/en/ressources/emacs/windows )
精彩评论