title: R Count elements of data frame and add a row
body: <p>I am Reading data into two data frames, using this code:</p>
  
  <pre><code>IdaEmpA &lt;- data.frame(table(unlist(DadosA$idade)))
  IdaEmpB &lt;- data.frame(table(unlist(DadosB$idade)))
  </code></pre>
  
  <p>Then I want to add a row with NAs quantity to those data frames. I tried like this:</p>
  
  <pre><code>IdaEmpA = rbind(IdaEmpA,c(7,sum(is.na(DadosA$idade))))
  IdaEmpB = rbind(IdaEmpB,c(7,sum(is.na(DadosB$idade))))
  </code></pre>
  
  <p>The resulting data is:</p>
  
  <pre><code>&gt; IdaEmpA
    RespA QuantA
  1     1     11
  2     2     13
  3     3     15
  4     4      3
  5     5     18
  6     6      1
  &gt; IdaEmpB
    RespB QuantB
  1     1     18
  2     2     14
  3     3     21
  4     4      2
  5     6     13
  </code></pre>
  
  <p>But I am getting an warning and the value is not being added to the first column:</p>
  
  <pre><code>Warning message:
  In `[&lt;-.factor`(`*tmp*`, ri, value = 7) :
  nível de fator inválido, NA gerado
  
  Warning message:
  In `[&lt;-.factor`(`*tmp*`, ri, value = 7) :
  nível de fator inválido, NA gerado
  </code></pre>
  
  <p>Results after warnning:</p>
  
  <pre><code>&gt; IdaEmpA
    RespA QuantA
  1     1     11
  2     2     13
  3     3     15
  4     4      3
  5     5     18
  6     6      1
  7  &lt;NA&gt;      1
  &gt; IdaEmpB
    RespB QuantB
  1     1     18
  2     2     14
  3     3     21
  4     4      2
  5     6     13
  6  &lt;NA&gt;      3
  </code></pre>
  
  <p>How do I manage to have value 7 instead of NA???</p>
  
  <p>Any clues might help me out, thanks!</p>