Given a vector, returns the replicates in order

1 | ```
replicates(x)
``` |

`x` |
character or numeric vector |

numeric vector

Henrique Dallazuanna

R-help mailing list

`rle`

1 2 | ```
x <- c('a','b','a','a','b','a','c','c','c')
data.frame(val=x,rep=replicates(x))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.