Computes coefficients for every pair of selected variables. Pearson's correlation is used when both variables are numeric and pass a Shapiro-Wilk normality check; Spearman's correlation is used otherwise.
corfun(data, variables)Invisibly returns a lower-triangular numeric matrix.