| save_model | R Documentation |
Saves a fitted model object to the configured models directory. The directory is created lazily on first use.
save_model(model, name, public = FALSE, overwrite = TRUE, ...)
model |
A fitted model object (lm, glm, tidymodels workflow, etc.) |
name |
The name for the output file (without extension) |
public |
If TRUE, saves to public outputs directory (for project_sensitive type) |
overwrite |
If TRUE, overwrites existing files (default: TRUE) |
... |
Additional arguments passed to |
The path to the saved file (invisibly)
if (FALSE) {
# Fit and save a model
model <- lm(mpg ~ hp + wt, data = mtcars)
save_model(model, "mpg_regression")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.