vectorToDiagonalMatrix: Convert a numeric vector/list into a diagonal matrix. If the...

Description Usage Arguments Value

View source: R/utilities.R

Description

Convert a numeric vector/list into a diagonal matrix. If the vector/list is named, names will be used as the column and row names of the resulting diagonal matrix.

Usage

1

Arguments

vector

a numeric vector/list

Value

a diagonal matrix


tdmore-dev/tdmore documentation built on Nov. 15, 2018, 9:45 p.m.