[R] Creating a sparse matrix from a file

Pallavi Palleti pallavip.05 at gmail.com
Mon Oct 26 10:06:36 CET 2009


Hi all,

I am new to R and learning the same. I would like to create a sparse matrix
from an existing file whose contents are in the format
      "rowIndex,columnIndex,value"

for ex:
1,2,14
2,4,15

I would like to create a sparse matrix by taking the above as input.
However, I couldn't find an example where the data was being read from a
file. I tried searching in R tutorial and also searched for the same in web
but in vain. Could some one kindly help me how to give the above format as
input in R to create a sparse matrix.

Thanks
Pallavi

-- 
View this message in context: http://www.nabble.com/Creating-a-sparse-matrix-from-a-file-tp26056334p26056334.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list