title: Percentuage on Na Values (Dataframe and Variables) on R
body: <p>I would like to calculate percentage of <code>NA</code>-values in a dataframe and for variables.</p>
  
  <p>My dataframe has this:</p>
  
  <pre><code>mean(is.na(dataframe))
  # 0.03354
  </code></pre>
  
  <p>How I read this result? Na 0,033%?  I don't understand.</p>
  
  <p>For the individual variables I did the following for the count of <code>NA</code>s</p>
  
  <pre><code>sapply(DATAFRAME, function(x) sum(is.na(x)))
  </code></pre>
  
  <p>Then, for the percentage of <code>NA</code>-values:</p>
  
  <pre><code>colMeans(is.na(VARIABLEX)) 
  </code></pre>
  
  <p>Doesn't work because I get the following error:</p>
  
  <blockquote>
    <p>"x must be an array of at least two dimension"</p>
  </blockquote>
  
  <p>Why does this error occur? Anyway, afterwards I tried the following:</p>
  
  <pre><code>mean(is.na(VariableX))
  # 0.1188
  </code></pre>
  
  <p>Should I interpret this as having 0.11% <code>NA</code>-values? </p>