Re: [R] the less-than-minus gotcha

2015-02-04 Thread Greg Snow
Steve (and any others still paying attention to this thread), Larry Wall (author of Perl) said something along the lines of: things that are similar should look similar, things that are different should look different. Ironically one of the first places I saw that quote was in a Perl vs. Python

Re: [R] the less-than-minus gotcha

2015-02-03 Thread Martin Maechler
":=" had its nice history, but as it was not accepted into S *instead* of '=', it also fell away for R ... Martin Maechler, ETH Zurich (and R Core team since "prehistory") > -----Original Message- From: Jeff Newmiller > [mailto:jdnew...@dcn.davis.c

Re: [R] the less-than-minus gotcha

2015-02-03 Thread Mike Miller
Kevin Thorpe wrote, "Moral of story, computers do what you tell them, not what you meant." But hope springs eternal! Of course this aphorism explains neatly every problem I've ever run across while using a computer. But maybe someday they'll make a computer that undertands *me*! Peter Dalg

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Steve Taylor
= `<-` # this is going in my .Rprofile x := 1 -Original Message- From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us] Sent: Tuesday, 3 February 2015 3:54p To: Steve Taylor; r-h...@stat.math.ethz.ch Subject: Re: [R] the less-than-minus gotcha I did not start out liking <-, but I

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Jeff Newmiller
I did not start out liking <-, but I am quite attached to it now, and even Rcpp feels weird to me now. This may seem like yet another variation on a theme that you don't find compelling, but I find that f(x=x) makes sense when scope is considered, but x=x on its own is silly. That is why I pr

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Steve Taylor
: Re: [R] the less-than-minus gotcha On Mon, Feb 2, 2015 at 8:57 PM, Steve Taylor wrote: Fair enough, but you skipped right past the most important one: it makes code easier to read. It's very nice to be able to visually scan through the code and easily see where assignment ha

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Ista Zahn
On Mon, Feb 2, 2015 at 8:57 PM, Steve Taylor wrote: > Responding to several messages in this thread... > >> > All the more reason to use = instead of <- >> Definitely not! > > Martin and Rolf are right, it's not a reason for that; I wrote that quickly > without thinking it through. An "=" user m

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Steve Taylor
Responding to several messages in this thread... > > All the more reason to use = instead of <- > Definitely not! Martin and Rolf are right, it's not a reason for that; I wrote that quickly without thinking it through. An "=" user might be more likely to fall for the gotcha, if not spacing the

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Martin Maechler
e war is on. I'll stop reading R-help for a while.." ;-) ;-) ] > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ben Bolker > Sent: Monday, 2 February 2015 2:07p > To: r-h...@stat.math.ethz.ch > Subject: Re: [R] the less-tha

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Robert Douglas Kinley
alf Of Rolf Turner Sent: 02 February 2015 11:58 To: Steve Taylor; r-h...@stat.math.ethz.ch Subject: Re: [R] the less-than-minus gotcha On 02/02/15 14:26, Steve Taylor wrote: > All the more reason to use = instead of <- Couldn't agree less, Steve. The "<-" should be used for assignmen

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Ted Harding
On 02-Feb-2015 11:58:10 Rolf Turner wrote: > > On 02/02/15 14:26, Steve Taylor wrote: > >> All the more reason to use = instead of <- > > Couldn't agree less, Steve. The "<-" should be used for assignment. The > "=" sign should be reserved for handling function arguments in the > "name=value"

Re: [R] the less-than-minus gotcha

2015-02-02 Thread peter dalgaard
I'd rather say that it is good reason to use spaces around operators. Makes the code easier to read too. (_Possible_ to read for some.) We've probably all done it. I did, once upon a time in S-Plus, on the results of a multi-day simulation study: > <>$statistic [1] -1.28 > sim <- sapply(1:1

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Rolf Turner
On 02/02/15 14:26, Steve Taylor wrote: All the more reason to use = instead of <- Couldn't agree less, Steve. The "<-" should be used for assignment. The "=" sign should be reserved for handling function arguments in the "name=value" form. Doing anything else invites confusion and occasio

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Jim Lemon
26 PM, Steve Taylor wrote: >> >> All the more reason to use = instead of <- >> >> >> -Original Message- >> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ben Bolker >> Sent: Monday, 2 February 2015 2:07p >> To: r-h...@stat.math.ethz.ch

Re: [R] the less-than-minus gotcha

2015-02-01 Thread Kevin E. Thorpe
evin On 02/01/2015 08:26 PM, Steve Taylor wrote: All the more reason to use = instead of <- -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ben Bolker Sent: Monday, 2 February 2015 2:07p To: r-h...@stat.math.ethz.ch Subject: Re: [R] the less-than-m

Re: [R] the less-than-minus gotcha

2015-02-01 Thread Steve Taylor
All the more reason to use = instead of <- -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ben Bolker Sent: Monday, 2 February 2015 2:07p To: r-h...@stat.math.ethz.ch Subject: Re: [R] the less-than-minus gotcha Mike Miller gmail.com>

Re: [R] the less-than-minus gotcha

2015-02-01 Thread Ben Bolker
Mike Miller gmail.com> writes: > > I've got to remember to use more spaces. Here's the basic problem: > > These are the same: > > v< 1 > v<1 > > But these are extremely different: > > v< -1 > v<-1 > This is indeed documented, in passing, in one of the pages you listed: http://tim-smith.u