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] download.file does not process gz files correctly (truncates them?)

2018-05-08 Thread Hadley Wickham
On Tue, May 8, 2018 at 8:15 AM, Hadley Wickham wrote: > On Thu, May 3, 2018 at 11:34 PM, Tomas Kalibera > wrote: >> On 05/03/2018 11:14 PM, Henrik Bengtsson wrote: >>> >>> Also, as mentioned in my >>> https://stat.ethz.ch/pipermail/r-devel/2012-August/064739.html, when >>> not specifying the mode

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

Re: [Rd] length of `...`

2018-05-08 Thread Hervé Pagès
Thanks Martin for the clarifications. H. On 05/04/2018 06:02 AM, Martin Maechler wrote: Hervé Pagès on Thu, 3 May 2018 08:55:20 -0700 writes: > Hi, > It would be great if one of the experts could comment on the > difference between Hadley's dotlength and ...length? The fa

Re: [Rd] download.file does not process gz files correctly (truncates them?)

2018-05-08 Thread Hadley Wickham
On Thu, May 3, 2018 at 11:34 PM, Tomas Kalibera wrote: > On 05/03/2018 11:14 PM, Henrik Bengtsson wrote: >> >> Also, as mentioned in my >> https://stat.ethz.ch/pipermail/r-devel/2012-August/064739.html, when >> not specifying the mode argument, the default on Windows is mode = "w" >> *except* for