[R] If/then statement, if in a list then

Bert Gunter gunter.berton at gene.com
Mon Jul 30 15:49:55 CEST 2012


Not necessarily. If the OP really meant the R list() structure, then
is.element does not apply. If a vector was what was intended, then it
does -- provide all elements are of the same mode. With such a vague
post, it's hard to know.


-- Bert

On Mon, Jul 30, 2012 at 6:06 AM, Jean V Adams <jvadams at usgs.gov> wrote:
> ?is.element
>
> Jean
>
>
> cm <bunnylover23 at optonline.net> wrote on 07/30/2012 07:55:34 AM:
>>
>> I need to write an if/then statement saying something along the lines
> of:
>> if (VALUE is in list) {...
>> How do I write that in R's language.
>> Thanks!
>
>         [[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.



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm



More information about the R-help mailing list