Export data from R
Usage
export(object, con, ...)
# S4 method for class 'FgseaList,character'
export(
object,
con,
geneSetResults = FALSE,
compress = FALSE,
overwrite = TRUE,
quiet = FALSE
)Arguments
- object
Object.
- con
character(1). Directory path.- geneSetResults
logical(1)orcharacter. Export per-gene set expression including log fold change values generated from DESeq2. Can be slow when processing all MSigDB collections, so disabled by default. Alternatively, can declare specific collections to process (seecollectionNamesfor supported values).- compress
logical(1). Apply gzip compression to all files.- overwrite
logical(1). Overwrite existing file on disk.- quiet
logical(1). Perform command quietly, suppressing messages.- ...
Additional arguments.
On-disk structure
Example:
file.path("object", "mutant_vs_control", "c1.csv")S4 object is currently structured by:
Gene set (c1-c8, h).
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:
Contrast
Gene set.
Examples
data(fgsea)
## FgseaList ====
object <- fgsea
con <- AcidBase::tempdir2()
#> Error in vapply(X = X, FUN = FUN, FUN.VALUE = logical(1L), ..., USE.NAMES = useNames): formal argument "USE.NAMES" matched by multiple actual arguments
out <- export(
object = object,
con = con
)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'con' in selecting a method for function 'export': object 'con' not found
print(out)
#> Error: object 'out' not found
AcidBase::unlink2(con)
#> Error: object 'con' not found