Skip to content

Add S7 Convert method to extend ggplot2 classes #6544

Open
@Yunuuuu

Description

@Yunuuuu

It seems we cannot use S7 class to extend the new class system:

class_new_theme <- S7::new_class("new_theme", ggplot2::class_theme)
S7::convert(ggplot2::theme(), class_new_theme)
#> Error in (structure(function (elements, complete, validate) : argument "elements" is missing, with no default

Created on 2025-07-04 with reprex v2.1.0
~
~
~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions