[R] if else statement error
gcheer3
gcheer3 at gmail.com
Sat Oct 3 18:08:39 CEST 2009
Hello,
I am doing a if else statement in R. But it always comes out error such as
'unexpected symbol'
There are two variables. ini and b. when ini=1, a=3; when ini>1 and b>2,
a=3; all other situations, a=6. I don't know where it is wrong.
Here is my code
ini=3
b=4
if (ini==1) {
a=3
}
else if (ini>1 and b>2 ) {
a=3
}
else {a=6}
Thanks a lot.
--
View this message in context: http://www.nabble.com/if-else-statement-error-tp25730173p25730173.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list