[R] .R file

Mike Marchywka marchywka at hotmail.com
Mon Oct 25 14:11:16 CEST 2010



> All three of these editors are external to R but have the capability of
> sending code from the editor to the console. All of them are good and have
> loyal user bases. Notepad++ is another option; but you have to copy/paste
> code to R - I mention it because it has syntax highlighting and is capable
> of saving files in numerous formats.
>
> In fact, all of the editors mentioned above have syntax highlighting
> capabilities, which is very useful when writing/developing code and
> documents, and all of them let you save a file with a .R extension (unlike
> certain Windows editors, for example). I'm certain I've missed a few,
> especially on the Linux and Mac platforms, and I expect others will chime in
> with their preferences.


You mention Notepad++, I'm still using vi under cygwin and an ancient copy of ultra edit.
When I was first learning Java and c++, the various commercial IDE 
packages were great. However, I've found that with most things I end up integrating
with bash scripts and end up in vi for "touch up" anyway- and if you take the
time to learn it many of the odd commands are quite helpful. IIRC many
of the IDE's offer language-specific help beyond syntax highlighting such as signature suggestions as you type or menu options for compiling and debugging that 
pure text editors lack, not sure what the
R IDE does. I finally developed alt approaches for finding signatures and
it turned out to be easier to do this outside ide although sometimes I
compile bad code due to typo that IDE would have flagged. 
In the simple case on windows, I vi my .R file and then invoke a script
to run it. In many cases ,the IDE menu's for more language specific actions
like compile and build are confusing and limited and have a learning curve
and there too I end up editing bash scripts using cmd line alt.
So, I guess my point is that I would not just run to an IDE for R or
others :)



>
> HTH,
> Dennis
>
> On Sun, Oct 24, 2010 at 11:57 PM, zhiji19  wrote:
>
> >
> > Hello everyone
> >
> > Can you please teach me how to save my homework as .R file?
> >
> > I write my code in RGui. When I tried to save my work, the RGui only allows
> > me to save it as .RData.
> >

 		 	   		  


More information about the R-help mailing list