Hi Brian,
Thanks for the message. Dennis Murphy provided me with exactly what I
was looking which was an improved solution to the one that I have
already come up with. I'll reproduce it below:
# uncomment if plyr is loaded
# detach(package:plyr)
library(dplyr)
library(lubridate)
library(ggplot2)
# Add POSIXct object to airquality data, save as aq
aq <- airquality %>%
mutate(Date = dmy(paste(Day, Month, "2000", sep="/")))
# Compute monthly means and set a corresponding date
# in the middle of the month
aqMonthlyMean <- aq %>%
group_by(Month) %>%
summarise(Ozone = mean(Ozone, na.rm = TRUE)) %>%
mutate(Date = dmy(paste("15", Month, "2000", sep = "/")))
# Plot
aq %>% ggplot(., aes(x = Date, y = Ozone)) +
geom_point() +
geom_point(data = aqMonthlyMean, color = "darkorange", size = 3) +
geom_path(data = aqMonthlyMean, color = "darkorange", size = 1)
Regards,
Sam
On Fri, Nov 27, 2015 at 10:40 AM, Brian Deering <
pndf...@gmail.com> wrote:
> I can't figure out what problem you're trying to overcome if what you have works.
>
> Can you be more specific?
>
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
ggplot2+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.