Untitled
Anonymous
plain_text
11/06/2023 2:49 PM
588 B
16
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...