Skip to content

Error in ifelse() with plot object #57

Description

@teunbrand

Hi there!

We're preparing a new release of ggplot2 and during a reverse dependency test, it became apparent that your package was failing with the new version.
In this case, we believe this is a bug in the fairmodels package, in particular in the lines below:

ifelse(!flip_axis,
dendogram_right <- dendogram_model + coord_flip(),
dendogram_right <- dendogram_metric + coord_flip()
)
ifelse(!flip_axis,
dendogram_top <- dendogram_metric,
dendogram_top <- dendogram_model
)

In this case, it appears you're using ifelse() on a plot object. A plot object is not a vector, so I'll suggest to use the if () {} else {} control logic, instead of the ifelse() function.
We plan to release the new ggplot2 version in a few weeks, at which point CRAN might start complaining about this.
Hopefully this informs you in a timely manner.

Best wishes,
Teun

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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