Re: [R] Custom Plot - means, SD & 5th-95th% (Plotmeans or Boxplot)

2008-02-17 Thread Gabor Grothendieck
Using builtin dataset stackloss try this: f <- function(x) replace(quantile(x, c(5, 25, 50, 75, 95)/100), 3, mean(x)) bxp(list(stats = sapply(stackloss, f), n = stackloss, names = names(stackloss))) and see ?bxp and ?boxplot On Feb 17, 2008 9:17 PM, Stropharia <[EMAIL PROTECTED]> wrote: > > Any

Re: [R] Custom Plot - means, SD & 5th-95th% (Plotmeans or Boxplot)

2008-02-17 Thread David Winsemius
[EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: > It's fairly simple to set up something like this for ggplot2: > > install.packages("ggplot2") > library(ggplot2) > > library(ggplot2) > > q5 <- function(data) { > q <- function(p) unname(quantile(data$y, p)) > data.frame(min = q(0.05), max

Re: [R] Custom Plot - means, SD & 5th-95th% (Plotmeans or Boxplot)

2008-02-17 Thread h . wickham
It's fairly simple to set up something like this for ggplot2: install.packages("ggplot2") library(ggplot2) library(ggplot2) q5 <- function(data) { q <- function(p) unname(quantile(data$y, p)) data.frame(min = q(0.05), max = q(0.95)) } ggplot(diamonds, aes(x = cut, y = price)) + stat_summary(f

[R] Custom Plot - means, SD & 5th-95th% (Plotmeans or Boxplot)?

2008-02-17 Thread Stropharia
Any help with this problem would be greatly appreciated: I need to produce a custom plot i haven't come across in R. Basically, I want to show means, 1st standard deviation and 5th and 95th percentiles visually, using something resembling a boxplot. Is it possible to completely customize a boxplo