Skip to content

Calculating seasonal anomalies

2 messages · Hefri, Rui Barradas

#
Hello,

Try the following.


Month <- format(Dat$open_date, "%m")
anom <- Dat$Dry_w - ave(Dat$Dry_w, Month, FUN = function(x) mean(x, 
na.rm = TRUE))
st.anom <- Dat$PP_int - ave(Dat$PP_int, Month, FUN = function(x) mean(x, 
na.rm = TRUE))



Hope this helps,

Rui Barradas

Em 18-02-2013 14:03, Hefri escreveu: