Re: [Rd] as.vector() broken on a matrix or array of type "list"

2018-09-26 Thread Hervé Pagès
Hi Martin, On 09/26/2018 12:41 AM, Martin Maechler wrote: Hervé Pagès on Tue, 25 Sep 2018 23:27:19 -0700 writes: > Hi, Unlike on an atomic matrix, as.vector() doesn't drop > the "dim" attribute of matrix or array of type "list": m <- matrix(list(), nrow=2, ncol=3) m

Re: [Rd] as.vector() broken on a matrix or array of type "list"

2018-09-26 Thread Martin Maechler
> Hervé Pagès > on Tue, 25 Sep 2018 23:27:19 -0700 writes: > Hi, Unlike on an atomic matrix, as.vector() doesn't drop > the "dim" attribute of matrix or array of type "list": >m <- matrix(list(), nrow=2, ncol=3) >m ># [,1] [,2] [,3] ># [1,] NULL NULL

[Rd] as.vector() broken on a matrix or array of type "list"

2018-09-26 Thread Hervé Pagès
Hi, Unlike on an atomic matrix, as.vector() doesn't drop the "dim" attribute of matrix or array of type "list": m <- matrix(list(), nrow=2, ncol=3) m # [,1] [,2] [,3] # [1,] NULL NULL NULL # [2,] NULL NULL NULL as.vector(m) # [,1] [,2] [,3] # [1,] NULL NULL NULL #