Skip to contents

Get the row number for unique values.

Usage

row_number_unique(x)

Arguments

x

A vector

Value

A numeric vector with rank, given the unique values from argument 'x'.

Examples


row_number_unique(mtcars$gear)
#>  [1] 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 2 2 1 1 1 2 2 2 2 2 1 3 3 3 3 3 1