Learn R Programming

biganalytics (version 1.1.22)

bigglm.big.matrix: Use Thomas Lumley's ``biglm'' package with a ``big.matrix''

Description

This is a wrapper to Thomas Lumley's biglm package, allowing it to be used with massive data stored in big.matrix objects.

Usage

bigglm.big.matrix(
  formula,
  data,
  chunksize = NULL,
  ...,
  fc = NULL,
  getNextChunkFunc = NULL
)

biglm.big.matrix( formula, data, chunksize = NULL, ..., fc = NULL, getNextChunkFunc = NULL )

Value

an object of class biglm

Arguments

formula

a model formula.

data

a big.matrix.

chunksize

an integer maximum size of chunks of data to process iteratively.

fc

either column indices or names of variables that are factors.

...

options associated with the biglm

getNextChunkFunc

a function which retrieves chunk data

Examples

Run this code
if (FALSE) {
library(bigmemory)
x <- matrix(unlist(iris), ncol=5)
colnames(x) <- names(iris)
x <- as.big.matrix(x)
head(x)

silly.biglm <- biglm.big.matrix(Sepal.Length ~ Sepal.Width + Species,
                                data=x, fc="Species")
summary(silly.biglm)

y <- data.frame(x[,])
y$Species <- as.factor(y$Species)
head(y)

silly.lm <- lm(Sepal.Length ~ Sepal.Width + Species, data=y)
summary(silly.lm)
}

Run the code above in your browser using DataLab