compress_rows {statnet.common} | R Documentation |
Compress a matrix or a data frame with duplicated rows, updating row weights to reflect frequencies, or reverse the process, reconstructing a matrix like the one compressed (subject to permutation of rows and weights not adding up to an integer).
compress_rows(x, ...) decompress_rows(x, target.nrows = NULL, ...)
x |
a weighted matrix or data frame. |
... |
extra arguments for methods. |
target.nrows |
the approximate number of rows the uncompressed matrix should have; if not achievable exactly while respecting proportionality, a matrix with a slightly different number of rows will be constructed. |
For compress_rows
A weighted matrix or data frame of the same
type with duplicated rows removed and weights updated appropriately.