[R] how to plot a data by different group
istazahn at gmail.com
Mon Oct 12 23:06:41 CEST 2009
Assuming your variables are in a dataframe called myData, some
variation of the following may be what you want:
myData.m <- melt(myData, measure.vars=c("Y1", "Y2"))
qplot(X, value, colour=variable, shape=groupf3,
facets=groupf1~groupf2, geom="point", data=myData.m)
On Mon, Oct 12, 2009 at 4:36 PM, catherineLF <cathelf at hotmail.com> wrote:
> Dear everyone,
> sorry to bother you. I have a big data, suppose it has 200 groups and each
> group has 100 data. So the data have 20000 observations in total. The
> variables are
> groupf1 groupf2 groupf3 X Y1 Y2
> 1 1 1 1 0.5 0.5
> groupf1, groupf2 and groupf3 are defining the 200 groups.
> I want to make 200 graphs for each group. For each group, graph Y1 and Y2 vs
> Is there any easy way to do that?
> Thank you very much for your help!
> View this message in context: http://www.nabble.com/how-to-plot-a-data-by-different-group-tp25862739p25862739.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
University of Rochester
Department of Clinical and Social Psychology
More information about the R-help