Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
439 B
5
Indexable
Never
# 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)
}