cor_mat <- corx(mtcars, x = c(mpg,cyl,disp), y = c(wt,drat,disp,qsec),
z = wt, round = 2, stars = c(0.05),
caption = "Controlling for weight" ,
describe = list("mean" = function(x) mean(x,na.rm=TRUE)))
cor_mat
coef(cor_mat)
cor_mat$p
plot(cor_mat)
cor_2 <- corx(iris[,-5], describe = c(median, IQR = iqr, kurt = kurtosis),
note = "Using shortcuts to select describe functions", triangle = "lower")
cor_2
Run the code above in your browser using DataCamp Workspace