concat.split.multiple {splitstackshape} | R Documentation |
Split Concatenated Cells and Optionally Reshape the Output
Description
This is a wrapper for the cSplit()
function to maintain backwards
compatibility with earlier versions of the "splitstackshape" package. It
allows the user to split multiple columns at once and optionally convert the
results into a "long" format.
Usage
concat.split.multiple(data, split.cols, seps = ",", direction = "wide",
...)
Arguments
data |
The source |
split.cols |
A vector of columns that need to be split. |
seps |
A vector of the separator character used in each column. If all columns use the same character, you can enter that single character. |
direction |
The desired form of the resulting |
... |
Other arguments to |
Value
A data.table
.
Author(s)
Ananda Mahto
See Also
Examples
## Not run:
temp <- head(concat.test)
concat.split.multiple(temp, split.cols = c("Likes", "Hates", "Siblings"),
seps = c(",", ";", ","))
concat.split.multiple(temp, split.cols = c("Likes", "Siblings"),
seps = ",", direction = "long")
## End(Not run)
[Package splitstackshape version 1.4.8 Index]