eapply() fails on baseenv() (PR#8761)

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

eapply() fails on baseenv() (PR#8761)

Duncan Murdoch
eapply() works on most environments, but not on baseenv().  For example,

 > x <- 1
 > eapply(globalenv(), function(x) x)
$x
[1] 1

 > eapply(baseenv(), function(x) x)
list()

I'm probably not going to have time to work on this before 2.3.0, but I
don't think it's really urgent; if no one else fixes it first I'll do it
after the release.

Duncan Murdoch

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

Re: eapply() fails on baseenv() (PR#8761)

Brian Ripley
This is because baseenv() is special and has neither HASHTAB nor FRAME.
R_lsInternal shows how to treat it, and I will commit a fix shortly.

On Tue, 11 Apr 2006, [hidden email] wrote:

> eapply() works on most environments, but not on baseenv().  For example,
>
> > x <- 1
> > eapply(globalenv(), function(x) x)
> $x
> [1] 1
>
> > eapply(baseenv(), function(x) x)
> list()
>
> I'm probably not going to have time to work on this before 2.3.0, but I
> don't think it's really urgent; if no one else fixes it first I'll do it
> after the release.
>
> Duncan Murdoch
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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