title: Including multiple conditions in for-loop
body: <p>I am trying to specify two conditions as a part of a for loop. It seems like the second condition in the second for loop is not being considered. My code runs this way:</p>
  
  <pre><code>for (i in 1:nrow(mydata))          {
   for (j in 1:nrow(mydata) &amp;&amp; j!=i )    {
         Statements....
   }
   Statements...
   }
  </code></pre>
  
  <p>Could you please tell me if this is the right Syntax in R?
  Thanks!</p>