Writes data to an Excel file.
Examples
# Example data consists of 24 mouse bone marrow DNA samples imported
# using import_mut_data(), filtered with filter_mut, and summarized
# using calculate_mf().
outputpath <- tempdir()
mf_example <- readRDS(system.file("extdata/Example_files/mf_data_global.rds",
package = "MutSeqR"
))
mf_example2 <- readRDS(system.file("extdata/Example_files/mf_data_6.rds",
package = "MutSeqR"
))
mf_example3 <- readRDS(
system.file("extdata/Example_files/mf_data_6_sample.rds",
package = "MutSeqR"
)
)
list <- list(mf_example, mf_example2, mf_example3)
names(list) <- c("Global MF", "Base 6 Spectra", "Base 6 Sample Spectra")
# save a single data frame to an Excel file
write_excel(
mf_example,
output_path = outputpath,
workbook_name = "test_single"
)
#> Saved: /tmp/RtmpTC4ccn/test_single.xlsx
# save a list of data frames to an Excel file
write_excel(list, output_path = outputpath, workbook_name = "test_list")
#> Saved: /tmp/RtmpTC4ccn/test_list.xlsx
