Re: [Rd] Odd behaviour in within.list() when deleting 2+ variables

2017-06-26 Thread peter dalgaard
> On 26 Jun 2017, at 21:56 , Martin Maechler wrote: > > > Indeed, the fix I've committed reverts almost to the previous > first version of within.data.frame (which is from Peter > Dalgaard, for those who don't know). > Great foresight on my part there, eh? ;-) -p -- Peter Dalgaard, Profe

Re: [Rd] Odd behaviour in within.list() when deleting 2+ variables

2017-06-26 Thread Martin Maechler
> "PD" == Peter Dalgaard > on Mon, 26 Jun 2017 20:12:38 +0200 writes: >> On 26 Jun 2017, at 19:04 , Martin Maechler >> wrote: >> >>> peter dalgaard on Mon, 26 Jun >>> 2017 13:43:28 +0200 writes: >> >>> This seems to be due to changes made by Mar

Re: [Rd] Odd behaviour in within.list() when deleting 2+ variables

2017-06-26 Thread Peter Dalgaard
> On 26 Jun 2017, at 19:04 , Martin Maechler wrote: > >> peter dalgaard >>on Mon, 26 Jun 2017 13:43:28 +0200 writes: > >> This seems to be due to changes made by Martin Maechler in >> 2008. Presumably this fixed something, but it escapes my >> memory. > > Yes: The change set (svn

Re: [Rd] Odd behaviour in within.list() when deleting 2+ variables

2017-06-26 Thread Martin Maechler
> peter dalgaard > on Mon, 26 Jun 2017 13:43:28 +0200 writes: > This seems to be due to changes made by Martin Maechler in > 2008. Presumably this fixed something, but it escapes my > memory. Yes: The change set (svn -c46441) also contains the following NEWS entry BUG F

Re: [Rd] Odd behaviour in within.list() when deleting 2+ variables

2017-06-26 Thread peter dalgaard
This seems to be due to changes made by Martin Maechler in 2008. Presumably this fixed something, but it escapes my memory. However, it seems to have broken the equivalence between within.list and within.data.frame, so now within.list <- within.data.frame does not suffice. The crux of the mat

[Rd] Odd behaviour in within.list() when deleting 2+ variables

2017-06-26 Thread Hong Ooi via R-devel
The behaviour of within() with list input changes if you delete 2 or more variables, compared to deleting one: l <- list(x=1, y=2, z=3) within(l, { rm(z) }) #$x #[1] 1 # #$y #[1] 2 within(l, { rm(y) rm(z) }) #$x #[1] 1 # #$y #NULL # #$z #NULL When 2 or more variables are deleted,