powered by
Nest data.tables
nest.(.df, ..., .names_sep = NULL)
A data.table or data.frame
Columns to be nested.
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.
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)) ) df %>% nest.(data = c(a, b)) df %>% nest.(data = where(is.numeric))
Run the code above in your browser using DataLab