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", "integer",
"unsigned short", "unsigned char", "raw"),
backingfile = drop_ext(file), ...)
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"
"integer"
"unsigned short"
: can store integer values from 0 to 65535.
It has vocation to become the basis for a FBM.code65536
class for
accessing strings.
"raw"
or "unsigned char"
: can store integer values from 0 to 255.
It is the basis for the FBM.code256 class for
accessing 256 arbitrary different numeric values.
It is used in package bigsnpr.
Path to the file storing the Big Matrix on disk.
An extension ".bk" will be automatically added.
Default uses file
without its extension.
Arguments passed on to bigreadr::big_fread2
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.
Number of lines to skip at the beginning of file
.
Show progress? Default is FALSE
.
Size of the parts if nb_parts
is not supplied.
Default is 500 * 1024^2
(500 MB).
A Filebacked Big Matrix of type '<type>' with <length(select)> columns.