Description Usage Arguments Value Examples
Restores unmappable regions (all zeros columns and rows) in dense matrix.
1 2 3 4 5 6 | restore_unmappable_mtx(
dense.mtx.mappable,
idx.rows,
idx.cols = NULL,
empty.elem = NA
)
|
dense.mtx.mappable |
numeric matrix |
idx.rows |
integer vector, row indices of 0's elements in initial matrix (before rows removal) - the one which is to be restored |
idx.cols |
integer vector, column indices of 0's elements in initial matrix (before columns removal) - the one which is to be restored, by default it is equal to idx.rows |
empty.elem |
numeric or NA how to fill missing (restored) cells |
numeric matrix in dense format
1 2 3 4 5 | # construct matrix with 0's row 5,7,8 and 0's columns 2,4
m <- matrix(1:32, ncol = 4); m[c(5,7,8),] <- 0; m[,c(2,4)] <- 0
l <- remove_unmappable(mtx)
restore_unmappable_mtx(l[["matrix"]], l[["indices.rows"]], idx.cols = l[["indices.cols"]])
restore_unmappable_mtx(l[["matrix"]], l[["indices.rows"]], idx.cols = l[["indices.cols"]], empty.elem = 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.