[R] Simple if else statement problem
Peter Ehlers
ehlers at ucalgary.ca
Fri Nov 13 20:47:02 CET 2009
anna_l wrote:
> Ok Jim it worked, thank you! it´s funny because it worked with the first
> syntax in some cases...
No, it did not. R doesn't randomly work in different
ways on different days.
-Peter Ehlers
>
>
> anna_l wrote:
>> 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
>>
>
More information about the R-help
mailing list