Re: [R] two plots in qplot

2011-03-28 Thread Brian Diggs
On 3/25/2011 3:13 AM, Denis Kazakiewicz 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? Yes, its is possible. But it is harder and more convoluted than re

Re: [R] two plots in qplot

2011-03-25 Thread Ista Zahn
Hi Denis, On Fri, Mar 25, 2011 at 10:33 AM, Denis Kazakiewicz wrote: > 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      

Re: [R] two plots in qplot

2011-03-25 Thread Denis Kazakiewicz
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

Re: [R] two plots in qplot

2011-03-25 Thread 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 wrote: > Hello > I simply want to plot two variables against one 'year' variable in > qplot. > Is any way