Read big data or a big.matrix object {pchc} | R Documentation |
Read big data or a big.matrix object
Description
Read big data or a big.matrix object.
Usage
big_read(big_path, select, header = TRUE, sep = ",")
Arguments
big_path |
The path (including the name) where the big.matrix object is. |
select |
Indices of columns to read (sorted). The length of select will be the number of columns of the resulting filebacked Big Matrix. |
header |
If there are column names, then this should be TRUE. |
sep |
A field delimiter, for example ";" or "," (comma separated). See also |
Details
The data (matrix) which will be read and compressed into a big.matrix object must be of type "numeric". I tested it and it works with "integer" as well. But, in general, bear in mind that only matrices will be read. I have not tested with data.frame for example. However, in the help page of "bigmemory" this is mentioned: Any non-numeric entry will be ignored and replaced with NA, so reading something that traditionally would be a data.frame won't cause an error. A warning is issued. In all cases, the big.matrix is turned into a Filebacked Big Matrix (FBM) of type 'double' the object size is alwasy 680 bytes! If the initial dataset has row names these will be ignored and a column with NAs will apear. So check your final FBM matrix. For more information see the "bigmemory" and "bigstatsr" packages.
Value
A Filebacked Big Matrix (FBM) matrix.
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
See Also
big_cor, fedhc.skel, mmhc.skel
Examples
x <- matrix( runif(100 * 5, 1, 100), ncol = 5 )