Skip to content
Prev 308135 / 398503 Next

cannot coerce class '"rle"' into a data.frame

On Tue, Oct 16, 2012 at 7:07 PM, Marc Schwartz <marc_schwartz at me.com> wrote:
Or just write one for general use:

as.data.frame.rle <- function(x, ...) do.call(data.frame, x)

I'd imagine the reason it doesn't already exist (since it is pretty
transparent in this case) is simply because no one has never thought
it was particularly necessary and the design of
as.data.frame.default() reflects that it's better to fail loudly and
early rather than hoping it will do the right thing when a specific is
not supplied.

Cheers,
Michael