Read big data or a big.matrix object.
big_read(big_path, header = TRUE, sep = ",")
The path (including the name) where the big.matrix object is.
If there are column names, then this should be TRUE.
A field delimiter, for example ";" or "," (comma separated). See also read.csv
for more information.
An Filebacked Big Matrix (FBM) matrix.
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 an 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.
# NOT RUN {
dataset <- matrix( runif(100 * 50, 1, 100), ncol = 50 )
read.csv(data, "dataset.csv", sep = ",")
a <- big_read("dataset.csv", header = TRUE)
# }
Run the code above in your browser using DataLab