ColumnLinkedMatrix: Create a LinkedMatrix Object

Description Usage Arguments Details Value See Also Examples

Description

This function constructs a new ColumnLinkedMatrix or RowLinkedMatrix object from a list of matrix-like objects.

Usage

1
2
3

Arguments

...

A sequence of matrix-like objects of the same row-dimension (for ColumnLinkedMatrix) or column-dimension (for RowLinkedMatrix).

Details

A matrix-like object is one that has two dimensions and implements at least dim and [. Each object needs to have the same number of rows (for ColumnLinkedMatrix) or columns (for RowLinkedMatrix) to be linked together. If no matrix-like objects are given, a single 1x1 node of type matrix filled with NA is returned. LinkedMatrix objects can be nested as long as they are conformable.

Value

Either a ColumnLinkedMatrix or a RowLinkedMatrix object.

See Also

LinkedMatrix to create an empty, prespecified LinkedMatrix object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Create various matrix-like objects that correspond in dimensions
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)

# Create a ColumnLinkedMatrix object
cm <- ColumnLinkedMatrix(m1, m2, m3)

# To specify the matrix-like objects as a list, use the `do.call` function
rm <- do.call(RowLinkedMatrix, list(m1, m2, m3))

LinkedMatrix documentation built on July 8, 2020, 5:53 p.m.