I have a matrix say:

23   1
12  12
0    0
0   1
0   1
0   2
23  2

I want to count of number of distinct rows and the number of disinct element
in the second column and put these counts in a column. SO at the end of the
day I should have:

c(1, 1, 1, 2, 2, 1, 1) for the distinct rows and c(1, 1, 1, 2, 2, 2, 2) for
the counts of how many times the elements in the second column exists. Any
help is greatly appreciated.

-- 
Thanks,
Jim.

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to