title: If statement in R with multiple arguments
body: <p>After reading the comments section and then making the following changes, I am still getting a 'Success' instead of a 'Failure':</p>
  
  <pre><code>nrow(statedata)
  [1] 100
  num = -1
  if(num != "best" &amp; num != "worst" &amp; num &lt; 1 &amp; num &gt; nrow(statedata))
      print("Failure!?")
  else &lt;br /&gt;
      print("Success!")
  [1] "Success!"
  </code></pre>