Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nest..html

Nest data.tables


Description

Nest data.tables

Usage

nest.(.df, ..., .names_sep = NULL)

Arguments

.df

A data.table or data.frame

...

Columns to be nested.

.names_sep

If NULL, the names will be left alone. If a string, the names of the columns will be created by pasting together the inner column names and the outer column names.

Examples

test_df <- data.table(
  a = 1:10,
  b = 11:20,
  c = c(rep("a", 6), rep("b", 4)),
  d = c(rep("a", 4), rep("b", 6))
)

test_df %>%
  nest.(data = c(a, b))

test_df %>%
  nest.(data = where(is.numeric))

tidytable

Tidy Interface to 'data.table'

v0.6.1
MIT + file LICENSE
Authors
Mark Fairbanks [aut, cre], Abdessabour Moutik [ctb], Matt Carlson [ctb], Ivan Leung [ctb], Ross Kennedy [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.