[R] if one of 4 conditions is not satisfied

Peng Jiang jp021 at sjtu.edu.cn
Wed Jul 2 02:55:51 CEST 2008

use c() to make your condition a vector, try to use all() to return a  
logical value for the entire condition vector .
On 2008-7-1, at 下午8:40, mysimbaa wrote:

> I'm trying to do realize the following:
> I have 4 condtions.
> If all conditions are satisfied I will paste("PASS")
> If any of these is not satisfied I will paste("FAIL"). But I have to  
> paste
> the corresponding failure.
> ifelse is a good solution but for a 2 conditions. Maybe switch or  
> something
> like this.
> Does anyone have an idea how to do?
> Thanks in advance.
> Adel
> -- 
> View this message in context: http://www.nabble.com/if-one-of-4-conditions-is-not-satisfied-tp18214194p18214194.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.

Peng Jiang 江鹏 ,Ph.D. Candidate
Antai College of Economics & Management
Department of Mathematics
Shanghai Jiaotong University (Minhang Campus)
800 Dongchuan Road
200240 Shanghai
P. R. China

More information about the R-help mailing list