grow.matrix: Grow Matrix

Description Usage Arguments Examples

Description

Extend the rows and columns of a matrix by a value.

Usage

1
grow.matrix(x, data = NA, nrow = 1, ncol = nrow)

Arguments

x

Matrix.

data

Value to insert into new elements.

nrow

Integer. Number of rows to add.

ncol

Integer. Number of columns to add.

Examples

1
2
3
4
mat <- matrix(seq(16), nrow=4)
grow.matrix(mat, nrow=2)
grow.matrix(mat, 0, nrow=4, ncol=2)
grow.matrix(mat, -1, nrow=0, ncol=2)

couthcommander/coleR documentation built on May 13, 2019, 10:53 p.m.