[R] how to test if a vector contain a value?

Ista Zahn izahn at psych.rochester.edu
Mon Aug 16 15:27:29 CEST 2010


Hi Hyunchul,
See ?match

-Ista

On Mon, Aug 16, 2010 at 1:06 PM, Hyunchul Kim
<hyunchul.kim.sfc at 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 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.
>



-- 
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org



More information about the R-help mailing list