Skip to content

print.Class to handle composition #11

Description

@avhz

Composition added in #5, but the print method needs to be updated.

Class("Foo", a = t_int, b = t_dbl, c = t_char)
Class("Bar", foo = Foo, baz = t_dbl)

foo <- Foo(a = 1L, b = 2.0, c = "xxx")
bar <- Bar(foo = foo, baz = 3.0)
bar
Error in as.data.frame.default(x[[i]], optional = TRUE) : 
  cannot coerce class"ClassMap"to a data.frame

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions