Re: [R] working with sparse matrix

2011-06-22 Thread Martin Maechler
> David Winsemius > on Tue, 21 Jun 2011 12:07:47 -0400 writes: > On Jun 21, 2011, at 11:44 AM, Patrick Breheny wrote: >> On 06/21/2011 09:48 AM, davefrederick wrote: >>> Hi, I have a 500x 53380 sparse matrix and I am trying to >>> dichotomize it. Under sna package I

Re: [R] working with sparse matrix

2011-06-21 Thread davefrederick
Patrick, thank you. This works. I can't believe I have wasted several hours in front of computer for something this easy! :)) 2011/6/21 Patrick Breheny [via R] < ml-node+3614530-1847060061-246...@n4.nabble.com> > On 06/21/2011 09:48 AM, davefrederick wrote: > > Hi, I have a 500x 53380 sparse mat

Re: [R] working with sparse matrix

2011-06-21 Thread David Winsemius
On Jun 21, 2011, at 11:44 AM, Patrick Breheny wrote: On 06/21/2011 09:48 AM, davefrederick wrote: Hi, I have a 500x 53380 sparse matrix and I am trying to dichotomize it. Under sna package I have found event2dichot yet it doesnt recognize sparse matrix and requires adjacency matrix or array

Re: [R] working with sparse matrix

2011-06-21 Thread Patrick Breheny
On 06/21/2011 09:48 AM, davefrederick wrote: Hi, I have a 500x 53380 sparse matrix and I am trying to dichotomize it. Under sna package I have found event2dichot yet it doesnt recognize sparse matrix and requires adjacency matrix or array. I tried to run a simple loop code for (i in 1:500) for (

[R] working with sparse matrix

2011-06-21 Thread davefrederick
Hi, I have a 500x 53380 sparse matrix and I am trying to dichotomize it. Under sna package I have found event2dichot yet it doesnt recognize sparse matrix and requires adjacency matrix or array. I tried to run a simple loop code for (i in 1:500) for (j in 1:53380) if (matrix[i,j]>0) matrix[i,j]