balanceMatrixSize.Rd
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")
First input matrix.
Second input matrix.
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.
similarity matrix
list of resampled matrices.
# ensure sample sizes are balanced across groups
output.mat <- balanceMatrixSize(de.orig.1, de.orig.2, method = "match.max")
#> Error in nrow(mat.1): object 'de.orig.1' not found
de.1 <- output.mat[["de.1"]] # resampled mat.1
#> Error in eval(expr, envir, enclos): object 'output.mat' not found
de.2 <- output.mat[["de.2"]] # resampled mat.2
#> Error in eval(expr, envir, enclos): object 'output.mat' not found
datExpr.noz <- output.mat[["de.all"]] # concatenated matrices
#> Error in eval(expr, envir, enclos): object 'output.mat' not found