Rank a vector based on clusters

Share:

Description

Rank a vector based on clusters

Usage

1

Arguments

x

numeric vector

ignore0

logical (FALSE). If TRUE, will ignore the 0's in the vector

...

not used

Value

an integer vector with the number of unique values as the number of uniques in the original vector. And the values are ranked from 1 (in the beginning of the vector) to the number of unique clusters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.