colSplit: Separate a Column Pasted by paste2

Description Usage Arguments Value See Also Examples

Description

Separates a paste2 column into separate columns.

Usage

1
  colSplit(column, col.sep = ".", name.sep = "&")

Arguments

column

The pasted vector.

col.sep

The column separator used in paste2.

name.sep

Name separator used in the column (generally for internal use with colsplit2df).

Value

Returns a dataframe of split columns.

See Also

colsplit2df, paste2

Examples

1
2
3
4
5
6
7
8
9
foo1 <- paste2(CO2[, 1:3])
head(foo1, 12)
bar1 <- colSplit(foo1)
head(bar1, 10)

foo2  <- paste2(mtcars[, 1:3], sep="|")
head(foo2, 12)
bar2 <- colSplit(foo2, col.sep = "|")
head(bar2, 10)

trinker/qdap2 documentation built on May 31, 2019, 9:47 p.m.