read.concat: Read Concatenated Character Vectors Into a data.frame

Description Usage Arguments Value Author(s) See Also Examples

Description

Originally a helper function for the concat.split.compact() function. This function has now been effectively replaced by cSplit().

Usage

1
read.concat(data, col.prefix, sep, ...)

Arguments

data

The input data.

col.prefix

The desired column prefix for the output data.frame.

sep

The character that acts as a delimiter.

...

Other arguments to pass to utils::read.table().

Value

A data.frame.

Author(s)

Ananda Mahto

See Also

utils::read.table()

Examples

1
2
3
4
5
6
7
8
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", ",")

splitstackshape documentation built on May 1, 2019, 8:20 p.m.