title: Remove rows with missing values in R
body: <p>I want to remove all rows with NAs, I tried na.omit, but I still have all the "#N/A" values in my data...</p>
  
  <p>This is my code:</p>
  
  <pre><code>mydata = read.csv('file:///C:/Users/file.csv')
  mydata = as.data.frame(mydata)
  mydata[mydata$col2== "#N/A"] &lt;- "NA"
  na.omit(mydata$col2)
  </code></pre>
  
  <p>What can I do?</p>
  
  <p>I also tried this:</p>
  
  <pre><code>mydata = mydata[!is.na(mydata)]
  </code></pre>
  
  <p>But it doesn't work either</p>