Description Usage Arguments Examples
From a character field with comma-separated codes, split the row in several rows, one for each code in the character field
1 | splitDTRow(dt, splitby = ",", column)
|
dt |
the data.table to be splitted |
splitby |
a character sequence which will act as the separator for the character field/column |
column |
the column where the character codes are |
1 2 | dta <- data.table(a = 1:2, b = c("a, b, c", "d, e"), stringsAsFactors = FALSE)
dta2 <- splitDTRow(dta, ", ", "b")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.