Try this:

is.element(2, c(1, 2, 4))
On Mon, Aug 16, 2010 at 10:06 AM, Hyunchul Kim
<hyunchul.kim....@gmail.com>wrote:

> Hi all,
>
> How to convert following simple python script to R
>
>
> if x in a_list:
>    print x
>
> OR
>
> simply, how to test if a vector contain a value?
>
>
> Thank you in advance,
>
> Hyunchul
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@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

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to