Pessoal como fazer um comando subset contar os elementos NA? Considere o data.frame abaixo:<br><br><span class="Apple-style-span" style="border-collapse:separate;color:rgb(0,0,0);font-family:Arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span class="Apple-style-span" style="font-family:Monospace;font-size:13px;line-height:17px;text-align:-webkit-left;white-space:pre-wrap"><pre tabindex="0" class="GD40030CLR" style="font-family:Monospace;font-size:10pt!important;outline-style:none;outline-width:initial;outline-color:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:1.3">
dados = data.frame(x = c(1,2,3,7,12), y = c(0,10,2,3,NA))<br><br>Com este data.frame chamado dados gostaria de filtrar com o subset os elementos de y que são diferente de 10. Para o meu exemplo NA também é diferente de 10 e gostaria de fosse contabilizado. Com o mando abaixo o resultado segue logo após.<br>
<br>> subset(dados, y != 10)<span class="GD40030CCR ace_keyword" style="color:blue">
</span> x y
1 1 0
3 3 2
4 7 3<br><span class="Apple-style-span" style="border-collapse:separate;color:rgb(0,0,0);font-family:Arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span class="Apple-style-span" style="font-family:Monospace;font-size:13px;line-height:17px;text-align:-webkit-left;white-space:pre-wrap"><pre tabindex="0" class="GD40030CLR" style="font-family:Monospace;font-size:10pt!important;outline-style:none;outline-width:initial;outline-color:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:1.3">
<span class="Apple-style-span" style="border-collapse:separate;color:rgb(0,0,0);font-family:Arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span class="Apple-style-span" style="font-family:Monospace;font-size:13px;line-height:17px;text-align:-webkit-left;white-space:pre-wrap"><pre tabindex="0" class="GD40030CLR" style="font-family:Monospace;font-size:10pt!important;outline-style:none;outline-width:initial;outline-color:initial;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;white-space:pre-wrap!important;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:1.3">
<br>Veja que o NA não foi contabilizado. <br></pre></span></span><span class="GD40030CCR ace_keyword" style="color:blue"></span></pre></span></span><br></pre></span></span><br>-- <br><font color="#000099">Saudações,</font><div>
<font color="#000099">Pedro Rafael Diniz Marinho.</font></div><div><font color="#000099">Estatístico - Secretaria de Estado da Saúde - PB.</font></div><div><font color="#000099"><br></font></div><br>