[R] Counter

amor Gandhi
Thu, 23 Jul 2009 10:44:16 -0000

Hi everyone,

Is there any counter function in R for the following purpose:
x <- matrix(c(1,1,0,2,1,0,0,2,0,1,2,1,2,1,0,1),nrow=4)
As I would like to know how many zeros, ones, and twos in each row of x?

Many thank in advance,
Amor





	[[alternative HTML version deleted]]