[R] Sparse matrix row/column access (SparseM)?

Roger Koenker roger at ysidro.econ.uiuc.edu
Fri Jan 16 21:55:05 CET 2004

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:

> 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
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

More information about the R-help mailing list