Le vendredi 03 février 2012 à 18:51 +0000, William Dunlap a écrit : > Instead of colSums(t(aMatrix)), why not the more > direct rowSums(aMatrix)? Because I felt it was more didactic. The question was about counting occurrences per column, so using rowSums() could be a little confusing without an explanation.
Of course, your solution is faster and cleaner. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.