Re: [Rd] stack problem

2016-06-27 Thread Michael Lawrence
Agreed. Just putting that out there. On Mon, Jun 27, 2016 at 12:49 PM, Gabor Grothendieck wrote: > One would normally want the original order that so that one can stack > a list, operate on the result and then unstack it back with the > unstacked result having the same ordering as the original. >

Re: [Rd] stack problem

2016-06-27 Thread Gabor Grothendieck
One would normally want the original order that so that one can stack a list, operate on the result and then unstack it back with the unstacked result having the same ordering as the original. LL <- list(z = 1:3, a = list()) # since we can't do s <- stack(LL,. drop = FALSE) do this instead: s <- t

Re: [Rd] stack problem

2016-06-27 Thread Michael Lawrence
I'll add the drop argument but I'm wondering about the order of the levels. Should we set the levels to unique(names(x)) or sort them, too? On Mon, Jun 27, 2016 at 10:39 AM, Gabor Grothendieck wrote: > stack() seems to drop empty levels. Perhaps there could be a > drop=FALSE argument if one want

[Rd] stack problem

2016-06-27 Thread Gabor Grothendieck
stack() seems to drop empty levels. Perhaps there could be a drop=FALSE argument if one wanted all the original levels. In the example below, we may wish to retain level "b" in s$ind even though component LL$b has length 0. > LL <- list(a = 1:3, b = list()) > s <- stack(LL) > str(s) 'data.frame'

Re: [Rd] Two minor build system patches.

2016-06-27 Thread Ray Donnelly
On Mon, Jun 27, 2016 at 12:07 PM, Duncan Murdoch wrote: > On 27/06/2016 6:58 AM, Ray Donnelly wrote: >> >> Hi all, >> >> I ran into a few problems building R 3.3.1 and came up wth the >> attached patches (fingers crossed they don't get stripped, I've also >> sent this email to Jeroen since that wo

Re: [Rd] Two minor build system patches.

2016-06-27 Thread Duncan Murdoch
On 27/06/2016 6:58 AM, Ray Donnelly wrote: Hi all, I ran into a few problems building R 3.3.1 and came up wth the attached patches (fingers crossed they don't get stripped, I've also sent this email to Jeroen since that worked last time). Would it be possible to review and merge them if they are

[Rd] Two minor build system patches.

2016-06-27 Thread Ray Donnelly
Hi all, I ran into a few problems building R 3.3.1 and came up wth the attached patches (fingers crossed they don't get stripped, I've also sent this email to Jeroen since that worked last time). Would it be possible to review and merge them if they are OK? The first one uses AC_SEARCH_LIBS inste