# NOT RUN {
# Keep the `x` matrix if the data are not too big.
spec_obj <-
linear_reg() %>%
set_engine("lm", x = ifelse(.obs() < 500, TRUE, FALSE))
spec_obj
fit_obj <- fit(spec_obj, mpg ~ ., data = mtcars)
fit_obj
nrow(fit_obj$fit$x)
# }
Run the code above in your browser using DataLab