How do I get the number of actual response patterns in my matrix in R for all the variables? An example would be I have a dataset made of 3 variables a, b, c and three observations.
a<-c(0,1,0)
b<-c(1,0,1)
c<-c(1,0,1)
d<-cbind(a,b,c)
resulting in the matrix
d
which if I'm not wrong has two response patterns: 0,1,1 present in two observations and 1,0,0 present in one observation. Is there a function that can tell me that if I need to calculate this in a much bigger dataset?
Thanks