ldiag: Left (i.e., pre) Multiply a matrix by a diagonal matrix

View source: R/rldiag.R

ldiagR Documentation

Left (i.e., pre) Multiply a matrix by a diagonal matrix

Description

ldiag: Left (i.e., pre) Multiply a matrix by a diagonal matrix (with only the diagonal elements being given).

Usage

ldiag(y, X)

Arguments

y

a I element vector (of the diagonal elements of an I by I matrix)

X

an I by J matrix.

Value

an I by J matrix equal to diag(y)

Author(s)

Hervé Abdi

See Also

rdiag


DistatisR documentation built on Dec. 5, 2022, 9:05 a.m.