avgFacLvls: Average Levels of a Factor in a Data Matrix
Description
avgFacLvls takes a matrix and calculates the column means for each level of each factor given. It then replaces the original matrix rows with the means corresponding to the factor/level memership of a particular sample (row).
Usage
avgFacLvls(matrix, fac)
Arguments
Value
A matrix whose rows are composed of the column means for each level of the factor.