View source: R/col_str_reshape.R
str_split_col | R Documentation |
Split one column to multiple columns based on patterns
str_split_col(dt, by_col, by_pattern, match_to_names = NULL)
dt |
input data table |
by_col |
by this column |
by_pattern |
split by this patter |
match_to_names |
created new columns names |
data table with new columns
data("dt_dates") str_split_col(dt_dates, by_col = "Full_name", by_pattern = ", ", match_to_names = c("First Name", "Last Name"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.