[R] about the char _

Patrick Connolly P.Connolly at hortresearch.co.nz
Fri Oct 5 14:32:34 CEST 2001


According to Philippe Grosjean:
|> 

.....

|> 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.

Here is one stick-in-the-mud who does not share the enthusiasm for
such a change.  I started using Splus almost 10 years ago, and being a
confirmed lazy typist ever since I started using unix, I immediately
adopted the '_' shortform instead of the clumsy '<-' sequence.  It's
an ingrained habit now which will be hard for an old codger to get out
of.  Some esteemed contributors to this list have strong feelings
against its use, but for my own use, I don't encounter any problems.
If I make my code public I change it, but at the time of writing it in
the first place, I'm very attached to lazy typing.

There are hundreds of files of code which I have written the lazy way
and I periodically source those.  Perhaps it wouldn't be difficult to
search and replace in those files, but I'd prefer not to edit them
since the date of the files is important information.

Of course, such a stick-in-the-mud attitude does make it difficult to
make progress by insisting on backward compatibility, but I offer a
suggestion.

You could get a similar effect with names such as my..variable which
would be visually distinctive from my.variable and still work with the
current convention, but I don't know if SAS could deal with such a
name. There could be a problem with ..myfun.x1 because it would not be
available to the likes of objects(), but there could well be a way
around that.

best


-- 
*************************************************************
   ___      Patrick Connolly
 {~._.~}    HortResearch             Great minds discuss ideas;
 _( Y )_    Mt Albert                Average minds discuss events; 
(:_~*~_:)   Auckland                 Small minds discuss people.
 (_)-(_)    New Zealand                                    .... Anon
            Ph: +64-9 815 4200 x 7188
*************************************************************


______________________________________________________
The contents of this e-mail are privileged and/or confidential to the
named recipient and are not to be used by any other person and/or
organisation. If you have received this e-mail in error, please notify 
the sender and delete all material pertaining to this e-mail.
______________________________________________________
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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