Correlatiion coefficient calculations

Correlations can be calculated on raw data, data sets or groupings.
I think it mighth have been JSBeautify 'tidying up' I had a load of similar issues the other day that caused everything to break temporarily.  I'll update the line breaking here.