[R] which
Liaw, Andy
andy_liaw at merck.com
Wed Dec 15 21:22:04 CET 2004
Because you have one too many `&'.
Andy
> From: Y. C. Tao
>
> Why the last "which" in the following example doesn't
> work? Is there a simple way to identify the indices of
> array elements that meet multiple criteria?
>
> Thanks.
>
> YC Tao
>
> > x<-1:10
> > which(x<5)
> [1] 1 2 3 4
> > which(x>2)
> [1] 3 4 5 6 7 8 9 10
> > which(x<5 && x>2)
> numeric(0)
>
> __________________________________
>
> Dress up your holiday email, Hollywood style. Learn more.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
More information about the R-help
mailing list