A faster version of base::diag()
(on larger matrices).
Diag(inMatrix)
inMatrix | The input matrix |
---|
A vector
http://stackoverflow.com/a/20489737/1270695
Ananda Mahto
#> [1] -0.626453811 0.389843236 0.074564983 -0.053805041 -0.688755695 #> [6] 1.980399899 -1.804958629 0.001105352 0.370018810 -0.473400636diag(m)#> [1] -0.626453811 0.389843236 0.074564983 -0.053805041 -0.688755695 #> [6] 1.980399899 -1.804958629 0.001105352 0.370018810 -0.473400636