
Generate sparse data from an upper triangle
rs_upper_triangle_to_sparse.Rd
This function takes the values from an upper triangle matrix, the shift
and the nrows/ncols and returns the full symmetric matrix as a compressed
sparse list.
Arguments
- value
Numeric vector. The upper triangle values.
- shift
Boolean. Was the matrix shifted up (
FALSE= diagonal included;TRUE= diagonal not included).- n
Integer. The number of columns/rows in the symmetric matrix.
- cs_type
String. One of
c("csr", "csc"). Which type of list to return. Other values raise an error.