See weightedCorr for examples.