From ggrothendieck at gmail.com  Mon Jun 27 19:39:12 2016
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Mon, 27 Jun 2016 13:39:12 -0400
Subject: [Rd] stack problem
Message-ID: <CAP01uRkHWezoiKQNbKCV6oCT9tqDiiQU5mzQO0iS_GCyEVMkLQ@mail.gmail.com>

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':   3 obs. of  2 variables:
 $ values: int  1 2 3
 $ ind   : Factor w/ 1 level "a": 1 1 1


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



[Rd] stack problem
Gabor Grothendieck