as_replicate: Get numeric vector with the count of the replicate for each...

Description Usage Arguments Value See Also Examples

View source: R/synthetic_data.R

Description

For a vector with repeated values return a vector where each element is the count how often the element was observed previously

Usage

1

Arguments

x

a vector with repeated elements

Value

numeric vector

See Also

order, rank

Examples

1
2
  x <- c("a", "b", "a", "b", "b", "d")
  all(proDD:::as_replicate(x) == c(1,1,2,2,3,1))

const-ae/proDD documentation built on Jan. 14, 2020, 9:34 a.m.