[R] Matrix package: writeMM

Jose Quesada quesada at gmail.com
Tue May 15 14:47:49 CEST 2007


Hi,

I'm finding that readMM() cannot read a file written with writeMM().  
Example:

library(Matrix)
a = Matrix(c(1,0,3,0,0,5), 10, 10)
a = as(a, "CsparseMatrix")
writeMM(a, "kk.mm")
b = readMM("kk.mm")

Error in validObject(.Object) : invalid class "dgTMatrix" object: all row  
indices must be between 0 and nrow-1

Thoughts?

Thanks,
-Jose


-- 
Jose Quesada, PhD.
http://www.andrew.cmu.edu/~jquesada



More information about the R-help mailing list