On Mon, Jul 27, 2009 at 11:46 PM, Meenu Sahi<meenus...@gmail.com> wrote:
> Dear Users
> I have a dataframe called mydata4 of the following order with the first
> column as a date and the rest of the columns are numeric with rate.
> Column 1          Rate1 : Rate 20
> (PxMid)
> 01/01/2003
> 07/01/2001
> ----
> ----
> --
>
> I wish to sort this dataframe on the first col in ascending order.
> I tried to do the following
> mydata4<-mydata4[,order(mydata4$PxMid)]
> This give an error.
>
> Please help.
>
> Regards
> Meenu

Try

mydata4<-mydata4[order(mydata4$PxMid), ]

Cheers,
Mark

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to