Learn R Programming

bigmemory (version 3.6)

bigmemory-package: bigmemory: massive matrices in (possibly shared) memory.

Description

bigmemory implements massive matricies in C++ and supports their basic manipulation and exploration. Access to and manipulation of a big.matrix object is exposed in R by an S4 class whose interface is simlar to an R matrix.

Arguments

Details

ll{ Package: bigmemory Type: Package Version: 3.6 Date: 2009-04-27 License: LGPL-3 } Multi-gigabyte data sets challenge and frustrate R users even on well-equipped hardware. C/C++ and Fortran programming can be helpful, but are cumbersome for interactive data analysis and lack the flexibility and power of R's rich statistical programming environment. The package bigmemory bridges this gap, implementing massive matrices and supporting their basic manipulation and exploration. It is ideal for problems involving the analysis in R of manageable subsets of the data, or when an analysis is conducted mostly in C++. The data structures may be allocated to shared memory with transparent read and write locking, allowing separate processes on the same computer to share access to a single copy of the data set. The data structures may also be file-backed, allowing users to more easily manage and analyze data sets larger than available RAM. These features of bigmemory open the door for powerful and memory-efficient parallel analyses and data mining of massive data sets. Note that options(bigmemory.typecast.warning) is available and can be set to avoid annoying warnings that might occur if, for example you assign R objects (typically type double) to char, short, or integer big.matrix objects.

References

See http://www.stat.yale.edu/~jay/bigmemory.

See Also

For example, big.matrix, mwhich, colmean, biglm

Examples

Run this code
# Our examples are all trivial in size, rather than burning huge amounts
# of memory simply to demonstrate the package functionality.

x <- big.matrix(5, 2, type="integer", init=0)
colnames(x)=c("alpha", "beta")
x
x[,]
x[,1] <- 1:5
x[,]
mean(x)
colmean(x)
summary(x)

Run the code above in your browser using DataLab