powered by
Add id in each group
add_id(tbl, grp = "group", id = "id")
A dataframe
A string to specify the column of group and id
brk <- "EOS" tbl <- tibble::tibble(col=c(rep("a", 2), brk, rep("b", 3), brk, rep("c", 4), brk)) add_group(tbl, col = "col") |> add_id(id = "id_in_group")
Run the code above in your browser using DataLab