I am plotting a linear regression fit for the Loblolly data in R and trying to add each mean y for each x level. My code is below:
plot(Loblolly$height~Loblolly$age, xlab = "Age", ylab = "Height", main = "Loblolly Data")
lob.fit <- lm(Loblolly$height~Loblolly$age)
lob.sum <- summary(lob.fit)
str(lob.sum)
abline(lob.fit)
This is probably a really easy question with a really easy answer but I don't know how to add the means. When I google all that shows up is ggplot and I'm not supposed to be using that. Any help?
