'Error message: Na/NaN/Inf when running linear regression
I am trying to add a best fit line to a scatterplot where the y variable has been log transformed. My command is:
abline(lm(log(Epiphyte.Cover)~Seagrass.Cover))
And the error message that keeps appearing is:
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/Inf in 'y'
I have no values that are 0 in my dataset and all are positive numbers, anyone have any ideas how to get rid of this error? Let me know what other info you need! I am only new to R so please try and keep it simple as I have found the previously asked questions similar to this quite hard to follow. Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
