[R] about the char _

Don MacQueen macq at llnl.gov
Fri Oct 5 16:11:26 CEST 2001


I can't think of any alternative either.

Note that Insightful started allowing "=" as a valid assignment 
operator in Splus starting in version 5 (I think it was). I assume 
they did this bowing to popular demand, but it was a mistake, because 
one can now clobber oneself rather badly with a simple and 
easy-to-make typographical error:

>  x <- 3
>  if (x=4) cat('Oops!\n')
Oops!
>  x
[1] 4

-Don

(yes, there are many ways to hurt oneself with typos, but this one 
is, I think, more dangerous than most)

At 12:05 AM +1200 10/6/01, Murray Jorgensen wrote:
>Just one small point: the assignment symbol must be about the most commonly
>used symbol in any computer language. Yet in R and S+ it is represented by
>a two-character string with, moreover, a change in case! I won't mind
>giving up underscore as an assignment if an alternate single character,
>preerably lower-case symbol is made available. Trouble is, I can't think of
>anything!
>
>Murray Jorgensen
>
>
>Dr Murray Jorgensen       http://www.stats.waikato.ac.nz/Staff/maj.html
>Department of Statistics, University of Waikato, Hamilton, New Zealand
>*Applications Editor, Australian and New Zealand Journal of Statistics*
>maj at waikato.ac.nz Phone +64-7 838 4773 home phone 856 6705 Fax 838 4155
>
>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
>r-help 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-help-request at stat.math.ethz.ch
>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


-- 
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
--------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list