powered by
svec takes the upper triangular matrix (including the diagonal) and vectorizes it column-wise.
svec
svec(blk, M, isspx = NULL)
1x2 matrix detailing the type of matrix ("s", "q", "l", "u"), and the size of the matrix
matrix which is to be vectorized
if M is sparse, isspx = 1, 0 otherwise. Default is to assume M is dense.
vector of upper triangular components of x
# NOT RUN { data(Hnearcorr) blk <- matrix(list(),1,2) blk[[1]] <- "s" blk[[2]] <- nrow(Hnearcorr) svec(blk,Hnearcorr) # }
Run the code above in your browser using DataLab