bnrow {bread} | R Documentation |
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)
Arguments
file |
String. Name or full path to a file compatible with data.table::fread() |
Value
A numeric
Examples
file <- system.file('extdata', 'test.csv', package = 'bread')
## Counting rows (almost like the band)
bnrow(file = file)
[Package bread version 0.4.1 Index]