https://github.com/cran/pracma
Tip revision: 162b33221cccd2760e0dd44598539c521ffcd73b authored by HwB on 18 March 2011, 00:00:00 UTC
version 0.2-2
version 0.2-2
Tip revision: 162b332
mdiag.R
##
## m t r a c e . R Test suite
##
mdiag <- pracma::mdiag
identical(mdiag(matrix(1:12,3,4), 1), c(4,8,12))
identical(mdiag(matrix(1:12,3,4), -1), c(2,6))
identical(mdiag(mdiag(c(1,5,9)), 0), c(1,5,9))