Closed
Description
I receive the warning
In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) :
collapsing to unique 'x' values
with this code:
df <- data.frame(x = 1, y = c(0, 0.25, 0.5, 0.75, 5))
ggplot2::ggplot(df, ggplot2::aes(x = x, y = y)) +
ggplot2::geom_violin(draw_quantiles = c(0.5))
The warning does not appear with
df <- data.frame(x = 1, y = c(0, 0.25, 0.5, 0.75, 4))
so it is not a problem of the structure (including any potential duplicates) of the data.
R version 4.0.5 (2021-03-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] glue_1.4.2
loaded via a namespace (and not attached):
[1] fansi_0.4.2 digest_0.6.27 assertthat_0.2.1 dplyr_1.0.5
[5] utf8_1.1.4 crayon_1.4.1 grid_4.0.5 R6_2.5.0
[9] DBI_1.1.1 lifecycle_1.0.0 gtable_0.3.0 magrittr_2.0.1
[13] scales_1.1.1 ggplot2_3.3.3 pillar_1.5.1 rlang_0.4.10
[17] farver_2.1.0 generics_0.1.0 vctrs_0.3.6 ellipsis_0.3.1
[21] labeling_0.4.2 purrr_0.3.4 munsell_0.5.0 compiler_4.0.5
[25] pkgconfig_2.0.3 colorspace_2.0-0 tidyselect_1.1.0 tibble_3.1.0