corstarsl: Correlation matrix with singificance stars

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/corstarsl.R

Description

Format a correlation matrix with stars to indicate significance

Usage

1
corstarsl(x, type = c("pearson", "spearman"), digits = 2, full = FALSE)

Arguments

x

data matrix

type

type of correlation matrix, to be passed to rcorr.

digits

number of decimal places to use

full

logical. If TRUE, a more complete output is returned, including not only the formatted correlation matrix, but also the original correlations and p-values.

Details

Missing values are treated using pairwise deletion, which is the default of rcorr

Value

if full is false, a formatted correlation matrix is returned. Otherwise, a list including the formatted correlation matrix, the original correlaitons and the p-values.

Note

This funciton was adapted from here: https://github.com/kyuni22/ksmv/blob/master/functions/corstarsl.R

Author(s)

Giulio Costantini

References

https://github.com/kyuni22/ksmv/blob/master/functions/corstarsl.R

See Also

rcorr pcorstarsl

Examples

1
2
3
library(psychTools)
data(bfi)
corstarsl(bfi[,1:10])

GiulioCostantini/markerIndex documentation built on March 3, 2021, 5:58 a.m.