Skip to content
Prev 589 / 12125 Next

[R-pkg-devel] How to make S3-method for the "format" generic for class inheriting from "AsIs"

Why not just make your own as.data.frame method? e.g.

as.data.frame.pin <- function(x, ...) {
  structure(
    list(x),
    class = "data.frame",
    row.names = .set_row_names(length(x))
  )
}

data.frame() calls as.data.frame() on all of its arguments.

Hadley
On Tue, Dec 8, 2015 at 5:13 AM, Erik Bulow <erik.bulow at rccvast.se> wrote: