title: Counting NA characters of a matrix
body: <p>I have the following matrix:</p>
  
  <pre><code>  V1  V2  V3   V4  
  [1,] "d" "e" "i"  "NA"
  [2,] "j" "e" "i"  "NA"
  [3,] "j" "n" "k"  "l" 
  [4,] "j" "k" "l"  "m" 
  [5,] "j" "k" "i"  "NA"
  [6,] "o" "n" "NA" "NA"
  </code></pre>
  
  <p>I am trying to count the number elements per row that is not NA, but all of the usual ways like <code>!is.na(MATRIX)</code> are not working. I am always getting the answer to be 4. I presume this is because the program is viewing <code>"NA"</code> as a character, but I do not know how to fix this.</p>