[R] If else statements

tj girlme80 at yahoo.com
Tue Mar 23 07:32:13 CET 2010


Hi everyone! 
May I request again for your help? 
I need to make some codes using if else statements...
Can I do an "if-else statement" inside an "if-else statement"? Is this the
correct form of writing it? 
Thank you.=)

Example:

for (v in 1:6) {
for (i in 2:200) {
if (v==1)
(if max(x*v-y*v)>1 break())

if (v==2)
(if max(x*v-y*v)>1.8 break())

if (v==3)
(if max(x*v-y*v)>2 break())
}
}
-- 
View this message in context: http://n4.nabble.com/If-else-statements-tp1678705p1678705.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list