This routine is a utility routine that does not check the input arguments for proper dimensions and type.
Details
This routine is often used with apply to convert an \(R x (k*k)\) array of covariance MCMC draws to correlations. As in corrdraws = apply(vardraws, 1, nmat).