[R] conditional IF with AND

Erik Iverson iverson at biostat.wisc.edu
Wed Aug 13 20:20:29 CEST 2008


if(cond1 && cond2) {
   ...
}


rcoder wrote:
> Hi everyone,
> 
> I'm trying to create an "if" conditional statement with two conditions,
> whereby the statement is true when condition 1 AND condition 2 are met:
> 
> code structure:
> if ?AND? (a[x,y] <condition1>, a[x,y] <condition2>)
> 
> I've trawled through the help files, but I cannot find an example of the
> syntax for incorporating an AND in a conditional IF statement.
> 
> Thanks,
> 
> rcoder



More information about the R-help mailing list