View source: R/utility_functions.R
balanceMatrixSize | R Documentation |
Resamples two matrices to match number of rows in each. Number of rows is matched to minimum or maximum, as specified.
balanceMatrixSize(mat.1, mat.2, method = "match.max")
mat.1 |
First input matrix. |
mat.2 |
Second input matrix. |
method |
Character specifying which matching method to use. Must be one of "match.max" (default) or "match.min". For either option, matrix with min/max number of rows is resamples to match the other matrix. |
s.mat |
similarity matrix |
list of resampled matrices.
Nicholas Mikolajewicz
# ensure sample sizes are balanced across groups
output.mat <- balanceMatrixSize(de.orig.1, de.orig.2, method = "match.max")
de.1 <- output.mat[["de.1"]] # resampled mat.1
de.2 <- output.mat[["de.2"]] # resampled mat.2
datExpr.noz <- output.mat[["de.all"]] # concatenated matrices
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.