ames)
```

---
class: middle

.center[
# `fit_data()`

Train a model by fitting a model. Returns a parsnip model fit.
]


```r
fit_data(
  Sale_Price ~ Gr_Liv_Area, # a formula
  model = lm_spec,          # parsnip model
  data = ames               # dataframe
  )
```

---
class: your-turn

# Your turn 2

Double check. Does


```r
lm_fit &lt;- fit_data(Sale_Price ~ Gr_Liv_Area, 
                   model = lm_spec, 
                   data = ames)
lm_fit
```

give the same results as


```r
lm(Sale_Price ~ G