Untitled
unknown
plain_text
2 years ago
439 B
9
Indexable
# Function to save predictions and duration
save_predictions_duration <- function(predictions_duration, file_name) {
# File path construction with file name
file_path <- paste0("Model/", file_name, ".rds")
# Check and create "Model" directory if it does not exist
if (!dir.exists("Model")) {
dir.create("Model")
}
# Save predictions_duration object to the file path
saveRDS(predictions_duration, file = file_path)
}Editor is loading...