<div dir="ltr">I don't think this is a data.table specific question, but you can use order:<div><br></div><div>dt[order(V), ] for data.table object...</div><div><br></div><div>or</div><div><br></div><div>df[order(df$V), ] for data.frame object</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 March 2017 at 10:33, glaporta <span dir="ltr"><<a href="mailto:bioglp@gmail.com" target="_blank">bioglp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
is it possible to reorder (not manually) the data frame columns on the basis<br>
of their value?<br>
Thanks,<br>
Gianandrea<br>
<br>
xxx <- data.frame(matrix(runif(8), ncol=8))<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://r.789695.n4.nabble.com/reorder-data-frame-columns-not-manually-tp4729802.html" rel="noreferrer" target="_blank">http://r.789695.n4.nabble.com/<wbr>reorder-data-frame-columns-<wbr>not-manually-tp4729802.html</a><br>
Sent from the datatable-help mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<br>
datatable-help mailing list<br>
<a href="mailto:datatable-help@lists.r-forge.r-project.org">datatable-help@lists.r-forge.<wbr>r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help" rel="noreferrer" target="_blank">https://lists.r-forge.r-<wbr>project.org/cgi-bin/mailman/<wbr>listinfo/datatable-help</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Manabu Sakamoto, PhD<div><a href="mailto:manabu.sakamoto@gmail.com" target="_blank">manabu.sakamoto@gmail.com</a></div></div></div>
</div>