[R] If/then statement, if in a list then
John Kane
jrkrideau at inbox.com
Mon Jul 30 15:05:21 CEST 2012
if(cond) expr
if(cond) cons.expr else alt.expr
Also see ?ifelse
John Kane
Kingston ON Canada
> -----Original Message-----
> From: bunnylover23 at optonline.net
> Sent: Mon, 30 Jul 2012 05:55:34 -0700 (PDT)
> To: r-help at r-project.org
> Subject: [R] If/then statement, if in a list then
>
> 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!
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/If-then-statement-if-in-a-list-then-tp4638346.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
More information about the R-help
mailing list