[R] print elements' placings from vector
Dennis Murphy
djmuser at gmail.com
Thu May 5 00:46:26 CEST 2011
Hi:
Is this what you're after?
> z=c(1,3,0.5,6,8,10,2,2,3,4,7,3)
> which(z > 2)
[1] 2 4 5 6 9 10 11 12
HTH,
Dennis
On Wed, May 4, 2011 at 1:02 PM, derek <jan.kacaba at gmail.com> wrote:
> Dear R,
>
> Here is a code:
> z=c(1,3,0.5,6,8,10,2,2,3,4,7,3)
> z[z>2]
>
> I dont want print the elements, but theirs placings in vector.
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/print-elements-placings-from-vector-tp3496645p3496645.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>
More information about the R-help
mailing list