LinkedMatrix is an R package that provides matrices implemented as lists of matrix-like nodes, linked by columns or rows.
This package is deliberately kept simple. For computational methods that use LinkedMatrix check out the BGData package.
The following code generates three different matrix-like objects and links them together by rows in a
LinkedMatrix instance can then be treated like any other regular matrix.
library(LinkedMatrix) m1 <- ff::ff(initdata = rnorm(50), dim = c(5, 10)) m2 <- bigmemory::big.matrix(init = rnorm(50), nrow = 5, ncol = 10) m3 <- matrix(data = rnorm(50), nrow = 5, ncol = 10) m <- RowLinkedMatrix(m1, m2, m3) dim(m) m[1, ] m[, 1]
Install the stable version from CRAN:
Alternatively, install the development version from GitHub:
# install.packages("remotes") remotes::install_github("QuantGen/LinkedMatrix")
Further documentation can be found on RDocumentation.