Skip to content

Sparse matrix row/column access (SparseM)?

3 messages · Renald Buter, Roger Koenker

#
Hello list,

I am creating sparse matrices using the SparseM package. These sparse
structures are to be used as a basis for (a number of) distance
matrices. But in order to create thoses, I must be able to read the
elements/rows/columns of the sparse structures in order to operate on
them.

Thus, how to go from sparse matrix to (sparse) rows, columns? Must I
create the functions myself or am I not reading the obvious in the
documentation?

Thanks in advance,

Renald
#
Given a matrix in any of the SparseM forms, you can access columns
and rows with the usual R subsetting conventions, e.g. A[,k]
gives the kth column, A[m,] gives the mth row...

As a general principle, questions about packages should probably
be directed first to package maintainers (in this case me) and
only in cases of non-response to r-help.


url:	www.econ.uiuc.edu/~roger/my.html	Roger Koenker
email	rkoenker at uiuc.edu			Department of Economics
vox: 	217-333-4558				University of Illinois
fax:   	217-244-6678				Champaign, IL 61820
On Fri, 16 Jan 2004, Renald Buter wrote:

            
#
On Fri, Jan 16, 2004 at 02:55:05PM -0600, Roger Koenker wrote:
*blush* 

Couln't be more simpler. Thank you.
My apologies. I was not aware of this convention.

Regards,

Renald