insertCol: Insert Column into a Matrix

Description Usage Arguments Value Author(s) See Also Examples

View source: R/utils.R

Description

Insert a new column into a matrix.

Usage

1
insertCol( m, c, v = NA, cName = "" )

Arguments

m

matrix.

c

column number where the new column should be inserted.

v

optional values of the new column.

cName

optional character string: the name of the new column.

Value

a matrix with one more column than the provided matrix m.

Author(s)

Arne Henningsen

See Also

insertRow.

Examples

1
2
   m <- matrix( 1:4, 2 )
   insertCol( m, 2, 5:6 )

miscTools documentation built on Dec. 9, 2019, 3 a.m.