title: if - else if - else statement and brackets
body: <p>I understand the usual way to write an "if - else if" statement is as follow:</p>
  
  <pre><code>if (2==1) {
    print("1")
  } else if (2==2) {
    print("2")
  } else {
    print("3")
  }
  </code></pre>
  
  <p>or </p>
  
  <pre><code>if (2==1) {print("1") 
  } else if (2==2) {print("2")
  } else print("3")
  </code></pre>
  
  <p>On the contrary, If I write in this way</p>
  
  <pre><code>if (2==1) {
    print("1")
  } 
  else if (2==2) {
    print("2")
  }
  else (print("3"))
  </code></pre>
  
  <p>or this way:</p>
  
  <pre><code>if (2==1) print("1") 
  else if (2==2) print("2")
  else print("3")
  </code></pre>
  
  <p>the statement does NOT work. Can you explain me why <code>}</code> must precede <code>else</code> or <code>else if</code> in the same line? Are there any other way of writing the if-else if-else statement in R, especially without brackets?</p>