dfToTree: Converts a data.frame to a data.tree format

View source: R/data.tree-conversion.R

dfToTreeR Documentation

Converts a data.frame to a data.tree format

Description

Converts a data.frame to a data.tree format

Usage

dfToTree(df, hierarchy = colnames(df))

Arguments

df

data.frame

hierarchy

ordered character vector of column names defining the hierarchy

Value

nested list

Author(s)

Jasper Schelfhout jasper.schelfhout@openanalytics.eu

Examples

## Not run: 
df <- data.frame(Titanic)
tree <- dfToTree(df, c("Sex", "Class", "Survived"))

## End(Not run)

trestletech/shinyTree documentation built on Sept. 27, 2024, 4:38 a.m.