# NOT RUN {
data(monthlytemps)
res <- "seasonal" # annual, seasonal, monthly
season <- "winter" # winter, spring, summer, autumn
idx <- switch(season, winter=c(12,1,2), spring=3:5, summer=6:8, autumn=9:11)
if(res=="seasonal") monthlytemps <- dplyr::filter(monthlytemps, Month %in% idx)
get_ma(monthlytemps, res, season)
get_ma(list(monthlytemps, monthlytemps), res, season)
get_ma(monthlytemps, res, season, format="list")
# }
# NOT RUN {
get_ma(list(monthlytemps, monthlytemps), res, season, use_mclapply=T, mc.cores=2)
# }
Run the code above in your browser using DataLab