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
":=" 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
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
= `<-` # 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
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
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
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
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
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
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
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"
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
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
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
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
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>
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
17 matches
Mail list logo