Skip to content

Instantly share code, notes, and snippets.

@sachsmc
Last active January 1, 2016 05:19
Show Gist options
  • Save sachsmc/8097788 to your computer and use it in GitHub Desktop.
Save sachsmc/8097788 to your computer and use it in GitHub Desktop.
Boxplot with quantile whiskers
myboxplot <- function(datalist, quantiles = c(.1, .9), names, ...){
bp <- boxplot(datalist, plot = FALSE)
quants <- sapply(datalist, function(df){
quantile(df, quantiles, na.rm = T)
})
bp$stats[1,] <- quants[1,]
bp$stats[5,] <- quants[2,]
bp$names <- names
bxp(bp, ...)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment