AssignDiag: A way to assign the diagonals of a matrix that can handle...

Description Usage

Description

A way to assign the diagonals of a matrix that can handle input having no dimensions. Ordinarily, x is square matrix and newdiag is a vector equal in length to x's diagonal.

A new x is returned having the newdiag on its diagonal. In that usage, it matches the assign option for R's function diag.

This improves diag by handling x with no dimensions, ie a scalar, or just one dimension. Then newdiag is simply returned.

Usage

1
AssignDiag(x, newdiag)

forestgeo/ctfs documentation built on May 3, 2019, 6:44 p.m.