id {dplyr} | R Documentation

## Compute a unique numeric id for each unique row in a data frame.

### Description

Properties:

- `order(id)` is equivalent to `do.call(order, df)`

- rows containing the same data have the same value

- if `drop = FALSE` then room for all possibilities

### Usage

    id(.variables, drop = FALSE)

### Arguments

`.variables` | list of variables
`drop` | drop unused factor levels?

### Value

a numeric vector with attribute n, giving total number of possibilities

[Package dplyr version 0.8.0.1 Index]