[R] Finding positions in array

Henrique Dallazuanna wwwhsd at gmail.com
Tue Mar 30 15:11:37 CEST 2010


Try:

which(x > y)



On Tue, Mar 30, 2010 at 9:54 AM, Romildo Martins
<romildo.martins at gmail.com> 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
>
>
> Thanks a lot!
>
> Romild
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list