This running correlation is used as a measure of signal strength in climate reconstruction. It is calculated along a moving and adjustable time window. I would like to get the code in r. I had this kind of tool in the past, but have lost it.
You can use the rwi.stats.running() function from the dplR package. With this you can get a staff of time-series calculations for dendrochronological or paleoclimatic studies. The resulting dataframe gives you the rbar.bt values (mean interseries correlation between all series) and additional calculations. In the help of this function you can find some examples with reproduclible R codes. I hope it can help you.