Skip to content
Prev 272729 / 398498 Next

Coercing a character zoo to a numeric

On Tue, Sep 27, 2011 at 5:56 AM, Ashim Kapoor <ashimkapoor at gmail.com> wrote:
See ?zoo where it says that the zoo object may be "a numeric vector,
matrix or a factor".

Thus character is not supported although I suspect that a number of
operations continue to work anyways -- although evidently not that
one.

This seems to result in a numeric zoo object:

aggregate(z, identity, as.numeric)

although these sorts of computations with zoo objects that strictly
speaking are not legal are, of course, not officially supported.