export | R Documentation |
Export data from R
export(object, con, ...)
## S4 method for signature 'DFrame,character'
export(
object,
con,
rownames = TRUE,
colnames = TRUE,
quote = TRUE,
overwrite = TRUE,
engine = c("base", "data.table", "readr"),
quiet = FALSE
)
## S4 method for signature 'GRanges,character'
export(
object,
con,
rownames = TRUE,
colnames = TRUE,
quote = TRUE,
overwrite = TRUE,
engine = c("base", "data.table", "readr"),
quiet = FALSE
)
## S4 method for signature 'List,character'
export(object, con, overwrite = TRUE, quiet = FALSE)
## S4 method for signature 'Matrix,character'
export(object, con, overwrite = TRUE, quiet = FALSE)
## S4 method for signature 'atomic,character'
export(
object,
con,
append = FALSE,
overwrite = TRUE,
engine = c("base", "data.table", "readr"),
quiet = FALSE
)
## S4 method for signature 'data.frame,character'
export(
object,
con,
rownames = TRUE,
colnames = TRUE,
quote = TRUE,
overwrite = TRUE,
engine = c("base", "data.table", "readr"),
quiet = FALSE
)
## S4 method for signature 'list,character'
export(object, con, overwrite = TRUE, quiet = FALSE)
## S4 method for signature 'matrix,character'
export(
object,
con,
rownames = TRUE,
colnames = TRUE,
quote = TRUE,
overwrite = TRUE,
engine = c("base", "data.table", "readr"),
quiet = FALSE
)
## S4 method for signature 'ANY,missing'
export(object, con, ...)
object |
Object. |
con |
|
rownames |
|
colnames |
|
quote |
|
overwrite |
|
engine |
Currently supported:
|
quiet |
|
append |
|
... |
Additional arguments. |
Invisible character
or list
of file paths.
matrix
supported arguments:
Comma separated values (CSV):
"csv"
, "csv.bz2"
, "csv.gz"
, "csv.xz"
, "csv.zip"
.
Tab separated values (TSV):
"tsv"
, "tsv.bz2"
, "tsv.gz"
, "tsv.xz"
, "tsv.zip"
.
Matrix
(sparseMatrix
) supported arguments:
MatrixMarket exchange (MTX):
"mtx"
, "mtx.bz2"
, "mtx.gz"
, "mtx.xz"
, "mtx.zip"
.
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 readr::write_delim()
by default
for exporting DFrame
, data.frame
, and matrix
class objects.
Updated 2023-11-08.
Packages:
rio.
Export functions:
BiocIO::export()
.
data.table::fwrite()
.
readr::write_delim()
.
rio::export()
.
rtracklayer::export()
.
vroom::vroom_write()
.
counts <- matrix(data = seq_len(100L), nrow = 10)
export(object = counts, con = "counts.csv")
## Clean up.
file.remove("counts.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.