diag_save function

Export Batch Effect Diagnosis Results

Export Batch Effect Diagnosis Results

Save all the batch effect diagnosis results in a single Excel file or a Quarto report.

diag_save(path, result, use_quarto = TRUE)

Arguments

  • path: The path to save the result.
  • result: A list derived from visual_prep() that contains datasets and statistical test results.
  • use_quarto: A boolean variable indicating whether to generate a Quarto report.

Returns

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

Examples

if(interactive()){ result <- visual_prep(type = "lm", features = "thickness.left.cuneus", batch = "manufac", covariates = "AGE", df = adni[1:100, ], mdmr = FALSE, cores = 1) temp_dir <- tempfile() dir.create(temp_dir) diag_save(temp_dir, result, quarto = FALSE) message("Diagnostics saved to: ", temp_dir) unlink(temp_dir, recursive = TRUE) # Clean up the temporary directory }