powered by
Add group id column into result of morphological analysis
add_group( tbl, col, brk = "EOS", grp = "group", cond = NULL, end_with_brk = TRUE )
A dataframe
A string to specify the column including breaks
A string to specify breaks
A string to specify group
A string to specify condition
A logical
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_group(tbl, col = "col", end_with_brk = FALSE)
Run the code above in your browser using DataLab