[R] In praise of ->

Murray Jorgensen maj at stats.waikato.ac.nz
Wed Feb 18 00:30:57 CET 2004



Liaw, Andy wrote:


 > This is also easily accomodated w/o the use of ->:  Instead of
 >
 > MyValue -> fred
 > [code that follows]
 >
 > use:
 >
 > fred <-
 > MyValue
 > [code that follows]
 >
 > Andy

The point is that

-> fred
[code that follows]

is sitting as one piece in the clipboard. So instead of

3 <paste>
8 <paste>
etc

you need to do

fred -> 3 <paste>
fred -> 8 <paste>
etc

Not a big saving, but some of us are lazy!


-- 
Dr Murray Jorgensen      http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waikato, Hamilton, New Zealand
Email: maj at waikato.ac.nz                                Fax 7 838 4155
Phone  +64 7 838 4773 wk    +64 7 849 6486 home    Mobile 021 1395 862




More information about the R-help mailing list