powered by
Add ids.
text_id_with_break(x, brk, end_with_brk = TRUE)add_text_id_df(df, col, brk, end_with_brk = TRUE)
add_text_id_df(df, col, brk, end_with_brk = TRUE)
id_with_break() returns id vector, add_id_df() returns dataframe.
A string vector.
A string to specify the break between ids.
A logical. TRUE: brk means the end of groups. FALSE: brk means the beginning of groups.
A dataframe.
A string to specify the column.
tmp <- c("a", "brk", "b", "brk", "c") brk <- "brk" text_id_with_break(tmp, brk) add_text_id_df(tibble::tibble(tmp), col = "tmp", "brk")
Run the code above in your browser using DataLab