[R] Simple if else statement problem

anna_l lippelanna21 at hotmail.com
Fri Nov 13 18:33:10 CET 2009


Hello, I am getting an error with the following code:
if( P2 > P1)
+ {
+ P<-P2
+ }
> else
Erro: unexpected 'else' in "else"
> {
+ P<-P1
+ }

I checked the syntax so I don´t understand, I have other if else statements
with the same syntax working. Thanks in advance
-- 
View this message in context: http://old.nabble.com/Simple-if-else-statement-problem-tp26340336p26340336.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list