insertRow: Insert Row into a Matrix

insertRowR Documentation

Insert Row into a Matrix

Description

Insert Row into a Matrix

Usage

insertRow(m, r, v = NA, rName = "")

Arguments

m

(Required). a matrix.

r

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

v

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

rName

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

Value

a matrix with one more row 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)
insertRow(m, 2, 5:6)

## End(Not run)


HuaZou/MicrobiomeAnalysis documentation built on Dec. 12, 2023, 10:37 a.m.