Closed PeteHaitch closed 5 years ago
Would it be possible to support linear indexing of matter objects, as supported by base::array. E.g.,
suppressPackageStartupMessages(library(matter)) z <- matrix(1:10, ncol = 2) # base: Extracts the 3rd element z[3] #> [1] 3 # matter: Extracts the 3rd row Z <- matter_mat(z) Z[3] #> [1] 3 8 z2 <- array(z, dim = c(dim(z), 1)) dim(z2) #> [1] 5 2 1 # base: Extracts the 3rd element z2[3] #> [1] 3 Z2 <- matter_arr(z2) # matter: errors Z2[3] #> Error in Z2[3]: incorrect number of dimensions
This is now supported in versions >=1.9.6.
Would it be possible to support linear indexing of matter objects, as supported by base::array. E.g.,