This is an R Markdown presentation on simple linear regression
2022-11-04
This is an R Markdown presentation on simple linear regression
## height weight ## 1 66 143 ## 2 68 170 ## 3 68 162 ## 4 71 171 ## 5 73 173 ## 6 62 119 ## 7 63 127 ## 8 64 141 ## 9 72 191 ## 10 68 184
library(ggplot2) ggplot(people, aes(height, weight)) + geom_point() + geom_smooth(method="lm", se=FALSE)
## `geom_smooth()` using formula = 'y ~ x'
ggplot(people, aes(height, weight)) + geom_point() +
geom_smooth(method="lm", color="red") + labs(x="Height", y="Weight",
title="Simple Linear Regression") + theme(plot.title = element_text(colour="red", face="bold"))
## `geom_smooth()` using formula = 'y ~ x'