sum.window<-function(i, sum.var,time.var, window.length){
prev.time<-time.var[i]-window.length/2
next.time<-time.var[i]+window.length/2
output<-sum(sum.var[time.var>=prev.time & time.var<=next.time])
return(output)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.