From @wnydick @ending from gm@il@com  Tue May  8 19:48:41 2018
From: @wnydick @ending from gm@il@com (Steven Nydick)
Date: Tue, 08 May 2018 17:48:41 +0000
Subject: [Rd] unlist errors on a nested list of empty lists
Message-ID: <CAJMBSp1UX5z1Ou3bPdc0Nk4GT1Q1oqdqWEfs3wHH_r130ettrw@mail.gmail.com>

Reproducible example:

x <- list(list(list(), list()))
unlist(x)

*> Error in as.character.factor(x) : malformed factor*

What should happen:

unlist(x)
> NULL

R.version
platform       x86_64-apple-darwin15.6.0
arch           x86_64
os             darwin15.6.0
system         x86_64, darwin15.6.0
status
major          3
minor          5.0
year           2018
month          04
day            23
svn rev        74626
language       R
version.string R version 3.5.0 (2018-04-23)
nickname       Joy in Playing
-- 
Steven Nydick
PhD, Quantitative Psychology
M.A., Psychology
M.S., Statistics
--
"Beware of the man who works hard to learn something, learns it, and finds
himself no wiser than before, Bokonon tells us. He is full of murderous
resentment of people who are ignorant without having come by their
ignorance the hard way."
-Kurt Vonnegut

	[[alternative HTML version deleted]]



[Rd] unlist errors on a nested list of empty lists
Steven Nydick