fwrite2: Write a data frame to a text file

Description Usage Arguments Value Examples

View source: R/read.R

Description

Write a data frame to a text file

Usage

1
2
fwrite2(x, file = tempfile(), ..., quote = FALSE,
  nThread = getOption("bigreadr.nThread"))

Arguments

x

Data frame to write.

file

Path to the file that you want to write to. Defaults uses tempfile().

...

Other arguments to be passed to data.table::fwrite.

quote

Whether to quote strings (default is FALSE).

nThread

Number of threads to use. Default uses all threads minus one.

Value

Input parameter file, invisibly.

Examples

1
2
3
tmp <- fwrite2(iris)
iris2 <- fread2(tmp)
all.equal(iris2, iris)  ## fread doesn't use factors

Example output

[1] "Component \"Species\": Modes: character, numeric"                      
[2] "Component \"Species\": Attributes: < target is NULL, current is list >"
[3] "Component \"Species\": target is character, current is factor"         

bigreadr documentation built on Oct. 30, 2019, 12:12 p.m.