Skip to content

Compatibility with ggplot2 4.0.0 #32

@teunbrand

Description

@teunbrand

Hi there,

We've been preparing a new major release for ggplot2 and found an issue during a reverse dependency check.
A reason for the major version change is a migration to an S7 backend for most classes in ggplot2.
This conflicts with some assumptions in ggedit, for example in the line below where theme elements are expected to be a list.

obj.class <- lapply(a[[obj.names[i]]], function(x) class(x)[1])

The problem popped up when executing one of the examples: compare(ggplot2::theme_bw(), ggplot2::theme_get()).
We sympathise that this is annoying, but would like to put the suggestion out there that it'd be good for us if ggedit put out a hotfix.

You can test your code with the development version of ggplot2 by installing it as follows:

# install.packages("pak")
pak::pak("tidyverse/ggplot2")

We aim to release the new ggplot2 version in about 2 weeks, and hope you can submit an update to CRAN around that time. Hopefully this will inform you in a timely manner.

Best wishes,
Teun

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions