Description Usage Arguments Details Value Examples
Wrapper around tidyr::separate_rows()
. Performs the operation for a given
list of dividers (delimiters).
Iterates through the set of possible dividers.
1 |
df |
A |
column |
The name of the column/feature to perfom the separation on. |
dividers |
A vector of delimiters to |
trim_ws |
A boolean; determines if trailing white spaces (potentially generated by the split), are trimmed or not. |
If a feature/variable in a record contains multiple delimited values, this separates the values, placing each on in its own row (creating a new record). The transformation is similar to wide to long, but only (feature, record) having delimited values will create new rows.
A DataFrame
with the additional rows (as many as performed splits).
1 2 3 4 5 | melt_rows(
businesses[4:8, 3:4],
"trading_name",
dividers = c("\\|", " trading as ", "t/a", "\\/")
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.