Compute for each row the average value by provided annotation

average_by_cluster(mat, annotation)

Arguments

mat

Numeric/sparse matrix (cells as columns)

annotation

Vector containg cell annotation

Value

Numeric/sparse matrix.