rsplit: Recursivly split a data.frame

Description Usage Arguments Value Author(s) References

View source: R/rsplit.R

Description

When there are multiple factors to split by, Base R split returns a flattened structure by splitting on the interaction of all factors. rsplit instead returns a nested list-of-lists.

Usage

1

Arguments

x

a data.frame or vector

by

a data.frame of factors

drop

drop unused factor levels

Value

a nested list of dataframes, split by each element of by

Inspired by, but different from the below

Author(s)

Neal Fultz

References

https://stackoverflow.com/questions/47802545/converting-data-frame-into-deeply-nested-list/47802935#47802935


stackoverflow documentation built on Jan. 10, 2020, 9:07 a.m.