[R] Suspicious behaviour of sort on POSIXct vectors in R-2.3.0 and R-2.3.1

Gabor Grothendieck ggrothendieck at gmail.com
Tue Jun 6 20:20:04 CEST 2006


Use order instead:

x <- as.POSIXct(Sys.Date() + 10:1)
x[order(x)]


On 6/6/06, patrick.guevel at uk.bnpparibas.com
<patrick.guevel at uk.bnpparibas.com> wrote:
> Hi ,
>
> When I sort a vector of POSIXct values in R-2.3.0 and R-2.3.1, I get a
> vector of numeric values and this gets some of my code to crash (class
> object creation). Is that a R bug?
>
> In the mean time. I'll try to override the sort function for the POSIXct
> objects.
>
> Thanks,
>
> Patrick Guével
> Head of quantitative research for electronic trading
>
>
> This message and any attachments (the "message") is\ intende...{{dropped}}
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



More information about the R-help mailing list