Re: [R] Syntax coloring in R console

From: January Weiner <january.weiner_at_mpiib-berlin.mpg.de>
Date: Fri, 01 Apr 2011 17:05:13 +0200

Dear Liviu,

thanks for the programming tip! However, I do all my editing in vim, which has had syntax highlighting for quite a while, as well as auto-completion and a number of other goodies. But while I do most of my programing in vim, I do most of my scientific studies simply using the R interface and keeping a manually edited "lab book" apart from the scripts. Clearly, one can do as much with Rstudio -- I just don't see any advantages, but I do see a disadvantage in my specific case: all sub-windows are confined to the "desktop". In other words, having multiple plots on one monitor and a terminal with R command line is not possible.

A question, though. Given that I have projects assorted in various directories, how can I start RStudio opening a project stored in .RData and .Rhistory of a given directory? I.e., how can I make RStudio open the current directory (like R does), and not $HOME?

Thanks nonetheless,

j.

On Fri, Apr 1, 2011 at 4:20 PM, Liviu Andronic <landronimirc_at_gmail.com> wrote:
> On Fri, Apr 1, 2011 at 3:48 PM, January Weiner
> <january.weiner_at_mpiib-berlin.mpg.de> wrote:
>> RStudio might be a fine program, but it does not feature syntax
>> highlighting, which is the only thing I am missing from R Console (it
>> only colors the commands typed).
>>
> The idea is that you shouldn't use the R console for you main
> programming needs, but only for quick and dirty checks. For the bulk
> of programming tasks you are invited to use the integrated editor
> (File > New > Script). The editor window does feature syntax
> highlighting, and a very helpful completion mechanism (via <tab>).
> Sending lines for execution to the terminal is as easy as clicking
> 'run lines' or ctrl+enter. If you're not a fan of keeping scripts for
> your projects you can easily use temporary files that you don't save.
>
>
>> Moreover, the very idea of squeezing
>> all R windows into one "window-desktop" would be counterproductive in
>> my particular case.
>>
> Notice that all panes are freely resizable and can be resized to the
> point of becoming hidden. Future releases will give more control over
> the panes layout (I think).
>
> Regards
> Liviu
>
>
>> Thank you anyways!
>>
>> j.
>>
>>
>>
>>> [1] http://alternativeto.net/software/rstudio/about
>>>
>>> Regards
>>> Liviu
>>>
>>>
>>>> I tried JGR, the GUI for R, but I have found the following problems
>>>> with this package:
>>>>
>>>> - I was not able to change the background color from a repulsive grey,
>>>> - apparently, GNU readline is not implemented in that package, that
>>>> is, there is no functionality similar to ctrl-r (which searches
>>>> through the history for matching commands), something I use
>>>> frequently, and
>>>> - tab expansion is of limited use (e.g. doesn't browse files in the
>>>> current directory when expanding quoted arguments e.g. in
>>>> "read.table").
>>>>
>>>> All in all, I'd be happy to continue using the plain R console, but
>>>> syntax highlighting would be nice. Any advice would be extremely
>>>> welcome.
>>>>
>>>> Kind regards,
>>>>
>>>> January
>>>>
>>>>
>>>>
>>>>> sessionInfo()
>>>> R version 2.12.2 (2011-02-25)
>>>> Platform: i486-pc-linux-gnu (32-bit)
>>>>
>>>> locale:
>>>>  [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C
>>>> LC_TIME=en_US.utf8        LC_COLLATE=en_US.utf8     LC_MONETARY=C
>>>>  [6] LC_MESSAGES=en_US.utf8    LC_PAPER=en_US.utf8       LC_NAME=C
>>>>            LC_ADDRESS=C              LC_TELEPHONE=C
>>>> [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
>>>>
>>>> attached base packages:
>>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>>
>>>>
>>>> --
>>>>
>>>> ______________________________________________
>>>> R-help_at_r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>
>>>
>>>
>>>
>>> --
>>> Do you know how to read?
>>> http://www.alienetworks.com/srtest.cfm
>>> http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
>>> Do you know how to write?
>>> http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
>>>
>>
>>
>>
>> --
>> -------- Dr. January Weiner 3 --------------------------------------
>> Max Planck Institute for Infection Biology
>> Charitéplatz 1
>> D-10117 Berlin, Germany
>> Web   : www.mpiib-berlin.mpg.de
>> Tel     : +49-30-28460514
>>
>> ______________________________________________
>> R-help_at_r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>
> --
> Do you know how to read?
> http://www.alienetworks.com/srtest.cfm
> http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
> Do you know how to write?
> http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
>

-- 
-------- Dr. January Weiner 3 --------------------------------------
Max Planck Institute for Infection Biology
Charitéplatz 1
D-10117 Berlin, Germany
Web   : www.mpiib-berlin.mpg.de
Tel     : +49-30-28460514

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 01 Apr 2011 - 15:35:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 01 Apr 2011 - 16:20:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive