matLog2 | R Documentation |
This avoids the creation of a dense intermediate matrix when operating on sparse matrices
matLog2(spmat, scale = FALSE, scaleFactor = 1e+06)
spmat |
sparse Matrix |
scale |
boolean - whether or not to scale the columns to sum to 'scale_factor' |
scaleFactor |
if scale = TRUE, columns are scaled to sum to this number |
Either performs result <- log2(spmat+1) or if scale = TRUE returns result <- log2(spmat/colSums(spmat)*scaleFactor + 1)
logmat sparse Matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.