Skip to content

stats:::regularize.values warning messages #69

@dansmith01

Description

@dansmith01

Minimal reproducible example:

ggplot() + geom_quasirandom(aes(x, y), data.frame(x="A", y=c(1, 0.9999999999999)), groupOnX = TRUE)
Warning messages:
1: In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) :
  collapsing to unique 'x' values
2: In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) :
  collapsing to unique 'x' values
3: In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) :
  collapsing to unique 'x' values

Might be related to tidyverse/ggplot2#4455 (comment) where geom_violin would produce the same error.

I was able to solve it in this case by rounding the y values:

ggplot() + geom_quasirandom(aes(x, y), data.frame(x="A", y=round(c(1, 0.9999999999999), 12)), groupOnX = TRUE)

geom_beeswarm also has trouble handling values like this. The following silently drops one of the data points:

ggplot() + geom_beeswarm(aes(x, y), data.frame(x="A", y=c(1, 0.9999999999999)), groupOnX = TRUE)

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