Dear all, I don't know the historical reason why the char '_' was defined in the R language grammar as a synonyme of the assignment <-, anyway the R documentation dosen't recommand its usage. Well, this is a real "incompatibility issue" each time we need to interface R with other language/systems, notably with database systems. Recall that, in perhaps all computer systems, the char '_' can be used in the name of a variable or a column in a data table. So that's my question : is there an option to change this behaviour ? All that I want is the possibility to use the same name of variables in my R source as they are declared in the other systems. Thanks -- Fan -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>Dear all,>I don't know the historical reason why the char '_' was >defined in the R language grammar as a synonyme of the >assignment <-, anyway the R documentation dosen't recommand >its usage.>Well, this is a real "incompatibility issue" each time >we need to interface R with other language/systems, notably with >database systems. Recall that, in perhaps all computer systems, >the char '_' can be used in the name of a variable or a column >in a data table.>So that's my question : is there an option to change this >behaviour ?>All that I want is the possibility to use the same name of >variables in my R source as they are declared in the other systems.>Thanks >-- >FanI totally agree with this. Since _ is a deprecated synonym of <-, is it any possibility to eliminate it in one of the next major versions of R? Therefore, a variable name like my_variable would become viable... like in most other computer languages. What I really appreciate in R synthax is that there is almost no ambiguities. I mean, in R, a word has only one signification. For instance <- is assignation, = gives a value to an argument in a function and == is for comparison, where some other languages use the same = in the different situations. As far as I know, there are only two cases where the same word (or character) can be used in two different situations: 1) A function, and an argument in a function can both have the same name, i.e., myfunction <- function(myfunction="value", arg2,...) {} is viable; 2) The dot is used both in variable names and to represent the object hierarchy: my.var and print.myvar. The first dot is part of the variable name, while the second dot separate the method (print) and the variable (myvar). If _ was allowed in variables names, we could use print.my_var (which should, perhaps, be recommended) and it would be easier to spot where is the "object hierarchy" and where is the variable name. Best, Philippe Grosjean ...........]<(({?<...............<?}))><............................... ) ) ) ) ) __ __ ( ( ( ( ( |__) | _ ) ) ) ) ) | hilippe |__)rosjean ( ( ( ( ( Marine Biol. Lab., ULB, Belgium ) ) ) ) ) __ ( ( ( ( ( |\ /| |__) ) ) ) ) ) | \/ |ariculture & |__)iostatistics ( ( ( ( ( ) ) ) ) ) e-mail: phgrosje at ulb.ac.be or phgrosjean at sciviews.org ( ( ( ( ( SciViews project coordinator (http://www.sciviews.org) ) ) ) ) ) tel: 00-32-2-650.29.70 (lab), 00-32-2-673.31.33 (home) ( ( ( ( ( ) ) ) ) ) "I'm 100% confident that p is between 0 and 1" ( ( ( ( ( L. Gonick & W. Smith (1993) ) ) ) ) ) ....................................................................... -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Yes I agree with Fan. For those of us (new to R and) who also use SAS, the
underscore is an ideal way to create variable names. In fact it provides a
good convention for naming global variables in code that is written to be
called by  say another "users" program. R's use of the
"." to concatenate
names is useful to distinguish variable levels but I think that being able
to name an object  _myfun.x1 would be a great asset in future versions of
R.
Gerard Keogh
                    Fan
                    <xiao.gang.fan1 at liber        To:     r-help at
stat.math.ethz.ch
                    tysurf.fr>                   cc:
                    Sent by:                     Subject:     [R] about the char
_
                    owner-r-help at stat.mat
                    h.ethz.ch
                    05/10/01 00:23
Dear all,
I don't know the historical reason why the char '_' was
defined in the R language grammar as a synonyme of the
assignment <-, anyway the R documentation dosen't recommand
its usage.
Well, this is a real "incompatibility issue" each time
we need to interface R with other language/systems, notably with
database systems. Recall that, in perhaps all computer systems,
the char '_' can be used in the name of a variable or a column
in a data table.
So that's my question : is there an option to change this
behaviour ?
All that I want is the possibility to use the same name of
variables in my R source as they are declared in the other systems.
Thanks
--
Fan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._._
The information in this email, and any attachments transmitted with it, are
confidential
and are for the intended recipient only. If you receive this message in error,
please
notify us via postmaster at cso.ie.
To see the latest figures from the CSO go to http://www.cso.ie
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._