rnb.write.table: rnb.write.table

Description Usage Arguments Value Author(s) See Also Examples

View source: R/utilities.R

Description

Writes a table to a file. Different formats and compression options are available.

Usage

1
rnb.write.table(tt, fname, fpath = "", format = "csv", gz = FALSE, ...)

Arguments

tt

Table to be written to file, usually in the form of a matrix or data.frame.

fname

Target file name. If this file already exists, it will be overwritten.

fpath

Target file path. If "" (default value), fname is assumed to contain the absolute path.

format

Target format; one of "csv", "tab" or "txt", denoting comma-separated, tab-separated and default text format, respectively. The last format allows for a user-specified delimiter through an additional parameter sep. See the documentation of write.table for more details.

gz

Flag indicating whether the file should be zipped in gz format.

...

Any additional arguments to be passed on to write.table or utils::write.csv.

Value

The (possibly updated) target file name, invisibly. If gz is TRUE, the string ".gz" will be appended to fname.

Author(s)

Fabian Mueller

See Also

write.table

Examples

1
2
data(mtcars)
rnb.write.table(mtcars,tempfile(pattern="cars",fileext=".csv"))

RnBeads documentation built on March 3, 2021, 2 a.m.