Need a help plotting in r for time series data.The Y is temperature and X is date(now in format %d-%m-%y) and need a plot like:
temp data in month wise along with a box plot
I have tried:
univariare-temperature
temperature = ts(r$temp, frequency = 12, start = 2011) plot(temperature, xaxt = "n") tsp = attributes(temperature)$tsp dates
= seq(as.Date("2011-01-01"), by = "month", along = temperature) axis(1, at = seq(tsp[1], tsp[2], along = temperature), labels = format(dates, "%m-%y"))
ggplot
gg2=ggplot(r,aes(mnth,temp)) + geom_line()
windows()
print(gg2)
but the format is coming incorrect.
Any help will be really appreciable!!
Thanks Devi