df2tree {d3Tree}R Documentation

df2tree

Description

converts dataframe to json to send to javascript

Usage

df2tree(struct, rootname = "root", tool_tip = NULL)

Arguments

struct

data.frame containing the structure the tree will represent

rootname

character name of the root node

tool_tip

charater vector of the label to give to the nodes in each hierarchy

Examples

titanic_df <- as.data.frame(Titanic)

df2tree(struct = titanic_df,rootname = 'Titanic')

df2tree(
  struct = titanic_df,
  rootname = 'Titanic',
  tool_tip = letters[1:5]
)


[Package d3Tree version 0.3.0 Index]