Rscript -e 'per<-function(x){n=.75)0 else .5*(1+cos(4*pi*d));x<-(z-w*mean(z)-(1-w)*z[1])[-1];N=as.Date(lim[1]),];x<-x[x$date