Re: [Rd] How to assign NULL value to pairlist element while keeping it a pairlist?

2016-10-19 Thread Henrik Bengtsson
On Sat, Oct 15, 2016 at 2:00 AM, Martin Maechler wrote: >> Michael Lawrence >> on Wed, 12 Oct 2016 15:21:13 -0700 writes: > > > Thanks, this was what I expected. There is a desire to > > eliminate the usage of pairlist from user code, which > > suggests the alternative of

Re: [Rd] How to assign NULL value to pairlist element while keeping it a pairlist?

2016-10-19 Thread luke-tierney
On Wed, 19 Oct 2016, Henrik Bengtsson wrote: On Sat, Oct 15, 2016 at 2:00 AM, Martin Maechler wrote: Michael Lawrence on Wed, 12 Oct 2016 15:21:13 -0700 writes: > Thanks, this was what I expected. There is a desire to > eliminate the usage of pairlist from user code, which > su

Re: [Rd] How to assign NULL value to pairlist element while keeping it a pairlist?

2016-10-19 Thread Henrik Bengtsson
Thanks Luke. Yes, this is what I wrote as a workaround in my original post (and my first follow up): expr[[2]][1] <- list(x = NULL) expr[[2]] <- as.pairlist(expr[[2]]) but your alist <- expr[[2]] alist[1] <- list(NULL) expr[[2]] <- as.pairlist(alist) makes it a bit more clear what the issue is