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

Try the PopED package in your browser

Any scripts or data that you put into this service are public.

PopED documentation built on May 21, 2021, 5:08 p.m.