In R, type the line that fits sales on ad spend from the stores frame and saves the model as fit.
In R, type the line that fits sales on ad spend from the stores frame and saves the model as fit.
Answer
fit <- lm(sales ~ adspend, data = stores)
Response ~ explanatory, data = the frame. fit holds the coefficients, the residuals and everything summary() prints.