cbind-methods: Bind DelayedArray objects along their rows or columns

Description Details See Also Examples

Description

Methods for binding DelayedArray objects along their rows or columns.

Details

rbind, cbind, arbind, acbind methods are defined for DelayedArray objects. They perform delayed binding along the rows (rbind and arbind) or columns (cbind and acbind) of the objects passed to them.

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## ---------------------------------------------------------------------
## rbind/cbind
## ---------------------------------------------------------------------
library(HDF5Array)
toy_h5 <- system.file("extdata", "toy.h5", package="HDF5Array")
h5ls(toy_h5)

M1 <- HDF5Array(toy_h5, "M1")
M2 <- HDF5Array(toy_h5, "M2")

M <- rbind(M1, t(M2))
M
colMeans(M)

## ---------------------------------------------------------------------
## arbind/acbind
## ---------------------------------------------------------------------
a1 <- array(1:60, c(3, 5, 4),
            dimnames=list(NULL, paste0("M1y", 1:5), NULL))
a2 <- array(101:240, c(7, 5, 4),
            dimnames=list(paste0("M2x", 1:7), paste0("M2y", 1:5), NULL))
a3 <- array(10001:10100, c(5, 5, 4),
            dimnames=list(paste0("M3x", 1:5), NULL, paste0("M3z", 1:4)))

A1 <- DelayedArray(a1)
A2 <- DelayedArray(a2)
A3 <- DelayedArray(a3)
A <- arbind(A1, A2, A3)
A

## Sanity check:
stopifnot(identical(arbind(a1, a2, a3), as.array(A)))

Bioconductor-mirror/DelayedArray documentation built on Aug. 17, 2017, 3:43 p.m.