I would like to pre-compute brief summaries of the data (using plyr and passing the quantile function) and then build using geom_boxplot(stat = "identity") . This works great, except that (a) it does not display outliers as points and (b) expands the whiskers to the maximum and minimum number of data that is displayed.
Example:
library(plyr) library(ggplot2) set.seed(4) df <- data.frame(fact = sample(letters[1:2], 12, replace = TRUE), val = c(1:10, 100, 101)) df
What can I do ... with the errors (a) and (b) mentioned above:

What I would like to receive, but still I use preliminary calculations through plyr (or another method):

Initial Thoughts: Perhaps there is some way to pre-calculate the true mustache endpoints without outliers? Then multiply the data for outliers and pass them as geom_point() ?
Motivation:. When working with larger datasets, I found it faster and more practical to use plyr , dplyr and / or data.table to pre-calculate statistics, and then build them, rather than calculate ggplot2 .
UPDATE
I can extract everything I need from the following combination of dplyr and plyr , but I'm not sure if this is the most efficient way:
df %>% group_by(fact) %>% do(ldply(boxplot.stats(.$val), data.frame)) Source: local data frame [6 x 3] Groups: fact fact .id X..i.. 1 a stats 2 2 a stats 4 3 a stats 10 4 a stats 13 5 a stats 16 6 an 9
source share