Just to confirm,
this one worked for me

 as.data.frame(table(temp[]))
   Var1 Freq
1     1   11
2     2   29
3     3   29
4     4   29
5     5   29
6     6   29
7     7   29
8     8   29
9     9   29
10   10   29
11   11   29
12   12   29
13   13   29
14   14   29
15   15   29
16   16   29
17   17   29
18   18   30
19   19   29
20   20   29



Best Regards
Alex





________________________________
From: Jorge Ivan Velez <jorgeivanvelez@gmail.com>

Cc: Rhelp <r-help@r-project.org>
Sent: Fri, September 17, 2010 4:24:59 PM
Subject: Re: [R] count frequency

Alaios,

Try 


as.data.frame(table(x[,1], x[,2))

where x is your matrix.

HTH,
Jorge

 


On Fri, Sep 17, 2010 at 8:19 AM, Alaios <> wrote:

Hello everyone,
>please consider the following lines of a matrix
>
>
>[574,]   59   32
>[575,]   59   32
>[576,]   59   32
>[577,]   59   32
>[578,]   59   32
>[579,]   59   32
>[580,]   59   32
>[581,]   60   32
>[582,]   60   33
>[583,]   60   33
>[584,]   60   33
>[585,]   60   33
>[586,]   60   33
>[587,]   60   33
>[588,]   60   33
>[589,]   60   33
>[590,]   60   33
>[591,]   61   33
>[592,]   61   33
>[593,]   61   33
>[594,]   61   33
>[595,]   61   33
>[596,]   61   33
>[597,]   61   33
>[598,]   61   33
>[599,]   61   33
>[600,]   61   33
>[601,]   62   34
>
>Is it possible somehow to count the similarities between the first and second
>column and put them on a third column like this?
>
>59 32 3
>60 33 5
>62 34 1
>
>where (3,5,1 are the frequencies for (59,32), (60,33) and (62,34)
>
>Best Regards
>Alex
>
>
>
>
>       [[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.
>



      
	[[alternative HTML version deleted]]

