Re: [R] Finding positions in array

2010-03-30 Thread Erich Neuwirth
which(y>7) z<-which(y>7) On 3/30/2010 2:54 PM, Romildo Martins wrote: > Hello, > > I need a function to check what positions of the array are greater than "y" > and return to positions in another array "z". > >> x<-array(E(gaux)$weight) >> x > [1] 3 8 10 6 > > If y = 7 > >> z > [1] 2 3 >

Re: [R] Finding positions in array

2010-03-30 Thread Henrique Dallazuanna
Try: which(x > y) On Tue, Mar 30, 2010 at 9:54 AM, Romildo Martins wrote: > Hello, > > I need a function to check what positions of the array are greater than "y" > and return to positions in another array "z". > >> x<-array(E(gaux)$weight) >> x > [1]  3  8 10  6 > > If y = 7 > >>z > [1] 2 3 >

[R] Finding positions in array

2010-03-30 Thread Romildo Martins
Hello, I need a function to check what positions of the array are greater than "y" and return to positions in another array "z". > x<-array(E(gaux)$weight) > x [1] 3 8 10 6 If y = 7 >z [1] 2 3 Thanks a lot! Romild [[alternative HTML version deleted]]