Dear R community
I have a problem regarding which of the column in a matrix contains all of zero elements. e.g.
x=c(3,3,3,3,0,0,0,0,5,5,5,5,8,8,8,8); x=matrix(x, nrow=4)
the output is
> x
     [,1] [,2] [,3] [,4]
[1,]    3    0    5    8
[2,]    3    0    5    8
[3,]    3    0    5    8
[4,]    3    0    5    8
In this case the required column is second so the result should be "2". How can i get it? 

 
best regards

Muhammad Azam 



      
	[[alternative HTML version deleted]]

