How to Use cor() to Calculate Correlation Coefficients in R
https://www.statology.org/r-cor-function/
Example 1: Calculate Pearson Correlation Coefficient Between Two VariablesExample 3: Calculate Spearman Correlation Coefficient Between Two Variables The following code shows how to use the cor() function to calculate the Pearson correlation coefficient between the hours and scorevariables: The Pearson correlation coefficient between hours and score turns out to be 0.86. Note that if there are NA values in your data frame, you can use the argument use=’complete.obs’to only use the rows where the...
The following code shows how to use the cor() function to calculate the Pearson correlation coefficient between the hours and scorevariables: The Pearson correlation coefficient between hours and score turns out to be 0.86. Note that if there are NA values in your data frame, you can use the argument use=’complete.obs’to only use the rows where the...
DA: 33 PA: 100 MOZ Rank: 63