Re: [R] sorting dataframe by arbitrary order

2011-10-14 Thread Trevor Davies
00 >d10001000 >b00100010 > > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com > > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-boun...@

Re: [R] sorting dataframe by arbitrary order

2011-10-14 Thread William Dunlap
b00100010 Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Trevor Davies > Sent: Friday, October 14, 2011 12:05 PM > To

[R] sorting dataframe by arbitrary order

2011-10-14 Thread Trevor Davies
This has been dogging me for a while. I've started making a lot of tables via xtable so the way I want to sort things is not always in alphabetical or numerical order. As an example, consider I have a dataframe as follows set.seed(100) a <- data.frame(V1=sample(letters[1:4],100, replace=T),V2=1:1