Last active
January 1, 2016 05:19
-
-
Save sachsmc/8097788 to your computer and use it in GitHub Desktop.
Boxplot with quantile whiskers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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