listCol_l: Unlist a Column Stored as a List

Description Usage Arguments Value Author(s) See Also Examples

Description

Unlists a column stored as a list into a long form.

Usage

1
listCol_l(inDT, listcol, drop = TRUE)

Arguments

inDT

The input dataset.

listcol

The name of the column stored as a list.

drop

Logical. Should the original column be dropped? Defaults to TRUE.

Value

A data.table.

Author(s)

Ananda Mahto

See Also

listCol_w to flatten a list column into a "wide" format.

Examples

1
2
dat <- data.frame(A = 1:3, B = I(list(c(1, 2), c(1, 3, 5), c(4))))
listCol_l(dat, "B")

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