<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EstiloDeEmail17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=PT-BR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'>Olhe a função aggregate, ela faz algo parecido com o que você precisa<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><img width=351 height=85 id="Imagem_x0020_1" src="cid:image001.png@01CFD0CB.CB8D7E60"><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>De:</span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> R-br [mailto:r-br-bounces@listas.c3sl.ufpr.br] <b>Em nome de </b>Gilenio Borges Fernandes<br><b>Enviada em:</b> domingo, 14 de setembro de 2014 15:09<br><b>Para:</b> r-br@listas.c3sl.ufpr.br<br><b>Assunto:</b> [R-br] Criação de data.frame com valores médios de variaveis<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Prezados(as)<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><o:p> </o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Tenho um banco de dados com as seguintes variáveis (colunas):<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Tipo Trat Tempo Triplicata acidezKOH e acidezOLEIC<o:p></o:p></p><p class=MsoNormal><br><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Segue o CMR com a estrutura do meu banco de dados:</span><o:p></o:p></p><div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>d1=structure(list(Tipo = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("TI1", "TI2", </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>"TI3"), class = "factor"), Trat = structure(c(1L, 1L, 1L, 1L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("TR1", </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>"TR2", "TR3"), class = "factor"), Tempo = c(0L, 0L, 0L, 3L, 3L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>3L, 6L, 6L, 6L, 0L, 0L, 0L, 3L, 3L, 3L, 6L, 6L, 6L, 0L, 0L, 0L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>3L, 3L, 3L, 6L, 6L, 6L, 0L, 0L, 0L, 3L, 3L, 3L, 6L, 6L, 6L, 0L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>0L, 0L, 3L, 3L, 3L, 6L, 6L, 6L, 0L, 0L, 0L, 3L, 3L, 3L, 6L, 6L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>6L, 0L, 0L, 0L, 3L, 3L, 3L, 6L, 6L, 6L, 0L, 0L, 0L, 3L, 3L, 3L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>6L, 6L, 6L, 0L, 0L, 0L, 3L, 3L, 3L, 6L, 6L, 6L), Triplicata = c(1L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L</span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>), acidezKOH = c(2.29, 2.29, 2.38, 6.16, 6.16, 5.92, 4.82, 5.04, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>5.04, 3.37, 3.54, 3.69, 5.92, 5.92, 5.71, 5.8, 5.75, 5.72, 3.16, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>3.02, 3.22, 5.33, 5.33, 5.3, 5.66, 5.75, 5.7, 0.23, 0.23, 0.23, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>0.3, 0.3, 0.3, 0.34, 0.31, 0.31, 0.26, 0.29, 0.26, 0.33, 0.36, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>0.33, 0.43, 0.4, 0.43, 0.26, 0.26, 0.29, 0.3, 0.33, 0.3, 0.34, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>0.31, 0.31, 0.09, 0.09, 0.09, 0.33, 0.33, 0.33, 0.37, 0.37, 0.34, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>0.14, 0.14, 0.14, 0.3, 0.3, 0.3, 0.31, 0.34, 0.34, 0.57, 0.57, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>0.57, 0.33, 0.33, 0.33, 0.8, 0.77, 0.8), acidezOLEIC = c(1.15, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>1.15, 1.2, 3.1, 3.1, 2.97, 2.42, 2.54, 2.54, 1.69, 1.78, 1.85, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>2.98, 2.98, 2.87, 2.92, 2.89, 2.87, 1.59, 1.52, 1.62, 2.68, 2.68, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>2.66, 2.85, 2.89, 2.86, 0.11, 0.11, 0.11, 0.15, 0.15, 0.15, 0.17, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>0.16, 0.16, 0.13, 0.14, 0.13, 0.17, 0.18, 0.17, 0.22, 0.2, 0.21, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>0.13, 0.13, 0.14, 0.15, 0.17, 0.15, 0.17, 0.16, 0.16, 0.04, 0.04, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>0.04, 0.17, 0.17, 0.17, 0.19, 0.19, 0.17, 0.07, 0.07, 0.07, 0.15, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>0.15, 0.15, 0.17, 0.16, 0.16, 0.29, 0.29, 0.29, 0.17, 0.17, 0.17, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>0.4, 0.39, 0.4)), .Names = c("Tipo", "Trat", "Tempo", "Triplicata", </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>"acidezKOH", "acidezOLEIC"), class = "data.frame", row.names = c(NA, </span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.5pt;font-family:"Calibri","sans-serif"'>-81L))</span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Preciso criar um banco de dados (data.frame) com as colunas: Tipo Trat Tempo e mais as colunas acidezKOH e acidezOLEIC com a média das três Triplicatas. Tentei fazer com a função tapply, mas, não resolve porque não cria uma estrutura de data.frame. Gostaria de ter auxilio da lista para este problema.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Desde já agradeço.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Cordialmente,<o:p></o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><p class=MsoNormal>Gilenio Borges Fernandes<o:p></o:p></p><div><p class=MsoNormal>Professor Associado IV (Aposentado)<br>Universidade Federal da Bahia<br>Instituto de Matemática<br>Departamento de Estatística<br>Av. Adhemar de Barros, s/n – Ondina.<br>40.170-110 - Salvador - BA, Brasil<br>Tel.: (071)3283-6340/6341/6337 Fax: (071)3283-6336<br>URL: <a href="http://lattes.cnpq.br/6764860618464860" target="_blank">http://lattes.cnpq.br/6764860618464860</a><o:p></o:p></p></div></div></div></div></div></body></html>