write.data: Create text data files using convenient defaults

Description Usage Arguments Details Examples

Description

Several presets are provided for creating text data files. Functions are based on write.table, with some predefined extras to save time when writing data sets to clear text files

Usage

1
write.tab(data, filename, sep="\t", quote=FALSE, row.names=FALSE, ...)

Arguments

data

name of object to be saved

filename

File name

sep

Column separator, see details

quote

Should text data be quoted? Default FALSE

row.names

Whether rownames whould be included in output, default=FALSE

...

Further arguments passed on to write.table()

Details

Both of the named functions just use the filename as 2nd positional argument and call write.table(). Difference between both is that write.tab has predefined the column separator as "\t", while write.space uses the write.table default " ".

Examples

1
2
3
4
5
    ## Not run: 
        write.tab(iris,"~/iris_tab.txt")
        write.space(iris,"~/iris_space.txt")
    
## End(Not run)

preputils documentation built on July 1, 2020, 5:35 p.m.