[R] about the char _

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Sat Oct 6 19:30:38 CEST 2001

Prof Brian D Ripley <ripley at stats.ox.ac.uk> writes:

> For clarity, can we note that there are two issues here?
> 1) Should "_" be allowed for assignment?   Currently "<-" and "->" and "_"
> and (in R-devel only, in some circumstances) "=" are allowed.
> 2) Should "_" be allowed in names.  This falls into two parts.
> a) should it be allowed in bare names (unquoted)
> b) should it be allowed in non-standard (quoted) names.
> Now 2a implies not-1, but there are a lot of other possibilities.
> Even if we change 1 to "no" (which I have advocated), I think allowing 2a
> would be very confusing to experienced users.  And several correspondents
> are asking for 2a, not to change 1.

And also note that we have compatibility issues both to and from
S-PLUS. One thing would be to dissuade people from using "_" for
assignment, which is arguably a relic (the character displayed as a
backarrow on JMC's terminal - the adm3a, as far as I remember), and
breaking older code is something we must do occasionally, but the
weirdness that could occur from porting R code with "_" inside
variable names to S-PLUS makes me shudder....

A 3rd issue, BTW, is that we might want to allow quoted names in some
contexts where we do not now - notably in model formulas.

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
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