Dear all, let suppose I have following vector:
 
> dat1 <- c(rep("asd", 5), rep("xyz", 12), rep("erd", 17))
> dat1 <- dat1[sample(1:length(dat1), length(dat1), replace=F)]
> dat1
 [1] "erd" "xyz" "erd" "asd" "asd" "erd" "xyz" "asd" "erd" "erd" "asd" "xyz" "erd" "asd" "xyz" "xyz" "erd" "xyz" "erd"
[20] "erd" "erd" "xyz" "xyz" "erd" "erd" "erd" "erd" "xyz" "xyz" "xyz" "erd" "xyz" "erd" "erd"

 
Here I want to know the length of replications for each unique items viz "asd", "xyz", and "erd". Is there any R function available to directly implement that?
 
Thanks,


	[[alternative HTML version deleted]]

