View source: R/data.tree-conversion.R
dfToTree | R Documentation |
Converts a data.frame to a data.tree format
dfToTree(df, hierarchy = colnames(df))
df |
data.frame |
hierarchy |
ordered character vector of column names defining the hierarchy |
nested list
Jasper Schelfhout jasper.schelfhout@openanalytics.eu
## Not run:
df <- data.frame(Titanic)
tree <- dfToTree(df, 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.