Created
May 26, 2017 13:48
-
-
Save alfcrisci/079bc644ff17fb5fefa67fa5f30847b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| calc_climatology_stack=function(temp) { | |
| require(raster) | |
| res=list() | |
| res$mean_WT=calc(temp,mean,na.rm=T); | |
| res$sd_WT=calc(temp,sd,na.rm=T); | |
| res$q33=calc(temp,fun=function(x) quantile(x,probs=c(0.33),na.rm=T)); | |
| res$median=calc(temp,fun=function(x) quantile(x,probs=c(0.5),na.rm=T)); | |
| res$q66=calc(temp,fun=function(x) quantile(x,probs=c(0.66),na.rm=T)); | |
| return(res) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment