Re: [Rd] unlist errors on a nested list of empty lists

2018-05-10 Thread Martin Maechler
> Steven Nydick > on Wed, 9 May 2018 13:25:11 + writes: > I do not have access to the bug reporting system. If somebody can get me > access, I can create a formal bug report. > The latter issues seem like duplicates of: > https://bugs.r-project.org/bugzilla3/show_

Re: [Rd] unlist errors on a nested list of empty lists

2018-05-09 Thread Steven Nydick
I do not have access to the bug reporting system. If somebody can get me access, I can create a formal bug report. The latter issues seem like duplicates of: https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=12572 (with slightly different output), but as that bug was reported nearly 10 years ag

Re: [Rd] unlist errors on a nested list of empty lists

2018-05-08 Thread Duncan Murdoch
On 08/05/2018 4:50 PM, Steven Nydick wrote: It also does the same thing if the factor is not on the first level of the list, which seems to be due to the fact that the islistfactor is recursive, but if a list is a list-factor, the first level lists are coerced into character strings. > x <-

Re: [Rd] unlist errors on a nested list of empty lists

2018-05-08 Thread Steven Nydick
It also does the same thing if the factor is not on the first level of the list, which seems to be due to the fact that the islistfactor is recursive, but if a list is a list-factor, the first level lists are coerced into character strings. > x <- list(list(factor(LETTERS[1]))) > unlist(x) Error i

Re: [Rd] unlist errors on a nested list of empty lists

2018-05-08 Thread Duncan Murdoch
On 08/05/2018 2:58 PM, Duncan Murdoch wrote: On 08/05/2018 1:48 PM, Steven Nydick wrote: Reproducible example: x <- list(list(list(), list())) unlist(x) *> Error in as.character.factor(x) : malformed factor* The error comes from the line structure(res, levels = lv, names = nm, class = "fact

Re: [Rd] unlist errors on a nested list of empty lists

2018-05-08 Thread Duncan Murdoch
On 08/05/2018 1:48 PM, Steven Nydick wrote: Reproducible example: x <- list(list(list(), list())) unlist(x) *> Error in as.character.factor(x) : malformed factor* The error comes from the line structure(res, levels = lv, names = nm, class = "factor") which is called because unlist() thinks

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

2018-05-08 Thread Steven Nydick
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 s