Learn R Programming

bread (version 0.4.1)

bmeta: Helper function generating nrow and colnames for the target file without loading it in memory

Description

Generates a list that can be passed to the bfile_split() function in order to indicate the number of rows and the name of columns in the file. The output can be saved in a variable and provided in the meta_output argument to save time. Counting rows in very large files can take some time.

Usage

bmeta(file = NULL, ...)

Value

A list of 2

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'.

Examples

Run this code
file <- system.file('extdata', 'test.csv', package = 'bread')
## Filtering on 2 columns, using regex.
meta_output <- bmeta(file = file)

Run the code above in your browser using DataLab