Hi, I have a matrix [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 3 1 1 3 1 1 2 3 2 [2,] 1 3 1 2 1 1 1 2 2 1 [3,] 1 2 2 3 2 1 1 1 2 1 [4,] 3 2 1 1 1 3 1 2 1 2 [5,] 1 1 2 2 1 1 3 1 1 2 and want to determine how many times 1s, 2s, and 3s occur per each row. I tried using 'table', but end up with frequencies for the whole matrix. Thanks in advance for your help
-- View this message in context: http://r.789695.n4.nabble.com/determine-frequencies-in-a-matrix-by-row-tp3581733p3581733.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.