Given a matrix and a certain column index, how can I find all columns equal to that column (or at most t columns vectors equal to that column).
For example:
m=matrix(data=c(2,2,2,2,3,0,2,2), ncol = 4)
equal columns are 1 & 2 & 4
If column index=1 I can retrieve 2 & 4
If t=1 I will get just the second column 2 or the 4-th column .