Learn R Programming

psycho (version 0.4.91)

bayes_cor: Bayesian Correlation Matrix.

Description

Bayesian Correlation Matrix.

Usage

bayes_cor(df, df2 = NULL, reorder = TRUE)

Arguments

df

The dataframe.

df2

Optional dataframe to correlate with the first one.

reorder

Reorder matrix by correlation strength. Only for square matrices.

Value

A list of dataframes

Examples

Run this code
# NOT RUN {
library(psycho)

df <- psycho::affective
cor <- bayes_cor(df)
summary(cor)
print(cor)
plot(cor)

df <- select(psycho::affective, Adjusting, Tolerating)
df2 <- select(psycho::affective, -Adjusting, -Tolerating)
cor <- bayes_cor(df, df2)
summary(cor)
print(cor)
plot(cor)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab