title: R - remove NA in character data with complete.cases
body: <p>I want to remove rows containing NA values in any column of the data frame "addition" using</p>
  
  <pre><code>a &lt;- addition[complete.cases(addition), ]
  </code></pre>
  
  <p>and</p>
  
  <pre><code>a &lt;- addition[!is.na(addition)]
  </code></pre>
  
  <p>and</p>
  
  <pre><code>a &lt;- na.omit(addition)
  </code></pre>
  
  <p>but the NAs remain. I have also tried restricting <code>complete.cases</code> to the only column containing some NAs.
  I have found out that they are not identified at all:</p>
  
  <pre><code>   which(is.na(addition))
      integer(0)
  </code></pre>
  
  <p>The data frame "addition" looks like this (NA is the 4th column on Row 1211):</p>
  
  <pre><code>row.names lemma pos derlemma derpos handannotated
  11 akvizice N perform_akvizice V 1
  1211 diagnóza N NA V 1
  1221 dialýza N dialyzovat V 1
  1241 díkuvzdání N perform_díkuvzdání V 1
  </code></pre>
  
  <p>I only get the NAs removed using this:</p>
  
  <pre><code>a &lt;- addition[which(addition$derlemma != "NA"), ]
  </code></pre>
  
  <p>Do I use the complete.cases function or annotated "NA" in a wrong way, or have I possibly messed up something in the R Studio user options? </p>
  
  <p>Many thanks for any support.</p>
  
  <p>Working with RStudio Version 0.98.1028, Win 7 Professional 64x.</p>
  
  <hr>
  
  <p>LATER:
  Thanks to the answers below I realized that "NA" in character variables is not interpreted as "not available" but as just a string. </p>
  
  <p>I had created the entire data set in R and subsequently added "NA" strings (without the quotes) into some cells in the Data Editor within RStudio. Therefore I failed to specify for R that "NA" means NA.</p>
  
  <p>When I saved the data frame as a .csv and loaded it again with read.table(), I was able to specify na.strings = "NA" and complete.cases() worked. Many thanks again to all the advisors!</p>