[R] row echelon form

2007-08-31 Thread Scott Hyde
Hi everyone, I am looking to use R as a MATLAB replacement for linear algebra. I've done a fairly good job for finding replacements for most of the functions I'm interested in, I John Fox wrote a program for implementing the reduced row echelon form of a matrix (by doing the Gauss-Jordan

[R] an array of matrices

2007-05-21 Thread Scott Hyde
I'd like to have a three dimensional array of matrices. I thought I could construct a five dimensional array to have the three dimensional array of matrices. However, not all of the matrices in the array have the same dimensions, which seems to mean I can't use a five dimensional array.

Re: [R] an array of matrices

2007-05-21 Thread Scott Hyde
,]00010 [5,]00001 Thanks again for the help! -Scott Original message Date: Mon, 21 May 2007 04:57:40 -0400 From: jim holtman [EMAIL PROTECTED] Subject: Re: [R] an array of matrices To: Scott Hyde [EMAIL PROTECTED] Cc: r-help

Re: [R] Reshape a sparse matrix

2007-05-16 Thread Scott Hyde
was up to date. -Scott Original message Date: Wed, 16 May 2007 09:32:44 +0200 From: Martin Maechler [EMAIL PROTECTED] Subject: Re: [R] Reshape a sparse matrix To: Scott Hyde [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Scott == Scott Hyde [EMAIL PROTECTED] on Tue, 15 May 2007 17

[R] Reshape a sparse matrix

2007-05-15 Thread Scott Hyde
Hi, I'd like to reshape a sparse matrix generated from the Matrix package. I can't seem to do it with the command dim(A) - c(6,9) which works perfectly with the base package matrices, but with the sparse matrices it errors with Error in dim(A) = c(6, 9) : dim- : invalid first argument

[R] Reshape a sparse matrix

2007-05-15 Thread Scott Hyde
I wrote a function to reshape a sparse matrix of type dgTmatrix It is as follows: reshape.matrix - function(A,r,c) { ## Reshape a matrix from the Matrix package ## of type dgTmatrix ## r_old - [EMAIL PROTECTED] c_old - [EMAIL PROTECTED] if(as.numeric(r_old*c_old) !=