squid
unread,Mar 31, 2009, 3:30:24 PM3/31/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
Hi,
Simple question, so sorry upfront.
How do I define a subset of data?
If I have a particular variable, say "chrom" and 10 different
categories within that variable, how do I plot one of these at a
time?
Facets has been great for plotting them all at the same time using
qplot(position,X, facets= .~chrom, colour=class, size=1)
But now I'd like to plot one chrom at a time. I gather I should use
subset to do this rather than facets? But not really clear on how to
use subset within this format. The following did not plot just the
subset I wanted, but rather all the data.
qplot(position, X, data=subset(alldata, chrom="2L"), colour=class,
size=1).
Many thanks.