On Tue, 6 Jun 2006, [EMAIL PROTECTED] 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?

No, it is as documented: see ?sort

      As from R 2.3.0, all attributes are removed from the return value
      except names, which are sorted.  (If 'partial' is specified even
      the names are removed.)

Note, the class is an attribute.  For many classes sorting destroys the 
appropriateness of the class.

> In the mean time. I'll try to override the sort function for the POSIXct
> objects.

You can restore the class if appropriate.

-- 
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

______________________________________________
R-help@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

Reply via email to