Correlation analysis.
Correlation analysis.
Corr( data, method = "pearson", nsmall = 2, p.adjust = "none", all.as.numeric = TRUE, plot = TRUE, plot.range = c(-1, 1), plot.palette = NULL, plot.color.levels = 201, save.file = NULL, width = 8, height = 6, dpi = 500 )
data |
Data frame. |
method |
|
nsmall |
Number of decimal places of output. Default is |
p.adjust |
Adjustment of p values for multiple tests:
|
all.as.numeric |
|
plot |
|
plot.range |
Range of correlation coefficients for plot. Default is |
plot.palette |
Color gradient for plot. Default is |
plot.color.levels |
Default is |
save.file |
|
width |
Width (in "inch") of the saved plot. Default is |
height |
Height (in "inch") of the saved plot. Default is |
dpi |
DPI (dots per inch) of the saved plot. Default is |
Invisibly return the correlation results obtained from
psych::corr.test()
.
Corr(airquality) Corr(airquality, p.adjust="bonferroni") d=as.data.table(psych::bfi) d[,`:=`( gender=as.factor(gender), education=as.factor(education), E=MEAN(d, "E", 1:5, rev=c(1,2), likert=1:6), A=MEAN(d, "A", 1:5, rev=1, likert=1:6), C=MEAN(d, "C", 1:5, rev=c(4,5), likert=1:6), N=MEAN(d, "N", 1:5, likert=1:6), O=MEAN(d, "O", 1:5, rev=c(2,5), likert=1:6) )] Corr(d[,.(age, gender, education, E, A, C, N, O)])
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.