concat.split.compact: Split Concatenated Cells into a Condensed Format

Description Usage Arguments Value Note Author(s) See Also Examples

Description

The default splitting method for concat.split. Formerly based on read.concat() but presently a simple wrapper around cSplit().

Usage

1
2
concat.split.compact(data, split.col, sep = ",", drop = FALSE,
  fixed = TRUE, ...)

Arguments

data

The input data.frame or data.table.

split.col

The column that need to be split.

sep

The character separating each value.

drop

Logical. Should the original variable be dropped? Defaults to FALSE.

fixed

Logical. Should the split character be treated as a fixed pattern (TRUE) or a regular expression (FALSE)? Defaults to TRUE.

...

optional arguments to pass to cSplit.

Value

A data.table.

Note

THIS FUNCTION IS DEPRECATED AND WILL BE REMOVED FROM LATER VERSIONS OF "SPLITSTACKSHAPE". It no longer does anything different from cSplit(). It is recommended that you transition your code to the cSplit function instead.

Author(s)

Ananda Mahto

See Also

read.concat(), cSplit()

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
temp <- head(concat.test)
concat.split.compact(temp, "Likes")
concat.split.compact(temp, 4, ";")

## Extra arguments to cSplit
concat.split.compact(temp, "Siblings", drop = TRUE, stripWhite = TRUE)

## End(Not run)

mrdwab/splitstackshape documentation built on May 23, 2019, 7:16 a.m.