Learn R Programming

splitstackshape (version 1.0)

concat.split.compact: Split concatenated cells in a data.frame into a condensed format

Description

The default splitting method for concat.split. Uses read.concat to do most of the processing.

Usage

concat.split.compact(data, split.col, sep = ",",
    drop = FALSE, fixed = NULL)

Arguments

data
The source data.frame
split.col
The variable that needs to be split (either name or index position).
sep
The character separating each value.
drop
Logical. Should the original variable be dropped? Defaults to FALSE.
fixed
An unused dummy argument to make the function compatible with concat.split.expanded.

Value

  • A data.frame

See Also

read.concat, concat.split, concat.split.list, concat.split.expanded, concat.split.multiple

Examples

Run this code
temp <- head(concat.test)
concat.split.compact(temp, "Likes")
concat.split.compact(temp, 4, ";")
concat.split.compact(temp, "Siblings", drop = TRUE)

rm(temp)

Run the code above in your browser using DataLab