title: Remove entire Row if Column == NA in R
body: <p>Trying to remove this row and cannot get it. I have tried the multiple Q&amp;A's on SO already and nothing seems to work. Tried using the <code>sjmisc</code> library as someone suggested but it is still there. Here is what I have tried below and a snip of the <code>df</code>.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Here is a DataFrame below to test. Removed a Pic of the dataframe which was incorrect and not proper policy.</p>
  
  <pre><code>df&lt;-data.frame(name=c('CAREY.PRICE',NA,'JOHN.SMITH'),GA=c(3,2,2),SV=c(2,2,NA),stringsAsFactors = FALSE)
  </code></pre>
  
  <p>Which will return:</p>
  
  <pre><code>name       |  GA  | SV
  CAREY.PRICE|  3   | 2
  NA         |  2   | 2
  John.Smith |  2   | NA 
  </code></pre>
  
  <p>The issue with the below response:</p>
  
  <pre><code>df = df[complete.cases(df),]
  </code></pre>
  
  <p>It answers the question above technically, If a Column in any row has NA, remove it. I should have clarified that I would have like it to be a column of my choice which would have been the <code>NA</code> in <code>df$name</code>.</p>
  
  <p>What this will do is remove <code>NA</code> and <code>John.Smith</code>. Which has caused an issue with my script and the lack of <code>name</code>(players) in my DF. </p>
  
  <p>I also had <code>na.omit()</code> in my script and it removed <code>NA</code> and John.Smith as well.
  There are 40 variables in my DF and to write out each possible one that may or may not have an NA in it would be too much. My temporary solution is to change all NA's to 0:</p>
  
  <pre><code>df[is.na(df)] &lt;- 0
  </code></pre>
  
  <p>RETURNS:</p>
  
  <pre><code>name       |  GA  | SV
  CAREY.PRICE|  3   | 2
  0          |  2   | 2
  John.Smith |  2   | 0
  </code></pre>
  
  <p>Then remove any <code>df$name</code> that is 0:</p>
  
  <pre><code>df&lt;-df[!(df$name==0),]
  </code></pre>
  
  <p>What I was looking for:</p>
  
  <pre><code>name       |  GA  | SV
  CAREY.PRICE|  3   | 2
  John.Smith |  2   | 0
  </code></pre>