bcolnames {bread} | R Documentation |
Retrieve the column names directly from a big file without loading it in memory
Description
Simply reads the first line of a file with data.table::fread and the head 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
bcolnames(file = NULL, ...)
Arguments
file |
String. Name or full path to a file compatible with data.table::fread() |
... |
Arguments that must be passed to data.table::fread() like 'sep'. |
Value
A character vector
Examples
file <- system.file('extdata', 'test.csv', package = 'bread')
## Retrieving the column names
bcolnames(file = file)
[Package bread version 0.4.1 Index]