[R] no _?
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Sat Dec 8 12:19:55 CET 2001
Rolf Turner <rolf at maths.uwa.edu.au> writes:
> Jeff D. Hamann writes:
>
> > I see the uderscore "_" is not allowed in R. This make R a real drag when
> > trying to use with SQL packages and c code. Why is the underscore not
> > allowed and will it be allowed in a future release?
>
> But the underscore ***is*** allowed in R!!!
>
> E.g.
>
> > x _ 42
> > x
> [1] 42
>
> :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-)
The underscore *may* be allowed in variable names in some future
release, but first we need to get rid of the use as assignment
operator...
The main obstacle is S compatibility, both ways. One thing is that
scripts with underscores as assignment might break on R (they're
unreadable to human eyes anyway...), but imagine running an R script
under S-PLUS with
do_list <- function(whatever)whichever()
and creating two objects "do" and "list", one of which is overriding a
fairly important system function...
--
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