<div dir="ltr">Manasses,<div><br></div><div>Já recebeste uma resposta com uma solução.</div><div><br></div><div>Uma outra maneira seria você se familiarizar com a função <i>subset</i>.</div><div><br></div><div>HTH</div><div><br></div><div>--</div><div>Cesar Rabak</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-06-12 0:36 GMT-03:00 Manasses Nóbrega 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 dir="ltr">Olá, pessoal! <div><br></div><div>Este parece ser um problema fácil de resolver, mas não estou conseguindo!!</div><div><br></div><div>Tenho um conjunto de dados (com quase 3000 linhas) que relaciona a resposta de um voluntário sob várias condições experimentais, cada uma dela com seus respectivos níveis. Exemplo:</div><div>
<table border="0" cellpadding="0" cellspacing="0" width="256" style="border-collapse:collapse;width:192pt">
<colgroup><col width="64" span="4" style="width:48pt">
</colgroup><tbody><tr height="20" style="height:15pt">
<td height="20" width="64" style="height:15pt;width:48pt;padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap"> resp</td>
<td width="64" style="width:48pt;padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap"> V1</td>
<td width="64" style="width:48pt;padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap"> V2</td>
<td width="64" style="width:48pt;padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap"> V3</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt;padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">0.35</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">1</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">1</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">1</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt;padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">0.38</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">1</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">2</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">1</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt;padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">0.65</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">1</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">3</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">1</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt;padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">0.49</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">1</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">4</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">1</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt;padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">-0.25</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">0</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">1</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">2</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt;padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">-1</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">0</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">2</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">2</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt;padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">-0.73</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">0</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">3</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">2</td>
</tr>
<tr height="20" style="height:15pt">
<td height="20" align="right" style="height:15pt;padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">-0.47</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">0</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">4</td>
<td align="right" style="padding-top:1px;padding-right:1px;padding-left:1px;color:black;font-size:11pt;font-weight:400;font-style:normal;text-decoration:none;font-family:Calibri,sans-serif;vertical-align:bottom;border:none;white-space:nowrap">2</td>
</tr>
</tbody></table>
<br></div><div><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Para realizar uma análise, por exemplo, vou precisar de </span><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><b>um vetor</b></span><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> com as respostas apenas para o nível 1 de V2 ou, por exemplo, de</span><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><b> um vetor</b></span><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> com as respostas apenas para o nível 2 de V3. </span><br></div><div><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Tentei a função aggregate mas não consegui. Vocês poderiam me ajudar?</span></div><div><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Desde já agradeço a todos. </span></div><div><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Um abraço,</span></div><div><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Manasses</span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div><div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-3086335234688083563gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><i><b>I am a brain, Watson. The rest of me is a mere appendix. <br></b></i></div><i><b>(Sherlock Holmes)<br></b></i></div></div></div></div></font></span></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>