Learn R Programming

rChEA3 (version 0.2.0)

exportResults: Export rChEA3 Results to Excel

Description

Write a rChEA3 results object (named list of data frames, one per collection) to an Excel workbook, with one sheet per collection.

Usage

exportResults(
  results,
  output_dir,
  output_file = "rChEA3_results",
  with_date = TRUE,
  verbose = TRUE
)

Value

(Invisibly) the full path to the saved .xlsx file.

Arguments

results

A named list of data frames (e.g., the return of queryChEA3()), where each element corresponds to a ChEA3 collection (e.g., "Integrated--meanRank", "ENCODE--ChIP-seq", etc.). A single data frame is also accepted and will be written to one sheet.

output_dir

A string specifying the output directory. This parameter is required and has no default.

output_file

Base file name (without extension). Default: "rChEA3_results".

with_date

Logical; if TRUE, prepend today's date (ISO, YYYY-MM-DD) to the file name. Default: TRUE.

verbose

Logical; if TRUE, print the saved path. Default: TRUE.

Examples

Run this code
# \donttest{
    data(a549_dex_downreg)
    results <- queryChEA3(genes = a549_dex_downreg, query_name = "test_a549_dex_downreg")
    exportResults(results,
    output_dir = tempdir(),
    output_file = "rChEA3_results_a549_dex_downreg.xlsx")
# }

Run the code above in your browser using DataLab