We built a linear regression model.

fit <- lm(dist ~ speed, data = cars)
b   <- coef(fit)
plot(fit, 1)

The slope of the regression is 3.9324088.