Return a matrix with elements on a diagonal specified by offset
diagR(x, n, offset = 0)
Arguments
x |
fill diagonal with this value |
n |
matrix size |
offset |
start position of diagonal, default: 0 = main diagonal |
Value
A diagonal matrix with x
on its diagonal
(main or offset diagonal).