Description Usage Arguments Value Examples
takes bivarate data and weights (g) and returns a weighted correlation
1 | weighted.cor(data, g)
|
data |
a matrix or dataframe in which the first two columns contain the two vectors for which the weighted correlation is sought |
g |
a vector of weights |
the weighted correlation
1 2 3 | df <- data.frame(norm = rnorm(10), unif = runif(10))
weights <- rep(1/10, 10)
weighted.cor(df, weights)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.