Skip to contents

Calculate pairwise correlation matrix with significance marked by stars. Columns and rows are grouped by variable type

Usage

corstars(cor_value, cor_p, var_type)

Arguments

cor_value

association matrix

cor_p

significance of association test

var_type

type of variables that correlation and association is calculated for

Value

Correlation coefficient and significance of correlation test between each pair of variables, as well as variable type corresponding to rows and columns for display in shiny app

Examples

data(mtcars)
library(VisX)
types <- rep("numeric", ncol(mtcars))
test <- VisX::pairwise_cor(mtcars, types)
#> Error: 'pairwise_cor' is not an exported object from 'namespace:VisX'
type <- c("numeric", "factor",  rep("numeric", 5), rep("factor", 2), rep("ordinal", 2))
corstars(test$cor_value, test$cor_p, type)
#> Error in corstars(test$cor_value, test$cor_p, type): object 'test' not found