write.delim: Write a data.frame

write.delimR Documentation

Write a data.frame

Description

Write a simple data.frame into a text file with header, no row.names, fields separated by tab.

Usage

write.delim(x, file = "", row.names = FALSE, quote = FALSE, sep = "\t", ...)

Arguments

x

a data.frame

file

a character string for file name

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

quote

a logical value 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 the 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.

...

additional arguments accepted by write.table

Details

Simple wrapper of write.table.

Value

A tab delimited text file.

See Also

write.table

Examples

 data(preybiom)
 write.delim(preybiom[1:10,]) # output to the console
 
## Not run: 
 write.delim(preybiom[1:10,],file="Myfile.txt") # write a file in the working directory

## End(Not run)
 

pgirmess documentation built on April 8, 2023, 1:12 a.m.