[R] unique columns in a matrix and number of each

Salas, Andria Kay aks2515 at uncw.edu
Sat Nov 22 21:42:40 CET 2008


I need help determining the unique columns of a matrix and the numbers of each unique column.  For example, let's say I have a matrix with 6 columns, 2 of these are filled with the value of 1 and the other 4 are filled with the value of 0.  I would then like to have a command that tells me what the unique columns are (so columns with 1s and columns with 0s) and the number of each type of column (so 2 columns of 1s and 4 columns of 0s) that occur in the matrix.  

Thank you for any help anyone can provide!!  I have been very impressed with the help that I have received so far!!  Thank you!  


More information about the R-help mailing list