View source: R/utils_general.R
cor | R Documentation |
A wrapper around the stats::cor function adding two additional methods, namely method = "hermite.spearman" and method = "hermite.kendall" (can be abbreviated). The input parameters and output value semantics closely match the stats::cor method for easy interchange. If neither the "hermite.spearman" nor the "hermite.kendall" method is selected, then this function will call stats::cor with the arguments provided.
cor(x, y = NULL, use = "everything", method = "pearson", ...)
x |
a numeric vector, matrix or data frame. |
y |
NULL (default) or a vector, matrix or data frame with compatible dimensions to x. The default is equivalent to y = x (but more efficient). |
use |
not used by hermite.spearman and hermite.kendall methods. For stats::cor this is an optional character string giving a method for computing covariances in the presence of missing values. This must be (an abbreviation of) one of the strings "everything", "all.obs", "complete.obs", "na.or.complete", or "pairwise.complete.obs". |
method |
a character string indicating which correlation coefficient is to be computed. One of "pearson" (default), "kendall", "spearman", "hermite.spearman" or "hermite.kendall": can be abbreviated. |
... |
Additional arguments for the constructor of the hermite_estimator object if method is "hermite.spearman" or "hermite.kendall". |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.