insertCol: Insert Row into a Matrix

insertColR Documentation

Insert Row into a Matrix

Description

Insert Row into a Matrix

Usage

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

Arguments

m

(Required). a matrix.

c

(Required). numeric. column number where the new column should be inserted.

v

(optional). numeric. values for the new column.

cName

(optional). character. the name of the new column.

Value

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

Author(s)

Created by Hua Zou (5/19/2022 Shenzhen China)

References

https://github.com/cran/miscTools/

Examples


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

## End(Not run)


HuaZou/MicrobiomeAnalysis documentation built on May 13, 2024, 11:10 a.m.