title: R - deleting rows from data.frame
body: <p>I am very new to r an programming and have a basic question (my first one on stackoverflow :) )
  I want to delete some rows from a data.frame and use an if-statement on that account.
  My code is running but it is unfortunately not deleting the correct rows but instead every second row of my dataframe I think.</p>
  
  <p>"myDataVergleich" is the name of my data.frame. "myData$QUESTNNR" is the column by which is decided whether the row is supposed to stay in the dataframe or not.</p>
  
  <pre><code>for(i in 1:nrow(myDataVergleich))
    {if(myData$QUESTNNR[i] != "t0_mathe" | myData$QUESTNNR[i] != "t0_bio" | myData$QUESTNNR[i] != "t0_allg2" |
       myData$QUESTNNR[i] != "t7_mathe_Version1" | myData$QUESTNNR[i] != "t7_bio_Version1") 
      {myDataVergleich &lt;- myDataVergleich[-c(i),] }}
  </code></pre>
  
  <p>What am I doing wrong?</p>