Read a file as a Filebacked Big Matrix by using package {bigreadr}. For a mini-tutorial, please see this vignette.
big_read(
file,
select,
filter = NULL,
type = c("double", "float", "integer", "unsigned short", "unsigned char", "raw"),
backingfile = drop_ext(file),
...
)
A Filebacked Big Matrix of type type
with length(select)
columns.
File to read.
Indices of columns to read (sorted).
The length of select
will be the number of columns of the resulting FBM.
Vector used to subset the rows of each data frame.
Type of the Filebacked Big Matrix (default is double
). Either
"double"
(double precision -- 64 bits)
"float"
(single precision -- 32 bits)
"integer"
"unsigned short"
: can store integer values from 0 to 65535.
It has vocation to become the basis for a FBM.code65536
.
"raw"
or "unsigned char"
: can store integer values from 0 to 255.
It is the basis for class FBM.code256 in order to
access 256 arbitrary different numeric values.
It is used in package bigsnpr.
Path to the file storing the FBM data on disk.
An extension ".bk" will be automatically added.
Default uses file
without its extension.
Arguments passed on to bigreadr::big_fread2
nb_parts
Number of parts in which to split reading (and transforming).
Parts are referring to blocks of selected columns.
Default uses part_size
to set a good value.
skip
Number of lines to skip at the beginning of file
.
progress
Show progress? Default is FALSE
.
part_size
Size of the parts if nb_parts
is not supplied.
Default is 500 * 1024^2
(500 MB).