Hi there I got a quick question on date format in qplot(). I tried to run the line “qplot(YearQuarter,Value, data=day.m,geom="line")” YearQuarter is a string variable which is like ( 2011December). The qplot doesn’t recognise it as a date format. The graph is like below. I wanted the lines to be horizontal rather than vertical. The first line of the day.m is below Provider Type YearQuarter Value 1 Other PM BUSINESS 2011 December NA > How can get qplot() to read YearQuarter as a date variable? Thanks in advance

Luo Lei
Marketing Insight Analyst
Two Degrees Mobile Limited
==========================
(M) +64 27 361 9166
(P) +64 9 919 7000
www.2degreesmobile.co.nz
Two Degrees Mobile Limited | 131 Khyber Pass Rd | Newmarket | Auckland | New Zealand |
PO Box 8355 | Symonds Street | Auckland 1150 | New Zealand | Fax +64 9 919 7001
Hi thereI got a quick question on date format in qplot(). I tried to run the line “qplot(YearQuarter,Value, data=day.m,geom="line")”YearQuarter is a string variable which is like ( 2011December). The qplot doesn’t recognise it as a date format. The graph is like below. I wanted the lines to be horizontal rather than vertical.The first line of the day.m is belowProvider Type YearQuarter Value1 Other PM BUSINESS 2011 December NA>How can get qplot() to read YearQuarter as a date variable?
<image001.png>Thanks in advance
Luo Lei
Marketing Insight Analyst
Two Degrees Mobile Limited
==========================
(M) +64 27 361 9166
(P) +64 9 919 7000
www.2degreesmobile.co.nz
<imagea8...@871cfeb6.77dd47e4>
Two Degrees Mobile Limited | 131 Khyber Pass Rd | Newmarket | Auckland | New Zealand |
PO Box 8355 | Symonds Street | Auckland 1150 | New Zealand | Fax +64 9 919 7001
Disclaimer
The e-mail and any files transmitted with it are confidential and may contain privileged or copyright information. If you are not the intended recipient you must not copy, distribute, or use this e-mail or the information contained in it for any purpose other than to notify us of the error. If you have received this message in error, please notify the sender immediately, by email or phone (+64 9 919 7000) and delete this email from your system. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Two Degrees Mobile Limited. We do not guarantee that this material is free from viruses or any other defects although due care has been taken to minimize the risk
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
Hi Heike Thanks for your email. I would like to plot a simple time serie by using qplot() or ggplot() Before I did plot the table, I have to replace the NA with 0? Is this necessary? Can qplot or ggplot recognise NAs? Here is the screen dump for the data in a melted format Then I will try to run “qplot(Quarter,Customers,facets=PROVIDER~.,data=x1.m,geom="line",main="Portouts")” Nothing happens??? I was hoping to see a line in each box. Could you tell me where I did wrong? Thanks 

Luo Lei
Marketing Insight Analyst
Two Degrees Mobile Limited
==========================
(M) +64 27 361 9166
(P) +64 9 919 7000
www.2degreesmobile.co.nz
Two Degrees Mobile Limited | 131 Khyber Pass Rd | Newmarket | Auckland | New Zealand |
PO Box 8355 | Symonds Street | Auckland 1150 | New Zealand | Fax +64 9 919 7001
I attached the data this time... I don’t seem to get anything out by running following code ggplot(x1.m, aes(x=Quarter,y=Customers)) +geom_line() +facet_wrap(~PROVIDER) with (x1.m,qplot(Quarter,Customers,facets=PROVIDER~.,data=x1.m,geom="line",main="Portouts")) I only got a blank screen? 
Hi Ben The result is below by running the your code. R still has recognised Quarter as a date variable.....It should be a line. ggplot(x1.m, aes(x=Quarter,y=Customers,group=1)) +geom_line() +facet_wrap(~PROVIDER) 
Luo Lei
Marketing Insight Analyst
Two Degrees Mobile Limited
==========================
(M) +64 27 361 9166
(P) +64 9 919 7000
www.2degreesmobile.co.nz
Two Degrees Mobile Limited | 131 Khyber Pass Rd | Newmarket | Auckland | New Zealand |
PO Box 8355 | Symonds Street | Auckland 1150 | New Zealand | Fax +64 9 919 7001
Disclaimer
The e-mail and any files transmitted with it are confidential and may contain privileged or copyright information. If you are not the intended recipient you must not copy, distribute, or use this e-mail or the information contained in it for any purpose other than to notify us of the error. If you have received this message in error, please notify the sender immediately, by email or phone (+64 9 919 7000) and delete this email from your system. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Two Degrees Mobile Limited. We do not guarantee that this material is free from viruses or any other defects although due care has been taken to minimize the risk
-----Original Message-----
From: ggp...@googlegroups.com [mailto:ggp...@googlegroups.com] On Behalf Of Ben Bond-Lamberty
Sent: Wednesday, 24 October 2012 1:04 p.m.
To: ggp...@googlegroups.com
Subject: Re: date in qplot()
You need