write.delim: Write a matrix-like object as a tab-delimited txt file.

Description Usage Arguments Details Value Author(s) See Also

Description

This method writes tab delimited files and offers enhanced control over the writing of a row.names column.

Usage

1
2
write.delim(x, file, na = "---", row.names = FALSE, col.names = TRUE,
  append = FALSE, ...)

Arguments

x

a matrix or data.frame

file

The file name (including path) which will be created. It will be over-written without warning.

na

What to replace NA's with. Sensible options include “—” (the default), “”, or “-”.

row.names

either TRUE, FALSE, NULL, NA, or a character(1). See Details.

col.names

logical: If TRUE then write out the column names.

append

logical: if TRUE, then append to end, else overwrite the file.

...

Further arguments passed to write.table

Details

Writing row names.
Allowable values for row.names are:

TRUE row names are written with a blank column header
FALSE no row names are written
NULL or NA row names are written, with no column header, just like write.table
the name of a column row names will be written, with the column header set to the value of row.names

Note that If x has no row and/or column names, then no row and/or column names
will be written, no matter what the settings for row.names or col.names are.

If you use the default options, then it works nicely with read.delim.

Value

a tab-delimited txt file is written out.

Author(s)

Mark Cowley

See Also

write.table, read.delim


drmjc/mjcbase documentation built on May 15, 2019, 2:27 p.m.