<div dir="ltr"><div>hh <- c("09:20","09:50")</div><div>hht <- strptime(hh, format = '%H:%M', 'GMT')</div><div>difftime(hht[2],hht[1])</div><div>Time difference of 30 mins<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-06 12:00 GMT-02:00 Edson Lira via R-br <span dir="ltr"><<a href="mailto:r-br@listas.c3sl.ufpr.br" target="_blank">r-br@listas.c3sl.ufpr.br</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:times new roman,new york,times,serif;font-size:16px"><div id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9706"><span id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9798">Bom dia listeiros, tenho esse banco:</span></div><div dir="ltr" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9955"><span id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9798"></span><br>
<table><colgroup id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9902"><col style="width:56pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9903" span="2" width="75">
<col style="width:47pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9904" width="63">
<col style="width:44pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9905" width="59">
</colgroup><tbody id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9906"><tr style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9907" height="20">
<td style="min-height:15.0pt;width:56pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9908" height="20" width="75">dt_sol</td>
<td style="width:56pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9909" width="75">dt_atend</td>
<td style="width:47pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9910" width="63">hora_ent</td>
<td style="width:44pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9911" width="59">hora_sai</td>
</tr>
<tr style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9912" height="20">
<td style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9913" height="20" align="right">01/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9914" align="right">02/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9915" align="right">09:20</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9916" align="right">09:50</td>
</tr>
<tr style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9917" height="20">
<td style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9918" height="20" align="right">01/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9919" align="right">03/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9920" align="right">09:00</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9921" align="right">10:44</td>
</tr>
<tr style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9922" height="20">
<td style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9923" height="20" align="right">02/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9924" align="right">02/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9925" align="right">09:30</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9926" align="right">11:00</td>
</tr>
<tr style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9927" height="20">
<td style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9928" height="20" align="right">02/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9929" align="right">05/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9930" align="right">10:00</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9931" align="right">12:00</td>
</tr>
<tr style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9932" height="20">
<td style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9933" height="20" align="right">02/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9934" align="right">12/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9935" align="right">10:30</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9936" align="right">12:00</td>
</tr>
<tr style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9937" height="20">
<td style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9938" height="20" align="right">02/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9939" align="right">16/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9940" align="right">10:00</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9941" align="right">11:30</td>
</tr>
<tr style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9942" height="20">
<td style="min-height:15.0pt" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9943" height="20" align="right">02/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9944" align="right">18/02/2016</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9945" align="right">09:30</td>
<td id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9946" align="right">10:16</td>
</tr>
</tbody></table></div><div id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9803"><span id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9798"><br></span></div><div id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9980"><span id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9798">As variáveis hora_ent e hora_saida como fator. Gostaria de calcular a diferença entre o tempo da entrada para a saída</span></div><div id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9712"> </div><div class="m_3834509374340703483signature" id="m_3834509374340703483yui_3_16_0_ym19_1_1486385149810_9983">Edson Lira <br>Estatístico<br> Manaus-Amazonas</div></div></div><br>______________________________<wbr>_________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" rel="noreferrer" target="_blank">https://listas.inf.ufpr.br/<wbr>cgi-bin/mailman/listinfo/r-br</a><br>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" rel="noreferrer" target="_blank">http://www.leg.ufpr.br/r-br-<wbr>guia</a>) e forneça código mínimo reproduzível.<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Luis Iván Ortiz Valencia<br>Doutor Saúde Pública - Epidemiologia, IESC, UFRJ<br>Estatístico Msc.<br>Spatial Analyst Msc.<br><br></div></div></div>
</div>