Learn R Programming

plyr (version 1.5.2)

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

Description

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

Usage

id(.variables, drop=FALSE)

Arguments

.variables
list of variables
drop
drop unusued factor levels?

Value

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

Details

Properties:
  • order(id)is equivalent todo.call(order, df)
  • rows containing the same data have the same value
  • ifdrop = FALSEthen room for all possibilites

See Also

id_var