```
# Convert a time series from the stacked stationary form
# back to periodically correlated
# Not exported
stat2pc = function(Y,period=2,n=NULL){
nr = nrow(Y)
d = ncol(Y)
if (is.null(n))
n = nr*period
dnew = d / period
X = c()
for (i in 1:dnew){
X = cbind(X,matrix(t(Y[,1:period + period*(i-1)]),ncol=1))
}
X[1:n,]
}
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.