Skip to content
Prev 201822 / 398502 Next

set condition in R

You can use the statements ``while( I < 523 || I > 535)'' instead.
It will work fine.

                                                                             
 Guo-Hao Huang


--------------------------------------------------
From: "Hongwei Dong" <pdxdong at gmail.com>
Sent: Friday, November 27, 2009 10:59 AM
To: "R-help Forum" <r-help at r-project.org>
Subject: [R] set condition in R

Hi, R users,

I'm using while() in R to set a condition. My condition is: i<523 or i>535.
How should I write this in R? I try "while (i<523 or i>535)" and it does not
work. Thanks.

Garry
On Tue, Nov 10, 2009 at 11:26 AM, Hongwei Dong <pdxdong at gmail.com> wrote:

            
______________________________________________
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.