cor_matrix: Correlation Matrix

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/cor_matrix.R

Description

This function produces the matrix of correlations between all quantitative variables in a dataframe.

Usage

1
cor_matrix(X,type="pearson")

Arguments

X

A data frame

type

Either pearson or spearman. If pearson, the Pearson correlations are returned. If spearman, the Spearman's rank correlations are returned.

Details

This function filters out any non-numerical variables and provides correlations only between quantitative variables. Best for datasets with only a few variables. The correlation matrix is returned (with class matrix).

Author(s)

Adam Petrie

References

Introduction to Regression and Modeling

See Also

cor

Examples

1
2
3
4
5

regclass documentation built on March 26, 2020, 8:02 p.m.