age_save function

Export Brain ROI Age Trends

Export Brain ROI Age Trends

Save all brain age trends into a single Excel file.

age_save(path, age_list)

Arguments

  • path: The path to save the excel file.
  • age_list: A list containing all ROIs' true volumes, age trend estimates, and the fitted GAMLSS model.

Returns

This function does not return a value. It saves the data to the specified file.

Examples

if(interactive()){ sub_df <- age_df[,c("Volume_1", "age", "sex", "ICV_baseline")] |> na.omit() colnames(sub_df) <- c("Volume_1", "age", "sex", "icv") age_list <- list("Volume_1" = age_list_gen(sub_df = sub_df)) temp_dir <- tempfile() dir.create(temp_dir) age_save(temp_dir, age_list) message("Age trend table saved to: ", temp_dir) unlink(temp_dir, recursive = TRUE) }