Export data out of R and write to disk.
export(object, ...) # S4 method for character export( object, ext = "txt", dir = getOption("acid.export.dir", default = "."), file = NULL, append = FALSE, overwrite = getOption("acid.overwrite", default = TRUE), quiet = getOption("acid.quiet", default = FALSE) ) # S4 method for matrix export( object, ext = getOption("acid.export.ext", default = "csv"), dir = getOption("acid.export.dir", default = "."), file = NULL, rownames = TRUE, colnames = TRUE, overwrite = getOption("acid.overwrite", default = TRUE), quiet = getOption("acid.quiet", default = FALSE) ) # S4 method for data.frame export( object, ext = getOption("acid.export.ext", default = "csv"), dir = getOption("acid.export.dir", default = "."), file = NULL, rownames = TRUE, colnames = TRUE, overwrite = getOption("acid.overwrite", default = TRUE), quiet = getOption("acid.quiet", default = FALSE) ) # S4 method for DataFrame export( object, ext = getOption("acid.export.ext", default = "csv"), dir = getOption("acid.export.dir", default = "."), file = NULL, rownames = TRUE, colnames = TRUE, overwrite = getOption("acid.overwrite", default = TRUE), quiet = getOption("acid.quiet", default = FALSE) ) # S4 method for Matrix export( object, ext = "mtx", dir = getOption("acid.export.dir", default = "."), file = NULL, overwrite = getOption("acid.overwrite", default = TRUE), quiet = getOption("acid.quiet", default = FALSE) ) # S4 method for GenomicRanges export( object, ext = getOption("acid.export.ext", default = "csv"), dir = getOption("acid.export.dir", default = "."), file = NULL, rownames = TRUE, colnames = TRUE, overwrite = getOption("acid.overwrite", default = TRUE), quiet = getOption("acid.quiet", default = FALSE) )
object | Object.
An object supporting |
---|---|
ext |
|
dir |
|
file |
|
append |
|
overwrite |
|
quiet |
|
rownames |
|
colnames |
|
... | Additional arguments. |
Invisible character
.
File path(s).
Updated 2021-03-16.
Some export utilities in R have a tendency to drop row names when writing to
disk in CSV format. For example, the readr family of functions never
write row names by design. This is a really poor default setting for
handling genomic data, which often contain gene identifiers in the row names.
Here we're performing any internal tibble coercion step to ensure row names
are always moved to a "rowname"
column in the CSV export.
Note that this function currently wraps data.table::fwrite()
by default
for exporting data.frame
and matrix
class objects.
#>#> [1] TRUE