Learn R Programming

shinyTree (version 0.3.1)

treeToDf: Convert tree into data.frame

Description

Convert tree into data.frame

Usage

treeToDf(tree, hierarchy = NULL)

Value

data.frame

Arguments

tree

named nested list

hierarchy

sorted character vector with name for each level of the list

Author

Michael Bell

Examples

Run this code
if (FALSE) {
df <- data.frame(Titanic)
tree <- dfToTree(df, c("Sex", "Class", "Survived"))
newDf <- treeToDf(tree, c("Sex", "Class", "Survived"))
}

Run the code above in your browser using DataLab