kuwisdelu / matter

Out-of-core statistical computing and signal processing
http://www.cardinalmsi.org
54 stars 4 forks source link

[Suggestion]: automatic propagation of dimnames #4

Closed PeteHaitch closed 6 years ago

PeteHaitch commented 7 years ago

Hi Kylie,

Would you consider making some (or all of) matter(), matter_*(), and as.matter() support automatic propagation of dimnames?

library(matter)
#> Loading required package: biglm
#> Loading required package: DBI
#> 
#> Attaching package: 'matter'
#> The following objects are masked from 'package:base':
#> 
#>     apply, scale
x <- matrix(1:10, ncol = 2, dimnames = list(NULL, c("A", "B")))
dimnames(x)
#> [[1]]
#> NULL
#> 
#> [[2]]
#> [1] "A" "B"
dimnames(as.matter(x))
#> NULL
dimnames(matter(x))
#> NULL
dimnames(matter_mat(x))
#> NULL

Thanks, Pete

kuwisdelu commented 7 years ago

That's a good idea, yes. I'll add it to my todos.

kuwisdelu commented 6 years ago

Using as.matter() should retain names and dimnames where appropriate now in >= v1.3.6.