cortestR
computes correlations and their significance level
based on cor.test. Coefficients and p-values may be combined or
reported separately.
cortestR(
cordata,
method = "pearson",
digits = 3,
digits_p = 3,
sign_symbol = TRUE,
split = FALSE,
space = ""
)
Depending on parameters split and sign_symbol, either a single data frame with coefficient and p-values or significance symbols or a list with two data frames.
data frame or matrix with rawdata.
as in cor.test.
rounding level for estimate.
rounding level for p value.
If true, use significance indicator instead of p-value.
logical, report correlation and p combined (default) or split in list.
character to fill empty upper triangle.
# with defaults
cortestR(mtcars[, c("wt", "mpg", "qsec")], split = FALSE, sign_symbol = TRUE)
# separate coefficients and p-values
cortestR(mtcars[, c("wt", "mpg", "qsec")], split = TRUE, sign_symbol = FALSE)
Run the code above in your browser using DataLab