Skip to content
Prev 15450 / 398500 Next

Histograms per coding variable

> I need to do a series of histograms for each of the codes,
    > levels or factors in 'site'.  

[...]

    > Is there are more elegant way to do this without having to
    > use the fr.wt[1:82] bit? 

One way you can do it is to use tapply, as in
   
 > tapply( ft.wt, site, hist )

An alternative that is even better, IMHO, is to use the lattice
package, which is very slick :-)

Mike
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._