[R] two plots in qplot

Denis Kazakiewicz d.kazakiewicz at gmail.com
Fri Mar 25 15:33:02 CET 2011


Dear Ista 
Thank you very much for your time and suggestion
Right now I am trying to study trends in drugs sales which can be
reduced to the following example

drug1	drug2	year
4	4	1
8	5	2
6	9	3



 
I want to draw plot with two lines in it were 'year' would be on x axis
and sale level of two drugs on the same y axis 

Denis


У Пят, 25/03/2011 у 09:51 -0400, Ista Zahn піша:
> Hi Denis,
> Yes, just specify the variables in an aes call inside your geom_*
> call. Hard to be more specific without an example...
> 
> Best,
> Ista
> 
> On Fri, Mar 25, 2011 at 1:24 AM, Denis Kazakiewicz
> <d.kazakiewicz at gmail.com> wrote:
> > Hello
> > I simply want to plot two variables against one 'year' variable in
> > qplot.
> > Is any way of doing this without reshaping data in long format and using
> > facet function afterwards?
> >
> > Thank you
> >
> > Denis
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> 
> 
>



More information about the R-help mailing list