Skip to content
Prev 9974 / 15075 Next

"edit" command does not work as I would expect

Thanks for your email, which was sufficient to point me to my error.

Before your email, I had thought that if the file did not exist, then the "edit" command would create the file, since this is what happens when using editor programs under Unix. But in R is not correct, at least on my combination of OS and R.

So I first separately created a file called "nam.R" and then tried
vi(file="nam.R").
At this point R opened a new window with an editor that controlled the window and enabled one to edit "nam.R", but the editor wasn't vi and it wasn't vim. Maybe it was some standard editor provided with R.
My problem is therefore half solved. I cannot see how to invoke a true vim or vi that cooperates directly with R.
Do other Mac users experience the same feature?

I would be interested to know what happens on non-Mac Unix, Linux or Windows platforms, if anyone can spare the time and has the hardware to try it. Some R-help subscribers seem to regard it as axiomatic that no problem with R on a Mac can occur on other platforms, and I have been strongly re-directed to this list. Now perhaps I'll find out that this particular question is also not appropriate for R-SIG-MAC.

Thanks for any help.
David
On 13 Aug 2013, at 15:45, Brandon Hurr wrote: