Update: calculation of correlation coefficient now works with gappy data.