tests/testthat/examples_fcn_doc/examples_diag_matlab.R

diag_matlab(3)
diag_matlab(c(1,2,3))
diag_matlab(cbind(1,2,3))
diag_matlab(rbind(1,2,3))

diag_matlab(matrix(c(1, 2, 3),6,6))

# here is where the R default does something different
diag(cbind(1,2,3))
diag(rbind(1,2,3))
andrewhooker/PopED documentation built on Nov. 23, 2023, 1:37 a.m.