Description Usage Arguments Examples
Split hyphenated strings in column into two columns
1 | set.split_hyphenated(df, name_field, return_type = "dt")
|
df |
data.frame or data.table. |
name_field |
name of column containing hyphenated values. |
return_type. |
Optional. Return data.table "dt" or data.frame "df". Default "dt". |
1 2 3 4 5 | df <- data.frame(first_name = c("Devante"), last_name = c("Smith-Pelly"))
dt <- set.split_hyphenated(df, "last_name")
dt
first_name last_name last_name_left last_name_right
1: Devante Smith Smith Pelly
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.