Add unique ids to rows. Note: re-arranges rows in many cases.
replyr_add_ids(df, idColName, env = parent.frame(), local_short_cut = TRUE)
df | data.frame object to work with |
---|---|
idColName | name of column to add |
env | environment to evaluate in (not used). |
local_short_cut | logical, if TRUE use base R on local data. |
#> x id #> 1 a 1 #> 2 b 2