Creating a data frame based of values created using lm() for correlation between variables in ggplot

No, I believe correl is the correlation coefficient. See here for more information on interpreting the output of lm().

You can get more information on the model using summary() like so:

my_lm <- lm(Specific_conductance ~ tds, data = my_data)
summary(my_lm)

Call:
lm(formula = Specific_conductance ~ tds, data = my_data)

Residuals:
    Min      1Q  Median      3Q     Max 
-63.588 -26.736   2.567  33.750  52.950 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) -36.30481   19.97640  -1.817   0.0858 .  
tds           1.92033    0.07351  26.122 9.18e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 38.85 on 18 degrees of freedom
Multiple R-squared:  0.9743,	Adjusted R-squared:  0.9729 
F-statistic: 682.4 on 1 and 18 DF,  p-value: 9.182e-16

Going to bow out now as this is not my area of expertise, hopefully someone can help with any further questions.

2 Likes