diagcs: Diagonalize the sums of columns of a matrix

View source: R/matrix_mult.R View source: R/matrix_sum.R

diagcsR Documentation

Diagonalize the sums of columns of a matrix

Description

Makes a diagonal matrix with the sums of columns of a matrix.

Diagonalizes the sums of each column of a matrix.

Usage

diagcs(df)

diagcs(df)

Arguments

df

A matrix with named rows and columns.

Value

A diagonal matrix with the sums of columns in the diagonal.

A diagonal matrix with the sums of columns in the diagonal.

Examples

wio <- make_wio("wiodtest")
diagcs(wio$W %*% wio$Bd)
wio <- make_wio("wiodtest")
diagcs(wio$W %*% wio$Bd)

exvatools documentation built on Sept. 17, 2024, 1:07 a.m.