Learn R Programming

scidb (version 3.0.0)

fwrite: 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.

Usage

fwrite(
  x,
  file = stdout(),
  sep = "\t",
  format = paste(rep("%s", ncol(x)), collapse = sep)
)

Arguments

x

a data frame

file

a connection or return to return character output directly (fast)

sep

column separator

format

optional fprint-style column format specifyer

Value

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