insert_row: Generic function to insert a row into a matrix.

Description Usage Arguments Value Examples

View source: R/insert_row.R

Description

Generic function to insert a row into a matrix.

Usage

1
insert_row(mat, row_num, vec)

Arguments

mat

matrix into which row should be inserted

row_num

row number for insertion; row currently at that number is pushed down.

vec

vector to be inserted

Value

matrix with the inserted row.

Examples

1
2
x <- matrix(1:9, nrow = 3)
insert_row(x, 2, c(5, 27, 87))

fintzij/BDAepimodel documentation built on Sept. 20, 2020, 1:44 p.m.