Update correlation.functions.R

speedup correlation plot PDF creation