[R] Indexing matrix

2009-06-30 Thread Rainer M Krug
Hi imagine the following situation: a - runif(100) plot(a[a0.5]) plots only the elements in the vector which are larger then 0.5 Now imagine a matrix: b - matrix(runif(2), ncol=40, nrow=50) image(b[b0.5]) Error in image.default(b[b 0.5]) : argument must be matrix-like Is there a similar

Re: [R] Indexing matrix

2009-06-30 Thread Gabor Grothendieck
On Tue, Jun 30, 2009 at 9:19 AM, Rainer M Krugr.m.k...@gmail.com wrote: Hi imagine the following situation: a - runif(100) plot(a[a0.5]) plots only the elements in the vector which are larger then 0.5 Now imagine a matrix: b - matrix(runif(2), ncol=40, nrow=50) image(b[b0.5])

Re: [R] Indexing matrix

2009-06-30 Thread Rainer M Krug
On Tue, Jun 30, 2009 at 3:26 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Tue, Jun 30, 2009 at 9:19 AM, Rainer M Krugr.m.k...@gmail.com wrote: Hi imagine the following situation: a - runif(100) plot(a[a0.5]) plots only the elements in the vector which are larger then