I have data in i,j,r format, where r is the value in location A[i,j] for some imaginary matrix A. I need to build this matrix A, but given the sizes of i and j, I believe that using a sparse format would be most adequate. Hopefully this will allow me to perform some basic matrix manipulation such as multiplication, addition, rowsums, transpositions, subsetting etc etc. Is there any way to achieve this goal in R? Thanks, Danny [[alternative HTML version deleted]]
Take a look at the package SparseM url: www.econ.uiuc.edu/~roger 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 Aug 31, 2004, at 4:52 PM, Danny Heuman wrote:> > I have data in i,j,r format, > > > > where r is the value in location A[i,j] for some imaginary matrix A. > > I need to build this matrix A, but given the sizes of i and j, I > believe that using a sparse format would be most adequate. > > Hopefully this will allow me to perform some basic matrix manipulation > such as multiplication, addition, rowsums, transpositions, subsetting > etc etc. > > > > Is there any way to achieve this goal in R? > Thanks, > > Danny > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html
Hi! help.search("sparse matrix") graph2SparseM(graph) Coercion methods between graphs and sparse matrices tripletMatrix-class(Matrix) Class "tripletMatrix" sparse matrices in triplet form SparseM.hb(SparseM) Harwell-Boeing Format Sparse Matrices image,matrix.csr-method(SparseM) Image Plot for Sparse Matrices etc ..... /E *********** REPLY SEPARATOR *********** On 8/31/2004 at 5:52 PM Danny Heuman wrote:>>>I have data in i,j,r format, >>> >>> >>> >>>where r is the value in location A[i,j] for some imaginary matrix A. >>> >>>I need to build this matrix A, but given the sizes of i and j, I believe >>>that using a sparse format would be most adequate. >>> >>>Hopefully this will allow me to perform some basic matrix manipulation >>>such as multiplication, addition, rowsums, transpositions, subsetting >>>etc etc. >>> >>> >>> >>>Is there any way to achieve this goal in R? >>>Thanks, >>> >>>Danny >>> >>> [[alternative HTML version deleted]] >>> >>>______________________________________________ >>>R-help at stat.math.ethz.ch mailing list >>>https://stat.ethz.ch/mailman/listinfo/r-help >>>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.htmlDipl. bio-chem. Witold Eryk Wolski @ MPI-Moleculare Genetic Ihnestrasse 63-73 14195 Berlin 'v' tel: 0049-30-83875219 / \ mail: witek96 at users.sourceforge.net ---W-W---- http://www.molgen.mpg.de/~wolski wolski at molgen.mpg.de