Learn R Programming

exvatools (version 0.9.0)

diagcs: 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)

Value

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

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

Arguments

df

A matrix with named rows and columns.

Examples

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

Run the code above in your browser using DataLab