Skip to Content

writeColumnsToFiles.TabularTextFile {R.filesets}

Read each column from a data file and exports it to a separate file
Package: 
R.filesets
Version: 
1.1.5

Description

Read each column from a data file and exports it to a separate file. Since each column is processed independently of the others, this method is memory efficient and can handle very large data files.

Usage

 
## S3 method for class 'TabularTextFile':
writeColumnsToFiles((this, destPath, filenameFmt="%s.txt", tags=NULL, columnName=NULL, header=NULL, ..., verbose=FALSE))

Arguments

destPath
The output directory where to write the files.
filenameFmt
An sprintf() format string used to generate filenames given the fullnames (column names plus tags).
tags
An optional character vector of tags added to the fullnames.
columnName
...
header
An optional file header.
...
Not used.
verbose
See Verbose.

Details

Each file generated is written atomically by first writing to a temporary file which is then renamed if successfully written. This minimizes the risk for creating incomplete files, which otherwise may occur if for instance an interrupt occured.

Values

Returns (invisibly) a character vector of all output files.

See Also

For more information see TabularTextFile.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

Documentation reproduced from package R.filesets, version 1.1.5. License: LGPL (>= 2.1)