Re: [R] if one of 4 conditions is not satisfied

From: Peng Jiang <jp021_at_sjtu.edu.cn>
Date: Wed, 02 Jul 2008 08:55:51 +0800

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

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. Received on Wed 02 Jul 2008 - 00:59:33 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 02 Jul 2008 - 01:31:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive