On Fri, Mar 9, 2012 at 8:35 AM, carol white <wht_...@yahoo.com> wrote: > Hello, > How is it possible to sort dates in R? >
Your question has already been answered but note that if your data is a time series and you represent it using zoo it will automatically be sorted. Here dates is in reverse chronological order whereas z, the zoo time series object, is in chronological order: values <- 13:10 dates <- as.Date("2000-01-01") + 3:0; dates library(zoo) z <- zoo(values, dates); z -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com ______________________________________________ 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.