[Rd] Off-topic: Pretty-printing R (or S) code with GNU a2ps
Kurt Hornik
Kurt.Hornik@ci.tuwien.ac.at
Sun, 25 Feb 2001 14:52:09 +0100
>>>>> Peter Dalgaard BSA writes:
> Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> writes:
>> R-lang says:
>>
>> The following identifiers have a special meaning and should not
>> be used for object names
>>
>> if else repeat while function for in next break
>> TRUE FALSE NULL NA Inf NaN
>> ... ..1 ..2 etc.
>>
>> so I think this is the list of keywords to use.
>>
>> (Yes switch() is not in there ...)
> switch() is technically a function call...
> The true authority is the keywords[] array in gram.y, a study of which
> indicates that ..1, ..2 et al. do bit count as keywords, whereas ...
> does and we have an extra which was new to me, namely GLOBAL.ENV, and
> truly enough:
>> GLOBAL.ENV
> <environment: R_GlobalEnv>
>> GLOBAL.ENV <- 5
> Error in <environment> <- 5 : invalid (do_set) left-hand side to
> assignment
> Wonder what that one is good for? The only symbolic reference to
> it in the entire source is in gram.c, but I suppose its value gets
> initialized somewhere. Looks like a relic from older times, but I
> wouldn't dare to remove it for 1.2.2...
Fascinating. Maybe file it as a bug report so that we do not forget to
fix this in the future?
-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._