[R] choosing items from array: very stupid and simple question

Sarah Goslee sarah.goslee at gmail.com
Sun Jan 8 18:09:29 CET 2012


> x[x %in%  y]
[1] 2 3
>


2012/1/8 Philipp Chapkovski <chapkovski at gmail.com>:
> x<-1:11
> y<-2:3
>
> is there a way to do something like
> x[x==y]
> (which actually produce error)?
> I am really got stuck
>

-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list