adding guard against potential error with rowMeans(...)

If users specify that one of the groups contains only a single sample, this will handle such a fringe case without throwing an error.