<div dir="ltr"><font color="#000000" face="Times New Roman" size="3">

</font><div style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">Prezados,</font></span></div><div style="margin:0cm 0cm 0pt;line-height:normal">
<span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000"></font></span> </div><div style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">Para
contar os horários ou dias sem observações na estação meteorológica, dados
faltantes. </font></span></div><div style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">Fiz um “for” no R:</font></span></div>
<font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000"> </font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">c=comprimento
do vetor teórico (sequencia de datas e horários que deveriam existir
observações).</font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">h=
comprimento dos dados das estações (pode haver horários ou dias seguidos sem
observações).</font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000"> </font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span lang="EN-US" style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">igual=0</font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span lang="EN-US" style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000"> </font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span lang="EN-US" style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">for (m in 1:c){</font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span lang="EN-US" style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">for (jj in 1:h){</font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span lang="EN-US" style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">if ((bancof[m,1] == obsf[jj,1]) & (bancof[m,2] == obsf[jj,2]) )</font></span></p>
<font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">{igual =
igual+1}</font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">}</font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">}</font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000"> </font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">faltantes
= c-igual</font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000"> </font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000"> </font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">coluna 1
é data dd/mm/aaaa e </font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">coluna 2 horário
(0, 12, 18)</font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000"> </font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">Mas ele está
demorado: uns 20 minutos por estação (pois elas têm umas 60.000 observações). Eu
tenho umas 200 estações. </font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 0pt;line-height:normal"><span style="font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">Serão quatro
dias, só para os dados do Brasil, têm ainda outros países da América do Sul.</font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><p style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000"> </font></span></p><font color="#000000" face="Times New Roman" size="3">

</font><div style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">Será que existe alguma função no R que faça isto mais depressa?</font></span></div>
<div style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000"></font></span> </div><div style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000">Obrigada,</font></span></div>
<div style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:"Arial","sans-serif";font-size:12pt"><font color="#000000"></font></span> </div><div style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:"Arial","sans-serif";font-size:12pt">-- <br>
Helena Turon Balbino<br>Meteorologista<br>Instituto Nacional de Meteorologia - INMET</span></div><div style="margin:0cm 0cm 10pt"><span style="line-height:115%;font-family:"Arial","sans-serif";font-size:12pt">7º DISTRITO DE METEOROLOGIA (SP e MS)<br>
Tel: (11) 5051-5700 <br>******************************************************** </span></div><font color="#000000" face="Times New Roman" size="3">

</font></div>