Re: [R] Reorder in decreasing order

2012-07-22 Thread Duncan Murdoch
C D E F -14.50 -15.33 -2.08 -4.916667 -3.50 -16.67 Levels: F B A D E C ### A.K. - Original Message - From: Duncan Murdoch To: Sverre Stausland Cc: r-help@r-project.org Sent: Sunday, July 22, 201

Re: [R] Reorder in decreasing order

2012-07-22 Thread Duncan Murdoch
On 12-07-22 12:27 PM, Sverre Stausland wrote: reorder() is probably the best way to order the levels in a vector without manually specifying the order. But reorder() orders by default in an increasing order: "The levels are ordered such that the values returned by ‘FUN’ are in increasing order."

Re: [R] Reorder in decreasing order

2012-07-22 Thread Sverre Stausland
A F B F F B A A A F F B A D A F B B F A A F C > B A > [39] E E D E E D D D D D E D D C E E E E D D C C E D C C E E C C C C C C > Levels: A B C D E F > A.K. > > > > > > > - Original Message - > From: Sverre Stausland > To: arun > Cc: R help &

Re: [R] Reorder in decreasing order

2012-07-22 Thread Sverre Stausland
F > -14.50 -15.33 -2.08 -4.916667 -3.50 -16.67 > > Levels: F B A D E C > ### > > A.K. > > > > - Original Message - > From: Sverre Stausland > To: r-help@r-project.org > Cc: > Sent: Sunday, July 2

Re: [R] Reorder in decreasing order

2012-07-22 Thread Weidong Gu
Sverre, have you tried to put minus(-) in front of the variable by which you order the other? weidong On Sun, Jul 22, 2012 at 12:27 PM, Sverre Stausland wrote: > reorder() is probably the best way to order the levels in a vector > without manually specifying the order. But reorder() orders by d

[R] Reorder in decreasing order

2012-07-22 Thread Sverre Stausland
reorder() is probably the best way to order the levels in a vector without manually specifying the order. But reorder() orders by default in an increasing order: "The levels are ordered such that the values returned by ‘FUN’ are in increasing order." Is there a way to do what reorder() does, but o