Skip to content
Prev 256092 / 398506 Next

unexpected sort order with merge

B77S <bps0002 at auburn.edu> writes:
Thanks for checking.  Is this on a more recent version of R than 2.10.1?
(I'm half-hoping this is something fixed in a newer R, so I can use it
as an excuse to demand an upgrade.)
[...]
I think this is equivalent to the "single column" version.  For yearmon
objects, when `merge` only has one column to sort by, it seems to do the
right thing.  It only uses alphabetical order when there are more than
one column.  For ordered factors, though, even the single-column merge
was giving me strange sorts.

-Johann


P.S. Just in case people have bad threading on their mail/news reader, here's
the "bad sort" example: