[R] Histograms per coding variable
Marc Schwartz
MSchwartz at medanalytics.com
Wed Dec 5 16:30:37 CET 2001
In addition, you can use something like:
hist(fr.wt[site == "glen"],nclass = 20)
if you wish to access just one of the subsets at a time within 'site'.
-----Original Message-----
From: owner-r-help at stat.math.ethz.ch
[mailto:owner-r-help at stat.math.ethz.ch]On Behalf Of Ben Bolker
Sent: Wednesday, December 05, 2001 6:22 AM
To: Smit, A, Albertus, Dr
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] Histograms per coding variable
Something like
tapply(fr.wt,site,hist,nclass=20)
e.g.:
a <- runif(100)
f <- factor(rep(1:10,rep(10,10)))
par(mfrow=c(3,4))
tapply(a,f,hist)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list