Skip to content

Potential issue with new ggplot2 version? #686

Closed
@teunbrand

Description

@teunbrand

Hi there,

We've been preparing a new major release for ggplot2 and a reverse dependency check marked an issue with the flextable package.

The following information was received from the check:


## Newly broken

*   checking examples ... ERROR
    ```
    Running examples in ‘flextable-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: gg_chunk
    > ### Title: 'ggplots' chunk wrapper
    > ### Aliases: gg_chunk
    > 
    > ### ** Examples
    > 
    > library(data.table)
    ...
    Loading required package: ggplot2
    a flextable object.
    col_keys: `Species`, `gg` 
    header has 1 row(s) 
    body has 3 row(s) 
    original dataset sample: 
    Error in format.default(unlist(xx), ...) : 
      c("Found no format() method for class \"ggplot2::ggplot\"", "Found no format() method for class \"ggplot\"", "Found no format() method for class \"ggplot2::gg\"", "Found no format() method for class \"S7_object\"", "Found no format() method for class \"gg\"")
    Calls:  ... format -> format.default -> lapply -> FUN -> format.default
    Execution halted
    ```

However, when I input that example in the R console, it seems to work fine. The error does not show up when I run devtools::run_tests() and only appears to pop up during R CMD Check. I also couldn't find the offending call in flextable's code ( format.default(unlist(xx), ...)). I'm a bit at a loss about what should be done about this, but I think the very minimum is to report here that there might possibly be an incompatibility.

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 a fix 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