You're totally right Jeff. My mistake! to use with, we write it like this:
DF$season <- factor ( with ( *DF*, ifelse (( month == 12 | nonth == 1 |
month == 2 ), "Win",
ifelse ((month == 3 | nonth == 4 | month == 5 )
, "Spr",
ifelse ((month == 6 | nonth == 7 | month == 8 ) , "Sum", "Aut")))))
I'm glad it was useful for you,
Regards,
Ricardo
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-calculate-seasonal-mean-for-temperatures-tp4638639p4638694.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.