"the problem is that you start `else’ on a new line; check the following two solutions:
if ( a ) { cat(“TRUE”, “\n”) } else { cat(“FALSE”, “\n”) }
or
{ if ( a ) { cat(“TRUE”, “\n”) } else { cat(“FALSE”, “\n”) } }
—
[R] Got “Unexpected ELSE error”
From the “crap that I didn’t expect in the R language definition” department