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 31, 2017, 3:05 p.m.

Search within the a4Base package
Search all R packages, documentation and source code