View source: R/data.tree-conversion.R
treeToDf | R Documentation |
Convert tree into data.frame
treeToDf(tree, hierarchy = NULL)
tree |
named nested list |
hierarchy |
sorted character vector with name for each level of the list |
data.frame
Michael Bell
## Not run:
df <- data.frame(Titanic)
tree <- dfToTree(df, c("Sex", "Class", "Survived"))
newDf <- treeToDf(tree, c("Sex", "Class", "Survived"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.