Read big data or a big.matrix object {MXM}R 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)

[Package MXM version 1.5.5 Index]