I'm trying using the corr() function to calculate weighted ponderations. The way it works is the first argument should be a matrix with two columns corresponding to the two variables whose correlation we wish to calculate and the second a vector of weights to be applied to each pair of observations.I'm trying using the corr() function to calcula