add_row: add_col

Description Usage Arguments Value

Description

Function that adds new rows into a matrix/vector (depending the case). It works simulating the behavior of a matrix in Matlab. Everytime you want to add a row or a full matrix in an out of bounds index, automatically is created with the row given. It internally calls the add_col function to do this.

Usage

1
add_row(original, index, new_object)

Arguments

original

Initial variable where the final matrix will be stored, it can be already matrix.

new_object

Row or matrix to be inserted in the original one.

row_index

Numeric index representing the row where the new line should be inserted.

Value

The matrix with the changes done after the function was run.


jhoffjann/nmmso.R documentation built on May 19, 2019, 9:26 a.m.