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 NUL

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

2018-09-26 Thread MacQueen, Don via R-devel
With regard to Martin's comment about the strength of (base) R: I have R code I wrote 15+ years ago that has been used regularly ever since with only a few minor changes needed due to changes in R. Within that code, I find particularly impressive for its stability a simple custom GUI that uses

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

2018-09-26 Thread Spencer Graves
On 2018-09-26 10:32, MacQueen, Don via R-devel wrote: With regard to Martin's comment about the strength of (base) R: I have R code I wrote 15+ years ago that has been used regularly ever since with only a few minor changes needed due to changes in R. Within that code, I find particularly

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

[Rd] Bug in printing array of type "list"

2018-09-26 Thread Hervé Pagès
Hi, This array is of type "list" but print() reports otherwise: a1 <- array(list(1), 2:0) typeof(a1) # [1] "list" a1 # <2 x 1 x 0 array of character> # [,1] # [1,] # [2,] No such problem with an array of type "logical": a2 <- array(NA, 2:0) typeof(a2) # [1] "logic