Description Usage Arguments Value Author(s) See Also Examples
"Expand" concatenated numeric or character values to their relevant position
in a data.frame
or data.table
or create a binary representation of such data.
1 2 |
data |
The source |
split.col |
The variable that needs to be split (either name or index position). |
sep |
The character separating each value. Can also be a regular expression. |
mode |
Can be either |
type |
Can be either |
drop |
Logical. Should the original variable be dropped? Defaults to
|
fixed |
Used for |
fill |
Desired "fill" value. Defaults to |
A data.frame
or data.table
depending on the source input.
Ananda Mahto
cSplit()
, cSplit_l()
, numMat()
, charMat()
1 2 3 4 5 6 7 8 9 | temp <- head(concat.test)
cSplit_e(temp, "Likes")
cSplit_e(temp, 4, ";", fill = 0)
## The old function name still works
concat.split.expanded(temp, "Likes")
concat.split.expanded(temp, 4, ";", fill = 0)
concat.split.expanded(temp, 4, ";", mode = "value", drop = TRUE)
concat.split.expanded(temp, "Siblings", type = "character", drop = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.