as_replicate {proDA} | R 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))

[Package proDA version 1.2.0 Index]