Add group id column into result of morphological analysis
Examples
brk <- "EOS"
tbl <- tibble::tibble(col=c(rep("a", 2), brk, rep("b", 3), brk, rep("c", 4), brk))
add_group(tbl, col = "col")
#> Error in dplyr::mutate(tbl, `:=`({ { grp }}, cumsum(eval_str(cond)) + 1)): ℹ In argument: `group = cumsum(eval_str(cond)) + 1`.
#> Caused by error:
#> ! object 'tbl' not found
add_group(tbl, col = "col", end_with_brk = FALSE)
#> Error in dplyr::mutate(tbl, `:=`({ { grp }}, cumsum(eval_str(cond)) + 1)): ℹ In argument: `group = cumsum(eval_str(cond)) + 1`.
#> Caused by error:
#> ! object 'tbl' not found