My understanding of the rules for if statements is as follows. Brackets are used to enclose multiple statements. If you only have a single statement in the if and the else, as in your case, the brackets are not required. If there is a right bracket, }, before the else, it must be on the same line as the else. All of the following work
They can be in one line if you want. It's just a standard in the coding world for readability, not exclusive to R. I have different standards for myself, but when in a collaborative team, I use lintr (code linter for R).
You can see some sample code below in other languages and you'll see that they are formatted similarly.