Export data out of R and write to disk.

export(object, ...)

# S4 method for FGSEAList
export(object, name = NULL, dir = ".")

Arguments

object

Object.

name

character(1). Name to use on disk. If NULL, will use the name of the object instead.

dir

character(1). Directory path.

...

Additional arguments.

Value

Invisibily return file paths, either as list or character.

Note

Updated 2019-10-11.

On-disk structure

Example: fgsea/mutant_vs_control/c1.csv

S4 object is currently structured by:

  1. Gene set (c1-c8, h).

  2. Contrast.

The object was structured in this manner to flow with the R Markdown template. However, when writing to disk, I think it makes more sense to organize by:

  1. Contrast

  2. Gene set.

Examples

data(gsea) export(gsea, dir = "example")
#> Exporting to '/data00/draco/acidbase/packages/pfgsea/docs/reference/example/gsea'.
#> Error in allAreAtomic(data): could not find function "allAreAtomic"
sort(list.files(file.path("example", "gsea")))
#> character(0)
unlink("example", recursive = TRUE)