corr_matrix: Create Correlation Matrix from corrp Inferences

View source: R/corr_matrix.R

corr_matrixR Documentation

Create Correlation Matrix from corrp Inferences

Description

Using the results obtained from the corrp function, this function creates a correlation matrix.

Usage

corr_matrix(c, ...)

## Default S3 method:
corr_matrix(c, col = c("infer.value", "stat.value", "isig"), isig = TRUE, ...)

## S3 method for class 'clist'
corr_matrix(c, col = c("infer.value", "stat.value", "isig"), isig = TRUE, ...)

Arguments

c

[clist]
Output from the corrp function.

...

Not used. Included for S3 method consistency.

col

[character(1)]
Specifies the column to be used in the correlation matrix.

isig

[logical(1)]
Determines whether values that are not statistically significant should be represented by NA or FALSE in the correlation matrix.

Author(s)

Igor D.S. Siciliani, Paulo H. dos Santos

Examples


iris_cor <- corrp(iris)
iris_m <- corr_matrix(iris_cor, isig = FALSE)
if (require("corrplot")) {
  corrplot(iris_m) # You can visualize the matrix using corrplot
}

meantrix/corrp documentation built on April 17, 2025, 7:22 p.m.