read.concat {splitstackshape} | R Documentation |
Read Concatenated Character Vectors Into a data.frame
Description
Originally a helper function for the concat.split.compact()
function. This
function has now been effectively replaced by cSplit()
.
Usage
read.concat(data, col.prefix, sep, ...)
Arguments
data |
The input data. |
col.prefix |
The desired column prefix for the output |
sep |
The character that acts as a delimiter. |
... |
Other arguments to pass to |
Value
A data.frame
.
Author(s)
Ananda Mahto
See Also
Examples
vec <- c("a,b", "c,d,e", "f, g", "h, i, j,k")
splitstackshape:::read.concat(vec, "var", ",")
## More than 5 lines the same
## `read.table` would fail with this
vec <- c("12,51,34,17", "84,28,17,10", "11,43,28,15",
"80,26,17,91", "10,41,25,13", "97,35,23,12,13")
splitstackshape:::read.concat(vec, "var", ",")
[Package splitstackshape version 1.4.8 Index]