ans[nas] <- NA in 'ifelse' (was: ifelse() woes ... can we agree on a ifelse2() ?)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ans[nas] <- NA in 'ifelse' (was: ifelse() woes ... can we agree on a ifelse2() ?)

R devel mailing list
Removal of
ans[nas] <- NA
from the code of function 'ifelse' in R is not committed (yet). Why?

--------------------------------------------
On Mon, 28/11/16, Martin Maechler <[hidden email]> wrote:

 Subject: Re: [Rd] ifelse() woes ... can we agree on a ifelse2() ?

 Cc: [hidden email], [hidden email]
 Date: Monday, 28 November, 2016, 10:00 PM
 
>>>>> Suharto Anggono Suharto Anggono via R-devel <r-devel at r-project.org>
>>>>>     on Sat, 26 Nov 2016 17:14:01 +0000 writes:

...


    > On current 'ifelse' code in R:

    > * The part
    > ans[nas] <- NA
    > could be omitted because NA's are already in place.
    > If the part is removed, variable 'nas' is no longer used.

I agree that this seems logical.  If I apply the change, R's own
full checks do not seem affected, and I may try to commit that
change and "wait and see".


...

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: ans[nas] <- NA in 'ifelse' (was: ifelse() woes ... can we agree on a ifelse2() ?)

Martin Maechler
>>>>> Suharto Anggono Suharto Anggono <[hidden email]>
>>>>>     on Sat, 4 Nov 2017 12:11:48 +0000 writes:

    > Removal of
    > ans[nas] <- NA
    > from the code of function 'ifelse' in R is not committed (yet). Why?

because I have been using it in my version of R-devel for this whole
year, but have forgotten to commit it.

Thank you for the reminder.  I have committed it now :

------------------------------------------------------------------------
r73681 | maechler | 2017-11-06 15:39:20 +0100 (Mon, 06 Nov 2017) | 3 lines

drop extraneous line, as suggested by Suharto Anggono, and as "promised" on R-devel list, Nov 26, 2016

------------------------------------------------------------------------


    > On Mon, 28/11/16, Martin Maechler <[hidden email]> wrote:

    > Subject: Re: [Rd] ifelse() woes ... can we agree on a ifelse2() ?
    > To: "Suharto Anggono" <[hidden email]>
    > Cc: [hidden email], [hidden email]
    > Date: Monday, 28 November, 2016, 10:00 PM
 
>>>>> Suharto Anggono Suharto Anggono via R-devel <r-devel at r-project.org>
>>>>>     on Sat, 26 Nov 2016 17:14:01 +0000 writes:

    > ...


    >> On current 'ifelse' code in R:

    >> * The part
    >> ans[nas] <- NA
    >> could be omitted because NA's are already in place.
    >> If the part is removed, variable 'nas' is no longer used.

    > I agree that this seems logical.  If I apply the change, R's own
    > full checks do not seem affected, and I may try to commit that
    > change and "wait and see".

    > ...

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel