<div dir="ltr">o parâmetro FUN só pode aparecer uma vez em aggregate, se você precisa de uma função que "faça mais coisas" defina-a com mais parâmetros, como, p. ex. no s/caso, ...function(data_int, valor_int).<div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-24 13:36 GMT-03:00 Edmar Caldas 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:Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:13px"><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386"><br></div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386"><span><br></span></div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386"><span id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38482">Estou com um arquivo neste formato.</span></div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386"><span><br></span></div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><img class="m_4613906183714757703ymail-preserve-class m_4613906183714757703inline-image-guid-410c1851-0d93-7723-1ba9-49839e5b21b7 m_4613906183714757703rte-inline-saved-image" src="cid:92af2cbd-f559-09a7-cf8d-c102ba4fb9eb@yahoo.com" alt="Alinhar imagem" style="width:100%;max-width:283px;max-height:215px" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38483"></div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><br></div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><br></div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr">Estou querendo agregar por paciente. Informando a média da coluna valor_int e quero também pegar a menor e a maior data da coluna data_int.Quero que o arquivo fique assim;</div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><br></div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><img class="m_4613906183714757703ymail-preserve-class m_4613906183714757703inline-image-guid-f6bab553-557d-ec77-b321-5ad86186c671 m_4613906183714757703rte-inline-saved-image m_4613906183714757703img-overlay-selected" src="cid:6456206d-5ac4-062e-8624-1620ea5bbe8e@yahoo.com" alt="Alinhar imagem" style="width:100%;max-width:579px;max-height:309px" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39083"><br><br></div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><br></div><div dir="ltr" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39160"><br id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39163"></div><div dir="ltr" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39165"><br id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39168"></div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr">Desenvolvi esse codigo.</div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><br></div><div dir="ltr" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39285"><img class="m_4613906183714757703ymail-preserve-class m_4613906183714757703inline-image-guid-cd609d20-f9cd-7471-300f-5f0c06a7dfe4 m_4613906183714757703rte-inline-saved-image" src="cid:a8f25844-4cf4-7199-84ad-8de287d1fc15@yahoo.com" alt="Alinhar imagem" style="width:100%;max-width:569px;max-height:241px" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39511"><br><br></div><div dir="ltr" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39285"><br></div><div dir="ltr" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39285">agora estou tentando colocar as datas.</div><div dir="ltr" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39285"><br></div><div dir="ltr" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39285"><img class="m_4613906183714757703ymail-preserve-class m_4613906183714757703inline-image-guid-c7c421ae-5f76-8a9f-424b-42b1652cffa1 m_4613906183714757703rte-inline-saved-image" src="cid:74fdc16a-f745-2bb8-727a-5a09a4cd2721@yahoo.com" alt="Alinhar imagem" style="width:100%;max-width:706px;max-height:98px" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_40049"><span class="HOEnZb"><font color="#888888"><br id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_40050"><br id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_40051"></font></span></div><span class="HOEnZb"><font color="#888888"><div dir="ltr" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39285"><br></div><div dir="ltr" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39285"><br></div><div dir="ltr" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39286"><br></div><div dir="ltr" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39286"><br></div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38386" dir="ltr"><span><br></span></div><div></div><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38385"> </div><div class="m_4613906183714757703signature" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38384"><div id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_38383"><font color="#0000ff" id="m_4613906183714757703yui_3_16_0_ym19_1_1490361917476_39157">Edmar</font></div></div></font></span></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></div>