Correlation is a measure of statistical dependence between two variables. The values can range between -1.0 to +1.0. A value closer to +/- 1 implies a stronger relation.

However correlation does not necessarily imply causation.

The cor() function calculates the correlation between two variables. It also can be used to create a correlation matrix if there are more than 2 variables as in a data frame.

cor.test() can be used to test if the correlation between the variables is significant.


If you like us, please tell your friends.Share on LinkedInShare on Google+Share on RedditTweet about this on TwitterShare on Facebook