Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fread2

Read text file(s)


Description

Read text file(s)

Usage

fread2(input, ..., data.table = FALSE,
  nThread = getOption("bigreadr.nThread"))

Arguments

input

Path to the file(s) that you want to read from. This can also be a command, some text or an URL. If a vector of inputs is provided, resulting data frames are appended.

...

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

data.table

Whether to return a data.table or just a data.frame? Default is FALSE (and is the opposite of data.table::fread).

nThread

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

Value

A data.frame by default; a data.table when data.table = TRUE.

Examples

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

bigreadr

Read Large Text Files

v0.2.4
GPL-3
Authors
Florian Privé [aut, cre]
Initial release
2021-04-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.