mlokCorMat: mlokCorMat

Description Usage Arguments Value Examples

View source: R/exploratory_analysis.R

Description

Create correlation matrix with use of ggplot and reshape2 packages.

This is a funciton that helps to easily generate correlation matrices that can be used in reports. The input data must have at least two numeric variables, and will automatically exclude any fields that cannot be conformed into numeric data type.

Usage

1

Arguments

x

dataframe with at least two numeric fields.

Value

The red cells indicate negative correlation between variables; green indicates positive correlation.

Examples

1
2
3
4
5
6
Name <- c('Otis', 'Michael', 'Sharon', 'Robin' )
Height <- c(207, 178, 164, 180)
Weight <- c(250, 156, 132, 149)
Profile <- data.frame(Name, Height, Weight)

mlokCorMat(Profile)

michael-lok/mlokFunctions documentation built on April 8, 2020, 9:34 p.m.