Learn R Programming

splitstackshape (version 1.4.8)

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

Description

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

Usage

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.

See Also

read.concat(), cSplit()

Examples

Run this code
# NOT RUN {
# }
# 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab