dot-TsvWrite: Fast write.table/textConnection substitute

.TsvWriteR Documentation

Fast write.table/textConnection substitute

Description

Conversions are vectorized and the entire output is buffered in memory and written in one shot. Great option for replacing writing to a textConnection (much much faster). Not such a great option for writing to files, marginal difference from write.table and obviously much greater memory use. This works for TSV or any character- delimited format which doesn't require quoting, as long as the delimiter doesn't appear in the data.

Usage

.TsvWrite(x, file = stdout(), sep = "\t", sprintf_template = NULL)

Arguments

x

a data frame

file

a connection or .Primitive("return") to return character output directly (fast)

sep

column separator

sprintf_template

optional sprintf-style template to print a row, e.g. "%s,%s,%s"

Value

Use for the side effect of writing to the connection returning NULL, or return a character value when file=return.


Paradigm4/SciDBR documentation built on Nov. 9, 2023, 4:58 a.m.