read.big.data: Read big data or a big.matrix object

View source: R/read.big.data.R

Read big data or a big.matrix objectR Documentation

Read big data or a big.matrix object

Description

Read big data or a big.matrix object.

Usage

read.big.data(path, sep = ",", header = FALSE)

Arguments

path

The path where the big.matrix object is.

sep

A field delimiter, for example " " (tab separated) or "," (comma separated).

header

If there are column names, then this should be TRUE.

Details

The data (matrix) which will be read and compressed into a big.matrix object must be of type "numeric". We tested it and it works with "integer" as well. But, in general, bear in mind that only matrices will be read. We have not tested with data.frame for example. Woever, 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 object size is alwasy 696 bytes!

Value

A big.matrix object.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr. For more information see the "bigmemory" package.

See Also

big.gomp

Examples

## Not run: 
dataset <- matrix( runif(100 * 50, 1, 100), ncol = 50 )
write.csv(dataset, "dataset.csv", sep = ",")
a <- read.big.data("dataset.csv", header = TRUE)

## End(Not run)

MXM documentation built on Aug. 25, 2022, 9:05 a.m.