# Extract the ids of the root(s) of a treedf (=items with no parent)
roots <- function(tree) {
idx <- which(is.na(tree$parent_id))
return(tree$id[idx])
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.