Matthew Vernon <m.c.ver...@warwick.ac.uk> writes: > Is it possible to produce box-and-whisker plots given that I have the > median, interquartile and 5/95th centile values, but not the data from > which they come?
The answer, which came from Steve Ellison (thanks!) is to note that "stats" is the only bit of the "z" argument to bxp that has to be present, so given a data file with columns year,mean,median,centiles, something like this works: # transform data so the rows are the various centiles in order # there's probably a more elegant approach! bsr <- matrix(allobs[,c(4,5,3,6,7)],nrow=5,byrow=TRUE) # column 1 is the year, which is our factor bsbox <- list( stats=bsr,names=allobs$V1) bxp(bsbox,xlab="Year",ylab="Number of cattle per batch") I thought I'd follow-up so the answer to my question will be in the archives. Thanks, Matthew -- Matthew Vernon, Research Fellow Ecology and Epidemiology Group, University of Warwick http://blogs.warwick.ac.uk/mcvernon ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.