[R] Get the indices of non-zero entries of a sparse matrix in R

2010-07-06 Thread G FANG
Hi, I am trying to get the indices of non-zero entries of a sparse matrix in R sr d 1 1089 3772 1 2 1109 190 1 3 1109 2460 1 4 1109 3071 1 5 1109 3618 1 6 1109 38 1 I found that the following can create a sparse matrix, library(Matrix) Y - sparseMatrix(s,r,x=d) but have not idea

Re: [R] Get the indices of non-zero entries of a sparse matrix in R

2010-07-06 Thread David Winsemius
On Jul 6, 2010, at 3:46 PM, G FANG wrote: Hi, I am trying to get the indices of non-zero entries of a sparse matrix in R sr d 1 1089 3772 1 2 1109 190 1 3 1109 2460 1 4 1109 3071 1 5 1109 3618 1 6 1109 38 1 I found that the following can create a sparse matrix,