type count 0 20 1 15 0 10 1 35 0 28 I would like to create two vectors from the data above. For example, type1=c(15, 35) and type0 = c(20, 10, 28). Can any one help Raphael