As David said, you sorted by Date.
But sorting by rownames is not really the point. The point is that
rownames are not line numbers.
The rownames were assigned when the data frame was created, and then
preserved when you sorted. Sometimes, rownames contain meaningful
information that is associat
On Oct 24, 2012, at 2:27 AM, martiny wrote:
Ai...I see, i didn't know I can sort rowname.
more study to do :)
You deleted the context of this thread, but while you are looking at
the rownames documentation you might also keep your eyes open for the
zoo and xts packages which could convert
Ai...I see, i didn't know I can sort rowname.
more study to do :)
cheers,
martin
--
View this message in context:
http://r.789695.n4.nabble.com/After-sorting-a-dataframe-by-date-tp4647173p4647291.html
Sent from the R help mailing list archive at Nabble.com.
___
On Oct 23, 2012, at 9:34 AM, martiny wrote:
> HI,
> I have created a dataframe "df" and try to sort it by its date using the
> order() as below:
>
> df<-read.csv(constr,header=T)
> sorted.df<-df[order(as.Date(df$Date), decreasing = F),]
> print(sorted.df)
>
> The dataframe was sorted, but th
4 matches
Mail list logo