dt_unnest: Unnest: Fast Unnesting of Data Tables

View source: R/unnest.R

dt_unnestR Documentation

Unnest: Fast Unnesting of Data Tables

Description

Quickly unnest data tables, particularly those nested by dt_nest().

Usage

dt_unnest(dt_, col, keep = TRUE)

Arguments

dt_

the data table to unnest

col

the column to unnest

keep

whether to keep the nested column, default is TRUE

Examples


library(data.table)
dt <- data.table(
  x = rnorm(1e5),
  y = runif(1e5),
  grp = sample(1L:3L, 1e5, replace = TRUE)
)

nested <- dt_nest(dt, grp)
dt_unnest(nested, col = data)

tidyfast documentation built on May 29, 2024, 9:10 a.m.