How to plot weighted means on a boxplot?
问题 After searching for a solution and fiddling, I am reaching out for help in my attempt to display weighted means on a boxplot (I have tried to cross-post this to the ggplot2 mailing list as well). I provide a toy example below. #data value <- c(5, 7, 8, 6, 7, 9, 10, 6, 7, 10) category <- c("one", "one", "one", "two", "two", "two", "three", "three", "three","three") weight <- c(1, 1.2, 2, 3, 2.2, 2.5, 1.8, 1.9, 2.2, 1.5) df <- data.frame(value, category, weight) #unweighted means by category