weighted.cor2.Rd
Computes a matrix of weighted correlations between the columns of x
and the columns of y
. This can be Pearson, Spearman or Kendall correlation.
weighted.cor2(x, y = NULL, weights = NULL, method = "pearson", na.rm = FALSE)
a data frame of numeric vectors
an optional data frame of numeric vectors. Default is NULL, which means that correlations between the columns of x
are computed.
numeric vector of weights. If NULL (default), uniform weights (i.e. all equal to 1) are used.
a character string indicating which correlation coefficient is to be computed. One of "pearson" (default), "kendall", or "spearman".
logical, indicating whether NA values should be silently removed before the computation proceeds. Default is FALSE.
a matrix of correlations