matrixToCorCouples: Matrix to couples

Description Usage Arguments Value Examples

View source: R/matrixToCorCouples.R

Description

Transform a correlation matrix into a correlation couples dataframe

Usage

1
matrixToCorCouples(matrix, coefName = "Coef.", sortByDescAbs = F)

Arguments

matrix

a dataframe corresponding to a matrix of correlation.

coefName

a string: the name of the coefficient the values of the matrix represent.

sortByDescAbs

a boolean to decide if to sort by descending absolute value of the coefficient.

Value

a dataframe corresponding to all correlation couples from the matrix.

Examples

1
2
3
4
5
6
7
# calculate a correlation dataframe
data(iris)
corDF<-multiBivariateCorrelation(dataset = iris)
corMatrix<-corCouplesToMatrix(x1_x2_val = corDF[,c('X1','X2',"pearson")])
print(corMatrix)
corCouples<-matrixToCorCouples(matrix = corMatrix,coefName="pearson")
print(corCouples)

linkspotter documentation built on July 23, 2020, 5:08 p.m.