Re: [Rd] unlist strips date class

2016-12-06 Thread Hervé Pagès
On 12/05/2016 01:05 AM, peter dalgaard wrote: On 02 Dec 2016, at 23:13 , Hervé Pagès wrote: More generally one might reasonably expect 'unlist(x)' to be equivalent to 'do.call(c, x)' on a list 'x' where all the list elements are atomic vectors: Well, both are generic,

Re: [Rd] unlist strips date class

2016-12-05 Thread peter dalgaard
On 02 Dec 2016, at 23:13 , Hervé Pagès wrote: > More generally one might reasonably expect 'unlist(x)' to be equivalent > to 'do.call(c, x)' on a list 'x' where all the list elements are atomic > vectors: Well, both are generic, and e.g. there is no "Date" method for

Re: [Rd] unlist strips date class

2016-12-02 Thread Hervé Pagès
Hi, On 12/02/2016 10:45 AM, Kenny Bell wrote: Is this a bug? unlist(list(as.Date("2015-01-01"))) [1] 16436 Good question. More generally one might reasonably expect 'unlist(x)' to be equivalent to 'do.call(c, x)' on a list 'x' where all the list elements are atomic vectors: x <-

Re: [Rd] unlist strips date class

2016-12-02 Thread Dirk Eddelbuettel
On 2 December 2016 at 10:45, Kenny Bell wrote: | Is this a bug? | | > unlist(list(as.Date("2015-01-01"))) | [1] 16436 Not really, it is documented. S3 classes operate via an attribute tag, and attributes get dropped by certain base functions. I must have hit something like the following about

[Rd] unlist strips date class

2016-12-02 Thread Kenny Bell
Is this a bug? > unlist(list(as.Date("2015-01-01"))) [1] 16436 [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel