An implementation of stats::cor(), which returns a correlation matrix in a specific format. See details below. Additional adjustment include the use of pairwise deletion by default.
1 
x 
a numeric vector, matrix or data frame. 
y 

use 
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

method 
a character string indicating which correlation
coefficient (or covariance) is to be computed. One of

This function returns a correlation matrix in the following format:
A tibble (see tibble
)
An additional class, "cor_df"
A "rowname" column
Standardised variances (the matrix diagonal) set to missing values
(NA
) so they can be ignored in calculations.
The main feature is the use of the data frame. This is to make use of data frame manipulation packages like dplyr and tidyr.
A correlation data frame (cor_df)
1 2 3 4 5 6 7 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.