Subj : any function to handle this kind of counting? To : comp.programming From : Ross Date : Sat Jul 30 2005 12:30 am Dear all, i have generated a 2000 X 1 vector, e.g. 1 3 2 1 1 3 2 1 1 4 .... and this vector indeed has a corresponding vector, e.g. A A A A C C E E .... and then i want to count, say, for "1", there are two A's, one E, ... it seems that a for loop can do the job but as we don't know how many instances there are, i.e. don't know A, C, E and then what will occur in this corresponding vector, is there any function which is devoted to handle this kind of counting problem? thx!! .