# NOT RUN {
if (require(dplyr)) {
iris_means <-
iris %>%
group_by(Species) %>%
summarise(Sepal.Length = mean(Sepal.Length), Sepal.Width = mean(Sepal.Width))
gf_point(Sepal.Length ~ Sepal.Width, data = iris, color = ~ Species) %>%
gf_label(Sepal.Length ~ Sepal.Width, data = iris_means,
label = ~Species, color = ~Species, size = 2, alpha = 0.7)
}
# }
Run the code above in your browser using DataLab