Incorrect month order in zApply function
Hello,
With the current code of zApply, you should use a function that returns an ordered vector. For example:
Month <- function(x)
{
idx <- as.numeric(format(x, '%m'))
factor(month.name[idx],
levels = month.name,
ordered = TRUE)
}
x2 <- zApply(s, by = Month, mean)
Best,
Oscar.
Oscar Perpi??n Lamigueiro Dpto. Ing. El?ctrica, Electr?nica, Autom?tica y F?sica Aplicada Escuela T?cnica Superior de Ingenier?a y Dise?o Industrial URL: http://oscarperpinan.github.io