I am hoping for some advice regarding ordering a dataframe, by date.
The dataframe is in the format below.
$story $datepub
story10 1 April 1999
story 901 March 2002
story 3710 July 1985
I want to reorder the entire dataframe so the earliest story is first, and
Try this:
Lines - story,datepub
story10,1 April 1999
story 90,1 March 2002
story 37,10 July 1985
DF - read.csv(textConnection(Lines))
DF[order(as.Date(DF$datepub, %d %B %Y)),]
On 8/6/06, Bob Green [EMAIL PROTECTED] wrote:
I am hoping for some advice regarding ordering a dataframe, by date.