unnest

0th

Percentile

Unnest List Data Table Columns

Transforms each element of a list columns into its own column, possibly by reference.

Usage
unnest(x, cols, prefix = NULL)
Arguments
x

:: data.table::data.table() data.table::data.table() with columns to unnest.

cols

:: character() Column names of list columns to operate on.

prefix

:: character(1) String to prefix the new column names with.

Value

(data.table::data.table()).

Aliases
  • unnest
Examples
# NOT RUN {
x = data.table::data.table(
  id = 1:2,
  value = list(list(a = 1, b = 2), list(a = 2, b = 2))
)
print(x)
unnest(x, "value")
# }
Documentation reproduced from package mlr3misc, version 0.1.0, License: LGPL-3

Community examples

Looks like there are no examples yet.