#Evaluate the first difference of a series
#K. Wiese Julio 2018
##########################################
FirstDifference <- function(r){
Firstdiff <- calc(r, fun=diff)
return(Firstdiff)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.