I am having a problem plotting a line using qplot. I've reviewed previous posts related to ggplot2 (e.g. ggplot2 each group consists of only one observation), but my problem is a bit different.
I only want a simple line graph plotting temperature against time (ymd_hms). Not two lines.
My data looks like this:
Date.time
2011/06/17 00:00:00
2011/06/17 00:30:00
2011/06/17 01:00:00
2011/06/17 01:30:00
2011/06/17 02:00:00
2011/06/17 02:30:00
2011/06/17 03:00:00
2011/06/17 03:30:00
Temp
71.1
71.1
71.1
71.1
70.8
70.8
70.8
70.5
This is the code I've used:
as.POSIXct(data$Date.time, format = "%Y/%m/%d %H:%M:%S")
qplot(Date.time, Temp, data=mydata, geom="line")
But I get this error:
"Each group consists of only one observation. Do you need to adjust the group aesthetic?"
How can I fix this?
Thank you!