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

View source: R/generate_synthetic_data.R

as_replicateR Documentation

Get numeric vector with the count of the replicate for each element

Description

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

Usage

as_replicate(x)

Arguments

x

a vector with repeated elements

Value

numeric vector

See Also

order, rank

Examples

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


const-ae/proDA documentation built on Oct. 31, 2023, 9:39 p.m.