Interspersed below.
Subject: Re: ifelse() woes ... can we agree on a ifelse2() ?
To: r-de...@lists.r-project.org
Date: Sunday, 27 November, 2016, 12:14 AM
On current 'ifelse' code in R:
...
* If 'test' is a factor, doing
storage.mode(test) <- "log
Well, that's embarrassing. Sorry for the noise on that front, everyone. I
misunderstood something from the aforementioned unrelated conversation I
was having, but not double checking is on me (I rarely use if else and when
I do I avoid that situation in my own code, which is why I didn't already
kn
> Suharto Anggono Suharto Anggono via R-devel
> on Sat, 26 Nov 2016 17:14:01 + writes:
> Just stating, in 'ifelse', 'test' is not recycled. As I said in "R-intro:
length of 'ifelse' result"
(https://stat.ethz.ch/pipermail/r-devel/2016-September/073136.html),
ifelse(conditio
> Related to the length of 'ifelse' result, I want to say that "example of
> different return modes" in ?ifelse led me to perceive a wrong thing in the
> past.
> ## example of different return modes:
> yes <- 1:3
> no <- pi^(0:3)
> typeof(ifelse(NA,yes, no)) # logical
>
Related to the length of 'ifelse' result, I want to say that "example of
different return modes" in ?ifelse led me to perceive a wrong thing in the past.
## example of different return modes:
yes <- 1:3
no <- pi^(0:3)
typeof(ifelse(NA,yes, no)) # logical
typeof(ifelse
For S Ellison, just clarifying, I am Suharto Anggono, not Martin Maechler.
"Martin et al.," from my previous E-mail was the beginning of message from
Gabriel Becker, that I quoted.
The quoted "still a bit disappointed that nobody has taken a look" is from
Martin Maechler.
In all of the proposed
> Just stating, in 'ifelse', 'test' is not recycled. As I said in "R-intro:
> length of 'ifelse' result"
> (https://stat.ethz.ch/pipermail/r-devel/2016-September/073136.html),
> ifelse(condition, a, b)
> returns a vector of the length of 'condition', even if 'a' or 'b' is longer.
That is indee
Just stating, in 'ifelse', 'test' is not recycled. As I said in "R-intro:
length of 'ifelse' result"
(https://stat.ethz.ch/pipermail/r-devel/2016-September/073136.html),
ifelse(condition, a, b) returns a vector of the length of 'condition', even if
'a' or 'b' is longer.
On current 'ifelse' cod
Martin et al.,
On Tue, Nov 22, 2016 at 2:12 AM, Martin Maechler wrote:
>
> Note that my premise was really to get *away* from inheriting
> too much from 'test'.
> Hence, I have *not* been talking about replacing ifelse() but
> rather of providing a new ifelse2()
>
>[ or if_else() if
> Gabriel Becker
> on Tue, 15 Nov 2016 11:56:04 -0800 writes:
> All,
> Martin: Thanks for this and all the other things you are doing to both
> drive R forward and engage more with the community about things like this.
> Apologies for missing this discussion the first
All,
Martin: Thanks for this and all the other things you are doing to both
drive R forward and engage more with the community about things like this.
Apologies for missing this discussion the first time it came around and if
anything here has already been brought up, but I wonder what exactly yo
Finally getting back to this :
> Hadley Wickham
> on Mon, 15 Aug 2016 07:51:35 -0500 writes:
> On Fri, Aug 12, 2016 at 11:31 AM, Hadley Wickham
> wrote:
>>> >> One possibility would also be to consider a
>>> "numbers-only" or >> rather "same type"-only {e.g.,
>>>
On Fri, Aug 12, 2016 at 11:31 AM, Hadley Wickham wrote:
>> >> One possibility would also be to consider a "numbers-only" or
>> >> rather "same type"-only {e.g., would also work for characters}
>> >> version.
>>
>> > I don't know what you mean by these.
>>
>> In the mean time, Bob
> >> One possibility would also be to consider a "numbers-only" or
> >> rather "same type"-only {e.g., would also work for characters}
> >> version.
>
> > I don't know what you mean by these.
>
> In the mean time, Bob Rudis mentioned dplyr::if_else(),
> which is very relevant, th
Excuse for the delay; I had waited for other / additional
comments and reactions (and been distracted with other urgent issues),
but do want to keep this thread alive [inline] ..
> Duncan Murdoch
> on Sat, 6 Aug 2016 11:30:08 -0400 writes:
> On 06/08/2016 10:18 AM, Martin Maech
> Uwe Ligges
> on Sun, 7 Aug 2016 09:51:58 +0200 writes:
> On 06.08.2016 17:30, Duncan Murdoch wrote:
>> On 06/08/2016 10:18 AM, Martin Maechler wrote:
[.]
>>> Of course, an ifelse2() should also be more efficient than
>>> ifelse() in typical "ato
On 06.08.2016 17:30, Duncan Murdoch wrote:
On 06/08/2016 10:18 AM, Martin Maechler wrote:
Dear R-devel readers,
( = people interested in the improvement and development of R).
This is not the first time that this topic is raised.
and I am in now state to promise that anything will result from
On 06/08/2016 10:18 AM, Martin Maechler wrote:
Dear R-devel readers,
( = people interested in the improvement and development of R).
This is not the first time that this topic is raised.
and I am in now state to promise that anything will result from
this thread ...
Still, I think the majority
have you tried seeing if `dplyr::if_else` behaves more to your liking?
On Sat, Aug 6, 2016 at 10:20 AM Martin Maechler
wrote:
> Dear R-devel readers,
> ( = people interested in the improvement and development of R).
>
> This is not the first time that this topic is raised.
> and I am in now stat
Dear R-devel readers,
( = people interested in the improvement and development of R).
This is not the first time that this topic is raised.
and I am in now state to promise that anything will result from
this thread ...
Still, I think the majority among us has agreed that
1) you should never use
20 matches
Mail list logo