Thijs Blom
2025-03-28
Welcome to my final assignment
This Shiny app predicts fuel efficiency (MPG) based on horsepower and the number of cylinders.
model <- lm(mpg ~ hp + factor(cyl), data = mtcars) predict(model, data.frame(hp = 150, cyl = 4))
## 1 ## 25.04429