powered by
tr(x)
vech
rvectorize
cvectorize
tr(matrix(1:9, 3, 3)) tr(matrix(1:12, 3, 4))
Run the code above in your browser using DataLab