diag_save {ComBatFamQC}R Documentation

Export Batch Effect Diagnosis Results

Description

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

Usage

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.

Value

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
}


[Package ComBatFamQC version 1.0.6 Index]