View source: R/listManipulation.R
frame2tree | R Documentation |
Takes in given columns of a data frame and transforms them into a nested list based on the column names
given. Eg. if first level is c(1,1,2)
and second level is c('a','b','c')
, it will return a list of
length 2 that includes lists named 1 and 2. List 1 will include 2 empty lists named a and b while list 2 will include
1 empty list called c.
frame2tree(frame, levels = colnames(frame))
A nested list
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.