Change in lapply's missing argument passing

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

Change in lapply's missing argument passing

R devel mailing list
Consider the following expression, in which we pass 'i=', with no value
given for the 'i' argument, to lapply.
    lapply("x", function(i, j) c(i=missing(i),j=missing(j), i=)
From R-2.14.0 (2011-10-31) through R-3.4.4 (2018-03-15) this evaluated to
c(i=TRUE, j=FALSE).  From R-3.5.0 (2018-04-23) through R-4.0.0 (2020-04-24)
this evaluated to c(i=FALSE, j=TRUE).

Was this change intentional?

Bill Dunlap
TIBCO Software
wdunlap tibco.com

        [[alternative HTML version deleted]]

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

Re: [External] Change in lapply's missing argument passing

luke-tierney
Yes, to resolve

https://bugs.r-project.org/bugzilla/show_bug.cgi?id=15199

Best,

luke

On Fri, 26 Jun 2020, William Dunlap via R-devel wrote:

> Consider the following expression, in which we pass 'i=', with no value
> given for the 'i' argument, to lapply.
>    lapply("x", function(i, j) c(i=missing(i),j=missing(j), i=)
> From R-2.14.0 (2011-10-31) through R-3.4.4 (2018-03-15) this evaluated to
> c(i=TRUE, j=FALSE).  From R-3.5.0 (2018-04-23) through R-4.0.0 (2020-04-24)
> this evaluated to c(i=FALSE, j=TRUE).
>
> Was this change intentional?
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

--
Luke Tierney
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:   [hidden email]
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu

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