write.df: Write a data.frame to file with sensible defaults

Description Usage Arguments See Also

Description

This is simply a wrapper around write.table with the settings I use most often.

Usage

1
2
write.df(x, file = "", quote = FALSE, sep = "\t",
  row.names = FALSE, col.names = TRUE)

Arguments

x

the object to be written, preferably a matrix or data frame. If not, it is attempted to coerce x to a data frame.

file

either a character string naming a file or a connection open for writing. "" indicates output to the console.

quote

a logical value (TRUE or FALSE) or a numeric vector. If TRUE, any character or factor columns will be surrounded by double quotes. If a numeric vector, its elements are taken as the indices of columns to quote. In both cases, row and column names are quoted if they are written. If FALSE, nothing is quoted.

sep

the field separator string. Values within each row of x are separated by this string.

row.names

either a logical value indicating whether the row names of x are to be written along with x, or a character vector of row names to be written.

col.names

either a logical value indicating whether the column names of x are to be written along with x, or a character vector of column names to be written. See the section on ‘CSV files’ for the meaning of col.names = NA.

See Also

utils::write.table


anilchalisey/juggleR documentation built on May 9, 2019, 4 a.m.