Group a data frame and add per-group indices as a column.
distinct_se(.data, groupingVars, .keep_all = FALSE)
.data | data.frame |
---|---|
groupingVars | character vector of column names to group by. |
.keep_all | logical, passed to dplyr::distinct. |
.data passed through distinct with groupingVars args.
#> cyl gear #> Mazda RX4 6 4 #> Datsun 710 4 4 #> Hornet 4 Drive 6 3 #> Hornet Sportabout 8 3 #> Toyota Corona 4 3 #> Porsche 914-2 4 5 #> Ford Pantera L 8 5 #> Ferrari Dino 6 5