correlation plot matrix in r code example Example: correlation matrix in r result = cor(x, method = "pearson", use = "complete.obs") round(result,2)