Learn R Programming

bread (version 0.4.1)

bnrow: Count the number of rows of a big file without loading it in memory

Description

Counts the number of rows using data.table::fread() and the 'wc' Unix command. This allows analyzing big files that would not fit in memory (and cause an error such as 'cannot allocate vector of size').

Usage

bnrow(file = NULL)

Value

A numeric

Arguments

file

String. Name or full path to a file compatible with data.table::fread()

Examples

Run this code
file <- system.file('extdata', 'test.csv', package = 'bread')
## Counting rows (almost like the band)
bnrow(file = file)

Run the code above in your browser using DataLab