dbind: Bind matrices diagonally

View source: R/dbind.R

dbindR Documentation

Bind matrices diagonally

Description

Bind matrices diagonally

Usage

dbind(..., .fill = NULL)

Arguments

...

Matrices.

.fill

Value to fill the off-"diagonal" values. If NULL, the value is the default value of the inputs' mode.

Examples


M1 <- matrix(1:8, 2, 4)
M2 <- matrix(9:14, 2, 3)
dbind(M1, M2)
dbind(M1, M2, .fill = NA)


M1 <- matrix(letters[1:4], 2, 2)
M2 <- matrix(LETTERS[5:10], 3, 2)
dbind(M1, M2)
dbind(M1, M2, .fill = "Banana")


M1 <- matrix(TRUE, 2, 3)
M2 <- matrix(NA, 3, 4)
dbind(M1, M2)


mattansb/MSBMisc documentation built on March 22, 2023, 6:02 p.m.