R Pearson Correlation Algorithm