save_model: Save an R model to a temporary file

View source: R/platform.R

save_modelR Documentation

Save an R model to a temporary file

Description

This function saves a given R model object to a randomly named '.RData' file in the '/tmp/' directory. The file is saved with a unique name generated using random letters.

Usage

save_model(model)

Arguments

model

The R model object to be saved.

Value

A string representing the full file path to the saved '.RData' file.

Examples

model <- lm(mpg ~ cyl, data = mtcars)
file_path <- save_model(model)


validmind documentation built on April 4, 2025, 5:05 a.m.