Learn R Programming

moranajp (version 0.9.7)

add_group: Add group id column into result of morphological analysis

Description

Add group id column into result of morphological analysis

Usage

add_group(
  tbl,
  col,
  brk = "EOS",
  grp = "group",
  cond = NULL,
  end_with_brk = TRUE
)

Value

A dataframe

Arguments

tbl

A dataframe

col

A string to specify the column including breaks

brk

A string to specify breaks

grp

A string to specify group

cond

A string to specify condition

end_with_brk

A logical

Examples

Run this code
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