Skip to content
Prev 237280 / 398500 Next

Counting unique items in a list of matrices

I may or may not have the most elegant solution to this problem, but if it
were me, I would probably put them all in a list and then   

unique_matrix_list <- unique(list_of_matrix)

# number of unique matricies: 
length(unique_matrix_list) 

# count the number of each matrix, 
for (m in unique_matrix_list) {
count_m <- which(list_of_matrix == m) 
}

but, i havent done this myself. 

see 

?unique  

and maybe that'll help.