View source: R/d3TreeFunctions.R
df2tree | R Documentation |
converts dataframe to json to send to javascript
df2tree(struct, rootname = "root", tool_tip = NULL)
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 |
titanic_df <- as.data.frame(Titanic)
df2tree(struct = titanic_df,rootname = 'Titanic')
df2tree(
struct = titanic_df,
rootname = 'Titanic',
tool_tip = letters[1:5]
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.