I'm having a simple R code which returns Error: unexpected 'else' in "else":
if(1==1)
{
x = 1
}
else
{
x = 2
}
Can someone please explain how thats possible?
Its a different case than question Unexpected 'else' in "else" error because there the problem appears to be caused by a nested else while here it is unnested.