corr_matrix: A Correlation Matrix function

Description Usage Arguments Value Examples

Description

This function allows you to create a correlation plot aswell as get correlational data.

Usage

1
2
corr_matrix(data = NULL, type = "pearson", colors = c("steelblue2",
  "firebrick"))

Arguments

data

The dataset only containing the coloumns you want correlations between.

type

The correlation type, use either "pearson" or "spearman".

colors

A vector containing the colors (either names or #Codes) of the colors you want to use. The first index is equal a negative correlation, second index equals positive correlation.

Value

data

Calculated correlations aswell as p-values.

plot

The ggplot object.

Examples

1
rpdp_corr_matrix(mtcars, "pearson")

Dynge/r_dynge documentation built on July 1, 2019, 11:21 p.m.