[R] Multiple hist(ograms) - One plot
Dieter Menne
dieter.menne at menne-biomed.de
Thu Oct 2 11:10:09 CEST 2008
Michael Just <mgjust <at> gmail.com> writes:
>
> sc_recov.21 <- dat[dat$sc_recov=21,]
Be careful: it should be "==", not "=" when want a comparison.
df = data.frame(grp = letters[1:5],val=rnorm(100))
dfab = df[df$grp=="a" | df$grp=="b",] # The simple way with "or"
dfcde = df[df$grp %in% c("c","d","e"),] # The flexible was
Or use the subset parameter in lattice plot
Dieter
More information about the R-help
mailing list