[ESS] Questions regarding R + Aquamacs + ESS

Martin Maechler maechler at stat.math.ethz.ch
Mon Sep 21 09:31:26 CEST 2009


>>>>> "jr" == johannes rara <johannesraja at gmail.com>
>>>>>     on Sat, 19 Sep 2009 14:26:11 +0300 writes:

    jr> Hi (I did sent this post also to R-sig-mac, but I think
    jr> this is the right forum for this post),

    jr> I have few questions regarding R 2.9.2 + Aquamacs +
    jr> ESS. I'm moving from WinXP to Mac (Snow Leopard 10.6.1)
    jr> and also from Tinn-R to Aquamacs (1.8c).

    jr> 1. Is there syntax highlighting in Aqaumacs? Now when I
    jr> open .R file only the lines starting with comment mark
    jr> (#), quoted words etc. are shown in color. What about
    jr> R:s reserved words? In Tinn-R these words where shown
    jr> blue. Is there this kind of functionality in Aquamacs?

You may be used to it (Tinn-R's behavior) but note that R
has practically *NO* reserved words (*) and Tinn-R colorizes 
(AFAIK, I'm not using it) several thousand of function names,
from 'base' and 'stats' .. packages.
These are not reserved in the strict sense, and with a
system as R and the 2000 CRAN+bioconductor packages, it's not
clear what names you should consider part of the language, and
which to be "user extentions", e.g., should 'lmer' be colorized
(Emacs language "fontified") or not?

Should the fontification happen for all standard + recommended
packages (but e.g., 'lme4' is not among those), or rather 
for all objects that are currently visible in search() ?

In the end, I quite like the fact that ESS does not fontify too
many of these..

Martin

-----
(*)  The 'R Language Manual',  section 'Reserved Words'
     (currently 10.3.3) contains 

 > The following identifiers have a special meaning and cannot be used for
 > object names
 > 
 >      if else repeat while function for in next break
 >      TRUE FALSE NULL Inf NaN
 >      NA NA_integer_ NA_real_ NA_complex_ NA_character_
 >      ... ..1 ..2 etc.



More information about the ESS-help mailing list