replicates {a4Base} | R Documentation |
Given a vector, returns the replicates in order
replicates(x)
x |
character or numeric vector |
numeric vector
Henrique Dallazuanna
R-help mailing list
x <- c('a','b','a','a','b','a','c','c','c') data.frame(val=x,rep=replicates(x))