diagonal: Diagonal matrix from a vector

View source: R/diagonal.R

diagonalR Documentation

Diagonal matrix from a vector

Description

Creates a diagonal matrix from a vector

Usage

diagonal(d)

Arguments

d

A numerical vector

Value

A diagonal matrix wirh the values of vector in the diagonal a zeros elsewhere

Author(s)

Jose Luis Vicente Villardon

Examples

diag(c(1, 2, 3, 4, 5))

MultBiplotR documentation built on Nov. 21, 2023, 5:08 p.m.