Hi Bogdan
the behaviour is result of ct and lt POSIX class
try
> str(test)
`POSIXlt', format: chr [1:4] "2005-02-08 18:49:15" "2005-02-07
18:36:54" "2005-02-04 18:37:03" "2005-02-06 18:29:04"
> str(tst)
`POSIXct', format: chr [1:4] "2005-02-08 18:49:15" "2005-02-07
18:36:54" "2005-02-04 18:37:
You can order (which is not the same as sort) POSIXct vectors but not
POSIXlt ones.
class() on your objects (or str(), but that only shows one class) would
have been revealing.
It is somewhat fortuitous that you can order and sort POSIXct vectors, as
you are ordering the underlying numeric rep
bogdan romocea yahoo.com> writes:
:
: Dear useRs,
:
: How come the first attempt to sort a POSIXt vector fails (Error:
: non-atomic type in greater), while the second succeeds? (Code inserted
: below.) The documentation says that POSIXt is used to allow operations
: such as subtraction, so I'd
Dear useRs,
How come the first attempt to sort a POSIXt vector fails (Error:
non-atomic type in greater), while the second succeeds? (Code inserted
below.) The documentation says that POSIXt is used to allow operations
such as subtraction, so I'd expect sorting to work. Is this perhaps an
OS issue