Plotting an array of histograms
On 27-Jul-01 Liaw, Andy wrote:
Assuming x.df is the data frame with two columns, x (the value) and group (indicator for groups). Try something like par(mfrow=c(5,5)) # ask for 5x5 array of plots, by row tapply(x.df$x, x.df$group, hist) Andy
Thanks to Andy for this suggestion, which basically works in that it generates the requisite array of histograms. And I'm also grateful for being thereby forced to look more closely into this aspect of R programming, which was useful and instructive! However, using Andy's method I'm still having trouble getting the histograms labelled etc as I would like, which is why I'm also interested in Thomas Lumley's suggestion:
Use the histogram function in the new 'lattice' package
-thomas
for which also thanks. However, where is it? It doesn't seem to be part of R-1.3 which I have just downloaded, and I can't seem to find any mention of "lattice" on CRAN. Thanks, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 167 1972 Date: 28-Jul-01 Time: 12:03:54 ------------------------------ XFMail ------------------------------ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._