Skip to Content

get the monthly average value and plot them

I want get the monthly mean of four temperature and plot the four lines
I tried to use the zoo package ,and the aggregate function:

z <- read.zoo(weather1,format="%Y-%m-%d" , header = TRUE, tz = "")
weatheravghigh<- aggregate(z$High,  by = as.yearmon,  FUN = mean)

but failed.