
Aggregate a values matrix through a neighbor-weight matrix
Source:R/ComputeSEAbundanceBySN.R
aggregateByWeights.RdAggregate a values matrix through a neighbor-weight matrix
Arguments
- cell2se
matrix/data.frame, rows = source units (must align with `colnames(weights)`), columns = features (e.g. SE levels).
- weights
sparse matrix, typically from `buildKNNWeights()`.
- sum2one
if `TRUE`, normalize each output row to sum to 1 after aggregation.
- min.cells
minimum number of source units (nonzero weight entries) an output unit must have to be kept in the result.