Skip to content

basics: how do you sort a table?

2 messages · Monica Palaseanu-Lovejoy, Brian Ripley

#
Hi,

This may be a very basic question but it seems i cannot figure it 
out does not matter what.

how do you sort a table (ascending or descending) after the values 
in one particular column? I want to do something like the sort 
function in Xcel.

Also, is there any other plot function that accepts log for y axes 
like the parplot2() from gregmisc? Thanks for the tip Marc about 
barplot2. very useful indeed!

Thank you again for all the help,

Monica
#
On Mon, 17 May 2004, Monica Palaseanu-Lovejoy wrote:

            
Well, what is `Xcel' and what is a `table'?  What Excel calls sheets are
usually represented as data frames in R, and ?order will tell you how to
do this.

help.search("sort") would surely have got you there -- did you try it?
Look at `log' under ?par.  Almost all basic plot methods do. (It seems an
oversight that barplot does not.) This is in an `Introduction to R', for
example -- have you read that yet?