save_res | R Documentation |
openxlsx
Given a 'fileName', create new (wb <- openxlsx::createWorkbook(fileName)
)
or load existing (wb <- openxlsx::loadWorkbook(fileName)
) Excel file. Then, use 'save_res'
to save 'res' objects into this file into a specified worksheet. One file can hold multiple worksheets.
No need to explicitly close the file.
save_res(res, fileName = "fileName.xlsx", wb = wb, sheetName = "KEGG")
res |
a data frame or a matrix to be saved |
fileName |
a file name with ‘.xlsx' extension to save the results, Default: ’fileName.xlsx' |
wb |
a workbook object, created initially, Default: wb |
sheetName |
a name of a worksheet to save the results, Default: 'KEGG' |
nothing, just saves the results
## Not run: library(openxlsx) fileName <- "results/DEGs.xlsx" unlink(fileName) # Delete previous file wb <- openxlsx::createWorkbook(fileName) # openxlsx::loadWorkbook(fileName) # Or, load existing res <- enrichR::enrichFullGeneList(up.genes, dn.genes, databases = "KEGG_2016", fdr.cutoff = 1) # Enrichment analysis of up/downregulated genes save_res(res, fileName = fileName, wb = wb, sheetName = "KEGG") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.