correlation_finder: Function to find out strong correlations in a correlation...

View source: R/correlation_finder.R

correlation_finderR Documentation

Function to find out strong correlations in a correlation matrix

Description

The function finds out which variables have strong correlations according to a correlation threshold. The output returns a list of variables names that can summarize the information and removes redundant variables.

Usage

correlation_finder(cor_mat, threshold, verbose = TRUE)

Arguments

cor_mat

A correlation matrix.

threshold

Threshold value from which it is considered that the correlation is high.

verbose

Verbose output.

Value

Returns a vector with variable names that can summarize the information.

Examples

## Not run: 
environ_data <- read.csv(system.file("extdata",
                                     "nichekmeansCluster.csv",
                                      package = "ntbox"))[,-(1:3)]
environ_cors <- cor(environ_data)
correlation_finder(cor_mat = environ_cors ,threshold = 0.7,verbose = FALSE)
correlation_finder(cor_mat = environ_cors ,threshold = 0.7,verbose = TRUE)

## End(Not run)

luismurao/ntbox documentation built on May 9, 2024, 8:24 p.m.