plot(loss ~ temp, data = Insulate)
model <- lm(loss ~ temp, data = Insulate)
abline(model, col = "blue")
summary(model)
if (FALSE) {
library(ggplot2)
ggplot2::ggplot(data = Insulate, aes(x = temp, y = loss)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE) +
theme_bw()
}
Run the code above in your browser using DataLab