df2tree: df2tree

View source: R/d3TreeFunctions.R

df2treeR 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]
)


metrumresearchgroup/d3Tree documentation built on Feb. 4, 2024, 6:33 p.m.