Closed
Description
stat_summary gives error with ggplot2_2.0.0 when missing data for ymin/ymax in at least one facet to calculate errorbars/pointrange.
ggplot2 1.0.1 robustly plotted just points without bars in such facet.
Taavi
Minimal example:
library(ggplot2)
library(dplyr)
mtcars %>%
group_by(gear, cyl) %>%
summarise(hp = mean(hp)) %>%
ggplot(aes(gear, hp)) +
stat_summary(fun.data = mean_se, geom = "pointrange") +
facet_wrap(~cyl)
Error in FUN(X[[i]], ...) : subscript out of bounds
In addition: Warning message:
Removed 8 rows containing missing values (geom_pointrange).
Metadata
Metadata
Assignees
Labels
No labels