# NOT RUN {
plot(cost ~ number, data = Family)
abline(lm(cost ~ number, data = Family), col = "red")
cor(Family$cost, Family$number)
# }
# NOT RUN {
library(ggplot2)
ggplot2::ggplot(data = Family, aes(x = number, y = cost)) +
geom_point() +
geom_smooth(method = "lm") +
theme_bw()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab