<div dir="ltr">Roda o seguinte código e manda o output pra gente, que facilita:<div>dput(head(nome_data_frame))</div><div><br></div><div>onde nome_data_frame é o nome do data.frame.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-20 15:04 GMT-02:00 Giselle Davi <span dir="ltr"><<a href="mailto:giselle_davi@yahoo.com.br" target="_blank">giselle_davi@yahoo.com.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:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12px"><div dir="ltr">Prezados,</div><div dir="ltr">Preciso juntar colunas no R !!! <br></div><div dir="ltr"><br></div><div dir="ltr">Tenho um arquivo assim:</div><div dir="ltr"> D01 D02 D03 D04 D05 D06 D07 D08 D09 D10 F01 F02 F03 F04 F05 F06 F07 F08 F09</div><div dir="ltr">1 G G G G G G . G G G G G G G G G G . .</div><div dir="ltr">2 C C C C C T C C C C C C C C C C C C C</div><div dir="ltr">3 T T T T T T T T T T T T T T T T T T T</div><div dir="ltr">4 G G C G G G C G G G G G C G G C G G G</div><div dir="ltr">5 C C C C C C C C C C C C C C C C C C C</div><div dir="ltr">6 T T T T T T T T T T T T T T T C T T T</div><div dir="ltr"><br></div><div dir="ltr">Quando peço para juntar as colunas o arquivo ( Parte do arquivo na verdade) passa a ser :</div><div dir="ltr"><br></div><div dir="ltr">D01 D01 D01 D02 D01 D03 D01 D04 D01 D05 D01 D06 D01 D07 D01 D08 D01 D09</div><div dir="ltr">1 1 1 1 1 1 1 0 1 1</div><div dir="ltr">2 2 2 2 2 2 3 2 2 2</div><div dir="ltr">3 2 2 2 2 2 2 2 2 2</div><div dir="ltr">4 1 1 3 1 1 1 3 1 1</div><div dir="ltr">5 2 2 2 2 2 2 2 2 2</div><div dir="ltr">6 2 2 2 2 2 2 2 2 2</div><div dir="ltr"> D01 D10 D01 F01 D01 F02 D01 F03 D01 F04 D01 F05 D01 F06 D01 F07 D01 F08</div><div dir="ltr">1 1 1 1 1 1 1 1 1 0</div><div dir="ltr">2 2 2 2 2 2 2 2 2 2</div><div dir="ltr">3 2 2 2 2 2 2 2 2 2</div><div dir="ltr">4 1 1 1 3 1 1 3 1 1</div><div dir="ltr">5 2 2 2 2 2 2 2 2 2</div><div dir="ltr">6 2 2 2 2 2 2 3 2 2</div><div><br></div><div><br></div><div dir="ltr">MAS, eu preciso juntar as colunas dessa forma: </div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><table border="1" cellpadding="0" cellspacing="0" width="861" style="border-collapse:collapse;width:656pt">
<colgroup><col width="26" span="2" style="width:20pt">
<col width="24" style="width:18pt">
<col width="10" style="width:8pt">
<col width="26" span="2" style="width:20pt">
<col width="24" style="width:18pt">
<col width="10" style="width:8pt">
<col width="26" style="width:20pt">
<col width="24" style="width:18pt">
<col width="26" style="width:20pt">
<col width="10" style="width:8pt">
<col width="24" style="width:18pt">
<col width="26" style="width:20pt">
<col width="24" style="width:18pt">
<col width="10" style="width:8pt">
<col width="24" style="width:18pt">
<col width="26" style="width:20pt">
<col width="24" style="width:18pt">
<col width="10" style="width:8pt">
<col width="26" style="width:20pt">
<col width="27" style="width:20pt">
<col width="24" style="width:18pt">
<col width="10" style="width:8pt">
<col width="26" style="width:20pt">
<col width="27" style="width:20pt">
<col width="24" style="width:18pt">
<col width="10" style="width:8pt">
<col width="26" style="width:20pt">
<col width="27" style="width:20pt">
<col width="24" style="width:18pt">
<col width="10" style="width:8pt">
<col width="26" style="width:20pt">
<col width="27" style="width:20pt">
<col width="24" style="width:18pt">
<col width="10" style="width:8pt">
<col width="26" style="width:20pt">
<col width="27" style="width:20pt">
<col width="24" style="width:18pt">
<col width="10" style="width:8pt">
</colgroup><tbody><tr height="15" style="height:11.25pt">
<td height="15" width="26" style="height:11.25pt;width:20pt">D01</td>
<td width="26" style="width:20pt">com</td>
<td width="24" style="width:18pt">F01</td>
<td width="10" style="width:8pt">,</td>
<td width="26" style="width:20pt">D02</td>
<td width="26" style="width:20pt">com</td>
<td width="24" style="width:18pt">F01</td>
<td width="10" style="width:8pt">,</td>
<td width="26" style="width:20pt">D03</td>
<td width="24" style="width:18pt">com</td>
<td width="26" style="width:20pt">F01</td>
<td width="10" style="width:8pt">,</td>
<td width="24" style="width:18pt">D04</td>
<td width="26" style="width:20pt">com</td>
<td width="24" style="width:18pt">F01</td>
<td width="10" style="width:8pt">,</td>
<td width="24" style="width:18pt">D05</td>
<td width="26" style="width:20pt">com</td>
<td width="24" style="width:18pt">F01</td>
<td width="10" style="width:8pt">,</td>
<td width="26" style="width:20pt">D06</td>
<td width="27" style="width:20pt">com</td>
<td width="24" style="width:18pt">F01</td>
<td width="10" style="width:8pt">,</td>
<td width="26" style="width:20pt">D07</td>
<td width="27" style="width:20pt">com</td>
<td width="24" style="width:18pt">F01</td>
<td width="10" style="width:8pt">,</td>
<td width="26" style="width:20pt">D08</td>
<td width="27" style="width:20pt">com</td>
<td width="24" style="width:18pt">F01</td>
<td width="10" style="width:8pt">,</td>
<td width="26" style="width:20pt">D09</td>
<td width="27" style="width:20pt">com</td>
<td width="24" style="width:18pt">F01</td>
<td width="10" style="width:8pt">,</td>
<td width="26" style="width:20pt">D10</td>
<td width="27" style="width:20pt">com</td>
<td width="24" style="width:18pt">F01</td>
<td width="10" style="width:8pt">,</td>
</tr>
<tr height="15" style="height:11.25pt">
<td height="15" style="height:11.25pt">D01</td>
<td>com</td>
<td>F02</td>
<td>,</td>
<td>D02</td>
<td>com</td>
<td>F02</td>
<td>,</td>
<td>D03</td>
<td>com</td>
<td>F02</td>
<td>,</td>
<td>D04</td>
<td>com</td>
<td>F02</td>
<td>,</td>
<td>D05</td>
<td>com</td>
<td>F02</td>
<td>,</td>
<td>D06</td>
<td>com</td>
<td>F02</td>
<td>,</td>
<td>D07</td>
<td>com</td>
<td>F02</td>
<td>,</td>
<td>D08</td>
<td>com</td>
<td>F02</td>
<td>,</td>
<td>D09</td>
<td>com</td>
<td>F02</td>
<td>,</td>
<td>D10</td>
<td>com</td>
<td>F02</td>
<td>,</td>
</tr>
<tr height="15" style="height:11.25pt">
<td height="15" style="height:11.25pt">D01</td>
<td>com</td>
<td>F03</td>
<td>,</td>
<td>D02</td>
<td>com</td>
<td>F03</td>
<td>,</td>
<td>D03</td>
<td>com</td>
<td>F03</td>
<td>,</td>
<td>D04</td>
<td>com</td>
<td>F03</td>
<td>,</td>
<td>D05</td>
<td>com</td>
<td>F03</td>
<td>,</td>
<td>D06</td>
<td>com</td>
<td>F03</td>
<td>,</td>
<td>D07</td>
<td>com</td>
<td>F03</td>
<td>,</td>
<td>D08</td>
<td>com</td>
<td>F03</td>
<td>,</td>
<td>D09</td>
<td>com</td>
<td>F03</td>
<td>,</td>
<td>D10</td>
<td>com</td>
<td>F03</td>
<td>,</td>
</tr>
<tr height="15" style="height:11.25pt">
<td height="15" style="height:11.25pt">D01</td>
<td>com</td>
<td>F04</td>
<td>,</td>
<td>D02</td>
<td>com</td>
<td>F04</td>
<td>,</td>
<td>D03</td>
<td>com</td>
<td>F04</td>
<td>,</td>
<td>D04</td>
<td>com</td>
<td>F04</td>
<td>,</td>
<td>D05</td>
<td>com</td>
<td>F04</td>
<td>,</td>
<td>D06</td>
<td>com</td>
<td>F04</td>
<td>,</td>
<td>D07</td>
<td>com</td>
<td>F04</td>
<td>,</td>
<td>D08</td>
<td>com</td>
<td>F04</td>
<td>,</td>
<td>D09</td>
<td>com</td>
<td>F04</td>
<td>,</td>
<td>D10</td>
<td>com</td>
<td>F04</td>
<td>,</td>
</tr>
<tr height="15" style="height:11.25pt">
<td height="15" style="height:11.25pt">D01</td>
<td>com</td>
<td>F05</td>
<td>,</td>
<td>D02</td>
<td>com</td>
<td>F05</td>
<td>,</td>
<td>D03</td>
<td>com</td>
<td>F05</td>
<td>,</td>
<td>D04</td>
<td>com</td>
<td>F05</td>
<td>,</td>
<td>D05</td>
<td>com</td>
<td>F05</td>
<td>,</td>
<td>D06</td>
<td>com</td>
<td>F05</td>
<td>,</td>
<td>D07</td>
<td>com</td>
<td>F05</td>
<td>,</td>
<td>D08</td>
<td>com</td>
<td>F05</td>
<td>,</td>
<td>D09</td>
<td>com</td>
<td>F05</td>
<td>,</td>
<td>D10</td>
<td>com</td>
<td>F05</td>
<td>,</td>
</tr>
<tr height="15" style="height:11.25pt">
<td height="15" style="height:11.25pt">D01</td>
<td>com</td>
<td>F06</td>
<td>,</td>
<td>D02</td>
<td>com</td>
<td>F06</td>
<td>,</td>
<td>D03</td>
<td>com</td>
<td>F06</td>
<td>,</td>
<td>D04</td>
<td>com</td>
<td>F06</td>
<td>,</td>
<td>D05</td>
<td>com</td>
<td>F06</td>
<td>,</td>
<td>D06</td>
<td>com</td>
<td>F06</td>
<td>,</td>
<td>D07</td>
<td>com</td>
<td>F06</td>
<td>,</td>
<td>D08</td>
<td>com</td>
<td>F06</td>
<td>,</td>
<td>D09</td>
<td>com</td>
<td>F06</td>
<td>,</td>
<td>D10</td>
<td>com</td>
<td>F06</td>
<td>,</td>
</tr>
<tr height="15" style="height:11.25pt">
<td height="15" style="height:11.25pt">D01</td>
<td>com</td>
<td>F07</td>
<td>,</td>
<td>D02</td>
<td>com</td>
<td>F07</td>
<td>,</td>
<td>D03</td>
<td>com</td>
<td>F07</td>
<td>,</td>
<td>D04</td>
<td>com</td>
<td>F07</td>
<td>,</td>
<td>D05</td>
<td>com</td>
<td>F07</td>
<td>,</td>
<td>D06</td>
<td>com</td>
<td>F07</td>
<td>,</td>
<td>D07</td>
<td>com</td>
<td>F07</td>
<td>,</td>
<td>D08</td>
<td>com</td>
<td>F07</td>
<td>,</td>
<td>D09</td>
<td>com</td>
<td>F07</td>
<td>,</td>
<td>D10</td>
<td>com</td>
<td>F07</td>
<td>,</td>
</tr>
<tr height="15" style="height:11.25pt">
<td height="15" style="height:11.25pt">D01</td>
<td>com</td>
<td>F08</td>
<td>,</td>
<td>D02</td>
<td>com</td>
<td>F08</td>
<td>,</td>
<td>D03</td>
<td>com</td>
<td>F08</td>
<td>,</td>
<td>D04</td>
<td>com</td>
<td>F08</td>
<td>,</td>
<td>D05</td>
<td>com</td>
<td>F08</td>
<td>,</td>
<td>D06</td>
<td>com</td>
<td>F08</td>
<td>,</td>
<td>D07</td>
<td>com</td>
<td>F08</td>
<td>,</td>
<td>D08</td>
<td>com</td>
<td>F08</td>
<td>,</td>
<td>D09</td>
<td>com</td>
<td>F08</td>
<td>,</td>
<td>D10</td>
<td>com</td>
<td>F08</td>
<td>,</td>
</tr>
<tr height="15" style="height:11.25pt">
<td height="15" style="height:11.25pt">D01</td>
<td>com</td>
<td>F09</td>
<td>,</td>
<td>D02</td>
<td>com</td>
<td>F09</td>
<td>,</td>
<td>D03</td>
<td>com</td>
<td>F09</td>
<td>,</td>
<td>D04</td>
<td>com</td>
<td>F09</td>
<td>,</td>
<td>D05</td>
<td>com</td>
<td>F09</td>
<td>,</td>
<td>D06</td>
<td>com</td>
<td>F09</td>
<td>,</td>
<td>D07</td>
<td>com</td>
<td>F09</td>
<td>,</td>
<td>D08</td>
<td>com</td>
<td>F09</td>
<td>,</td>
<td>D09</td>
<td>com</td>
<td>F09</td>
<td>,</td>
<td>D10</td>
<td>com</td>
<td>F09</td>
<td>,</td>
</tr></tbody></table></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">Alguém poderia me ajudar ???</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">Desde já agradeço a atenção !!!!</div><div dir="ltr"><br></div><div dir="ltr">Att,</div><div dir="ltr"><br></div><div dir="ltr">Giselle</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div><br></div><div dir="ltr"><br></div></div></div><br>_______________________________________________<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" 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" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Manoel Galdino<br><a href="https://sites.google.com/site/galdinomcz/" target="_blank">https://sites.google.com/site/galdinomcz/</a><br>
</div>