replicates: computes replicates across a vector

Description Usage Arguments Value Author(s) References See Also Examples

Description

Given a vector, returns the replicates in order

Usage

1

Arguments

x

character or numeric vector

Value

numeric vector

Author(s)

Henrique Dallazuanna

References

R-help mailing list

See Also

rle

Examples

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


a4Base documentation built on May 20, 2017, 10:37 p.m.
Search within the a4Base package
Search all R packages, documentation and source code

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

Please suggest features or report bugs in the GitHub issue tracker.

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