<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12px"><div dir="ltr"><span>Mas, foi quase !!!! </span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> Em Sexta-feira, 17 de Outubro de 2014 12:19, Giselle Davi <giselle_davi@yahoo.com.br> escreveu:<br> </font> </div> <br><br> <div class="y_msg_container"><div id="yiv4687654620"><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" id="yiv4687654620yui_3_16_0_1_1413544261478_51983"><span id="yiv4687654620yui_3_16_0_1_1413544261478_51982">Infelizmente não funcionou !!!</span></div><div dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51985"><span>Era assim: </span> </div><div dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51985">head(dados)</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51987" style=""> SNPName F9 D7 F5 F4 D2 F3 F2 D5 D6 F1 D3 F6 D4 D8 D1 F7 D9 D10 F8</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51986" style="">1 S1_10045 . . G G G G G G G G G G G G G G G G C</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51988" style="">2 S1_222471 C C C C C C C C T C C C C C C C C C C</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51989" style="">3 S1_222473 T T T T T T T T T T T T T T T T T T T</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51990" style="">4 S1_239225 G C G G G C G G G G C C G G G G G G G</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51991" style="">5 S1_623890 C C C C C C C C C C C C C C C C C C C</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51992" style="">6 S1_645264 T T T T T T T T T T T C T T T T T T T</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51992" style=""><br clear="none"></div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51992" style="">E ficou assim:</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51992" style="">dialelo<- dados[,sort(colnames(dados))]</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51992" style="">> head(dialelo)</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51992" style=""> D1 D10 D2 D3 D4 D5 D6 D7 D8 D9 F1 F2 F3 F4 F5 F6 F7 F8 F9 SNPName</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51992" style="">1 G G G G G G G . G G G G G G G G G C . S1_10045</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51992" style="">2 C C C C C C T C C C C C C C C C C C C S1_222471</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51992" style="">3 T T T T T T T T T T T T T T T T T T T S1_222473</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51992" style="">4 G G G C G G G C G G G G C G G C G G G S1_239225</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51992" style="">5 C C C C C C C C C C C C C C C C C C C S1_623890</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_51992" style="">6 T T T T T T T T T T T T T T T C T T T S1_645264</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_52309" style=""><br clear="none"></div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_52309" style=""><br clear="none"></div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_52309" style="">Continuo aceitando sugestões !!!! Desde já agradeço !!!!</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_52309" style=""><br clear="none"></div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_52309" style=""><br clear="none"></div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_52309" style="">Att,</div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_52309" style=""><br clear="none"></div><div class="yiv4687654620" dir="ltr" id="yiv4687654620yui_3_16_0_1_1413544261478_52309" style="">Giselle</div><div class="yiv4687654620" id="yiv4687654620yui_3_16_0_1_1413544261478_51993" style=""><br clear="none" class="yiv4687654620" style=""></div> <div class="yiv4687654620qtdSeparateBR"><br clear="none"><br clear="none"></div><div class="yiv4687654620yqt2338374402" id="yiv4687654620yqt44859"><div class="yiv4687654620yahoo_quoted" style="display: block;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div dir="ltr"> <font size="2" face="Arial"> Em Sexta-feira, 17 de Outubro de 2014 11:23, Paulo Justiniano <paulojus@leg.ufpr.br> escreveu:<br clear="none"> </font> </div> <br clear="none"><br clear="none"> <div class="yiv4687654620y_msg_container">se M é sua matrix neste caso<br clear="none"><br clear="none">M[,sort(colnames(M)]<br clear="none"><br clear="none">vai ordenar como desejado<br clear="none"><br clear="none"><div class="yiv4687654620yqt0319809986" id="yiv4687654620yqtfd18818"><br clear="none">On Fri, 17 Oct 2014, Giselle Davi wrote:<br clear="none"><br clear="none">> Prezados,<br clear="none">> <br clear="none">> Como eu consigo ordenar as seguintes colunas de uma matriz no R : A5, A3, A1, A4, A2, B2, B1, B3 ?<br clear="none">> O objetivo é que elas fiquem assim: A1, A2, A3, A4, A5, B1, B2, B3<br clear="none">> <br clear="none">> Utilizei o comando order, mas o ordenamento ocorre somente dentro das colunas e não entre como eu preciso.<br clear="none">> <br clear="none">> <br clear="none">> Desde já agradeço a atenção.<br clear="none">> <br clear="none">> <br clear="none">> Att,<br clear="none">> <br clear="none">> Giselle<br clear="none">> <br clear="none">> <br clear="none">></div><br clear="none"><br clear="none"></div> </div> </div> </div></div> </div></div></div><br><br></div> </div> </div> </div> </div></body></html>