change to colMeans in tdgsa