rnb.write.table {RnBeads} | R Documentation

## rnb.write.table

### Description

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

### Usage

    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

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

[Package RnBeads version 2.0.1 Index]