On Fri, 12 Sep 2003, Michael Kirschbaum wrote:
> Hello out there....
>
> Again I have a problem and I stuck...
>
> How can I sort a vector of dates?
>
> For example I have the vector
>
> a<-ISOdate(2001, 1, 1) + 70*86400*runif(10)
> How can this vector be sorted chronological?
a[sort.list(a)]
> And what's the function I should work with to handle these entries?
> (in sense of: which(a>2001-01-04) or somehting like that)
No function, just make sure you use *dates*, as in
which(a > as.POSIXct("2001-01-04"))
--
Brian D. Ripley, [EMAIL PROTECTED]
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help