I’ve been a big fan of ggplot2 for a long time but plyr has been in my toolkit for less than a year and it is now one of my most-used R packages. It is how aggregate/*apply would have been if they were awesome.
In five lines this code computes the cumulative distribution functions of all of the variables in the iris data set and creates a colored, faceted plot to visualize the data.
#cummulative distribution of iris data
# 0.1% increments
qtiles<-seq(0,1,0.001)
#compute quantiles by species for each variable
q<-ddply(iris,c("Species"),summarise,
quantile=qtiles,
Petal.Width=quantile(Petal.Width,qtiles),
Petal.Length=quantile(Petal.Length,qtiles),
Sepal.Width=quantile(Sepal.Width,qtiles),
Sepal.Length=quantile(Sepal.Length,qtiles)
)
#melt the data.frame for easy ggplot faceting on variable
mq<-melt(q,id=c("Species","quantile"))
# plot using color for species and facets for variables
p<-ggplot(data=mq,aes(y=quantile,x=value))
p+geom_point(aes(color = factor(Species)))+facet_wrap(~variable)

p.s: your post in R-bloggers didn’t include the image.
Consider adding it in the future to increase the interest of readers to read your post.
Cheers,
Tal
Hmm my post did have an image. Must have been below the fold.