Re: [R] help with counting how many times each value occur in each column

2007-08-10 Thread François Pinard
[Gabor Grothendieck] table(col(mat), mat) Clever, simple, and elegant! :-) -- François Pinard http://pinard.progiciels-bpi.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] help with counting how many times each value occur in each column

2007-08-10 Thread Gabor Grothendieck
Try this where we have constructed the example to illustrate that it does handle the case where not all values are in each column: mat - matrix(rep(1:6, each = 4), 6) table(col(mat), mat) On 8/10/07, Tom Cohen [EMAIL PROTECTED] wrote: Dear list, I have the following dataset and want to

Re: [R] help with counting how many times each value occur in each column

2007-08-10 Thread François Pinard
[Tom Cohen] I have the following dataset and want to know how many times each value occur in each column. data [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] -100 -100 -100000000 -100 [2,] -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 [3,]

[R] help with counting how many times each value occur in each column

2007-08-10 Thread Tom Cohen
Dear list, I have the following dataset and want to know how many times each value occur in each column. data [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] -100 -100 -100000000 -100 [2,] -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 [3,]