<div dir="ltr"><pre tabindex="0" class="" id="rstudio_console_output" style="font-family:'Ubuntu Mono';outline:none;border:none;margin-top:0px;margin-bottom:0px;line-height:23px;color:rgb(248,248,248);font-size:14.4pt!important;white-space:pre-wrap!important;background-color:rgb(20,20,20)"><span class="" style="color:rgb(205,168,105)"># alternativa com lubridate</span></pre><pre tabindex="0" class="" id="rstudio_console_output" style="font-family:'Ubuntu Mono';outline:none;border:none;margin-top:0px;margin-bottom:0px;line-height:23px;color:rgb(248,248,248);font-size:14.4pt!important;white-space:pre-wrap!important;background-color:rgb(20,20,20)"><span class="" style="color:rgb(205,168,105)">library(lubridate)
</span><span class="" style="color:rgb(205,168,105)">datas <- c("12-10-2011","10.03.2013","05/06/2016")
</span><span class="" style="color:rgb(205,168,105)">datas_p <- dmy(datas)
</span><span class="" style="color:rgb(205,168,105)">datas_p
</span>[1] "2011-10-12 UTC" "2013-03-10 UTC" "2016-06-05 UTC"
<span class="" style="color:rgb(205,168,105)">tz(datas_p)
</span>[1] "UTC"
<span class="" style="color:rgb(205,168,105)">mean(datas_p)
</span>[1] "2013-10-18 16:00:00 UTC"<span style="color:rgb(205,168,105);font-size:14.4pt">as.duration(interval(min(datas_p), max(datas_p)))</span>
</pre><pre tabindex="0" class="" id="rstudio_console_output" style="font-family:'Ubuntu Mono';outline:none;border:none;margin-top:0px;margin-bottom:0px;line-height:23px;color:rgb(248,248,248);font-size:14.4pt!important;white-space:pre-wrap!important;background-color:rgb(20,20,20)">[1] "146707200s (~4.65 years)"</pre></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-03 15:58 GMT-02:00 ASANTOS <span dir="ltr"><<a href="mailto:alexandresantosbr@yahoo.com.br" target="_blank">alexandresantosbr@yahoo.com.br</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Caros Listeiros,<br>
<br>
Tenho um vetor com diferentes formatos de datas abaixo, que se tento tirar a média não funciona e se tento explicitar um format=%d/%m/%Y", acabo deixando de fora o %d-%m-%Y e %d.%m.%Y. Aonde pergunto é possível trabalhar com um vetor de datas em diferentes formatos?<br>
<br>
Segue CRM:<br>
<br>
<br>
datas<-c("12-10-2011","10.03.2013","05/06/2016" )<br>
time_a<-range(as.Date(datas))<br>
time_a<br>
<br>
<br>
<br>
time_b<-range(as.Date(tableFE[,11], format = "%d/%m/%Y"))<br>
time_b<br>
<br>
<br>
Obrigado,<br>
<br>
-- <br>
======================================================================<br>
Alexandre dos Santos<br>
Proteção Florestal<br>
IFMT - Instituto Federal de Educação, Ciência e Tecnologia de Mato Grosso<br>
Campus Cáceres<br>
Caixa Postal 244<br>
Avenida dos Ramires, s/n<br>
Bairro: Distrito Industrial<br>
Cáceres - MT CEP: 78.200-000<br>
Fone: <a href="tel:%28%2B55%29%2065%208132-8112" value="+556581328112" target="_blank">(+55) 65 8132-8112</a> (TIM) <a href="tel:%28%2B55%29%2065%209686-6970" value="+556596866970" target="_blank">(+55) 65 9686-6970</a> (VIVO)<br>
<a href="mailto:e-mails%3Aalexandresantosbr@yahoo.com.br" target="_blank">e-mails:alexandresantosbr@yahoo.com.br</a><br>
<a href="mailto:alexandre.santos@cas.ifmt.edu.br" target="_blank">alexandre.santos@cas.ifmt.edu.br</a><br>
Lattes: <a href="http://lattes.cnpq.br/1360403201088680" rel="noreferrer" target="_blank">http://lattes.cnpq.br/1360403201088680</a><br>
OrcID: <a href="http://orcid.org/0000-0001-8232-6722" rel="noreferrer" target="_blank">orcid.org/0000-0001-8232-6722</a><br>
Researchgate: <a href="https://www.researchgate.net/profile/Alexandre_Santos10" rel="noreferrer" target="_blank">https://www.researchgate.net/profile/Alexandre_Santos10</a><br>
LinkedIn: <a href="https://br.linkedin.com/in/alexandre-dos-santos-87961635" rel="noreferrer" target="_blank">https://br.linkedin.com/in/alexandre-dos-santos-87961635</a><br>
======================================================================<br>
<br>
_______________________________________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br" target="_blank">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/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-guia</a>) e fornea cdigo mnimo reproduzvel.</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><font size="2" style="font-family:arial">###############################################################</font><br><span style="font-family:arial;font-size:small">## </span><span style="font-size:11px;text-align:center;background-color:rgb(239,239,239);color:rgb(150,150,150);font-family:Verdana,Arial,Helvetica,sans-serif;line-height:13px">Jônatan Dupont Tatsch</span></div><div><span style="font-family:arial;font-size:small">## </span><span style="color:rgb(150,150,150);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10.909090995788574px;line-height:12.997159004211426px;text-align:center;background-color:rgb(239,239,239)">Professor do Departamento de Física</span><font face="arial" style="font-size:small"><br></font></div><div><span style="font-family:arial;font-size:small">## </span><span style="font-family:arial;font-size:small"> </span><span style="color:rgb(150,150,150);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10.9090909957886px;line-height:12.9971590042114px;text-align:center;background-color:rgb(239,239,239)">Coordenador Substituto do Programa de Pós-Graduação em Meteorologia (PPGMET)</span><br></div><div><span style="font-size:small;font-family:arial">## </span><span style="color:rgb(150,150,150);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10.909090995788574px;line-height:12.997159004211426px;text-align:center;background-color:rgb(239,239,239)">Centro de Ciências Exatas e Naturais (CCNE)</span><br></div><div><span style="font-size:small;font-family:arial">## </span><span style="color:rgb(150,150,150);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10.909090995788574px;line-height:12.997159004211426px;text-align:center;background-color:rgb(239,239,239)">Universidade Federal de Santa Maria - UFSM</span></div><div><span style="font-family:arial;font-size:small">## </span><span style="font-size:11px;text-align:center;background-color:rgb(239,239,239);color:rgb(150,150,150);font-family:Verdana,Arial,Helvetica,sans-serif;line-height:13px">Faixa de Camobi, Prédio 13 - Campus UFSM - </span><span style="font-size:11px;text-align:center;background-color:rgb(239,239,239);color:rgb(150,150,150);font-family:Verdana,Arial,Helvetica,sans-serif;line-height:13px">Santa Maria, RS, Brasil - 97105-900</span><br></div><div style="font-family:arial;font-size:small">## <span style="font-size:11px;text-align:center;background-color:rgb(239,239,239);color:rgb(150,150,150);font-family:Verdana,Arial,Helvetica,sans-serif;line-height:13px">Telefone: +55(55)33012083</span><br></div><div style="font-family:arial;font-size:small">## <span style="font-size:11px;text-align:center;background-color:rgb(239,239,239);color:rgb(150,150,150);font-family:Verdana,Arial,Helvetica,sans-serif;line-height:13px"><a href="http://www.ufsm.br/meteorologia" target="_blank">www.ufsm.br/meteorologia</a></span></div><div style="font-family:arial;font-size:small">###############################################################</div></div></div></div></div>
</div>