how to get the sample correlation in R code example
Example 1: correlation matrix in r
result = cor(x, method = "pearson", use = "complete.obs")
round(result,2)
Example 2: calculate correlation in r
cor(x, method = "pearson", use = "complete.obs")