data.tree v0.7.11


Monthly downloads



General Purpose Hierarchical Data Structure

Create tree structures from hierarchical data, and traverse the tree in various orders. Aggregate, cumulate, print, plot, convert to and from data.frame and more. Useful for decision trees, machine learning, finance, conversion from and to JSON, and many other applications.

Functions in data.tree

Name Description
Aggregate Aggregate child values of a Node, recursively.
isNotLeaf Check if a Node is not a leaf
AreNamesUnique Test whether all node names are unique.
CreateRandomTree Create a tree for demo and testing
GetPhyloNr Determine the number a Node has after conversion to a phylo object
NODE_RESERVED_NAMES_CONST Names that are reserved by the Node class.
Clone Clone a tree (creates a deep copy) Convert a data.tree structure to a data.frame
as.Node.rpart Convert an rpart object to a data.tree structure
print.Node Print a Node in a human-readable fashion.
mushroom Sample Data: Data Used by the ID3 Vignette
s3_register Register a method for a suggested dependency
FindNode Find a node by name in the (sub-)tree
Do Executes a function on a set of nodes
FormatFixedDecimal Format a Number as a Decimal
Prune Prunes a tree.
CheckNameReservedWord Checks whether name is a reserved word, as defined in NODE_RESERVED_NAMES_CONST.
GetAttribute Get an attribute from a Node.
FormatPercent Format a Number as a Percentage
ToNewick Write a data.tree structure to Newick notation
acme Sample Data: A Simple Company with Departments
Traverse Traverse a tree or a sub-tree
as.Node.BinaryTree Convert a a SplitNode from the party package to a data.tree structure.
averageBranchingFactor Calculate the average number of branches each non-leaf has
as.Node Convert an object to a data.tree data structure
Revert Reverts the sort order of a Node's children. Convert a data.frame to a data.tree structure
as.dendrogram.Node Convert a Node to a dendrogram
data.tree data.tree: Hierarchical Data Structures
as.Node.list Convert a nested list structure to a data.tree structure
as.Node.dendrogram Convert a dendrogram to a data.tree Node
as.igraph.Node Convert a data.tree structure to an igraph network
as.list.Node Convert a data.tree structure to a list-of-list structure
Sort Sort children of a Node or an entire data.tree structure
as.phylo.Node Convert a Node to a phylo object from the ape package.
as.Node.phylo Convert a phylo object from the ape package to a Node Convert a a party from the partykit package to a data.tree structure.
Climb Climb a tree from parent to children, by provided criteria.
Node Create a data.tree Structure With Nodes
plot.Node Plot a graph, or get a graphviz dot representation of the tree
Navigate Navigate to another node by relative path.
isNotRoot Check if a Node is not a root
isRoot Check if a Node is the root
Cumulate Cumulate values among siblings
CreateRegularTree Create a tree for demo and testing
DefaultPlotHeight Calculates the height of a Node given the height of the root.
Distance Find the distance between two nodes of the same tree
SetFormat Set a formatter function on a specific node
Set Traverse a Tree and Assign Values
isLeaf Check if a Node is a leaf
Get Traverse a Tree and Collect Values
No Results!

Vignettes of data.tree

No Results!

Last month downloads


Type Package
Date 2019-11-09
VignetteBuilder knitr, rmarkdown
License GPL (>= 2)
RoxygenNote 6.1.1
Encoding UTF-8
NeedsCompilation no
Packaged 2019-11-09 08:09:05 UTC; rstudio
Repository CRAN
Date/Publication 2019-11-09 10:10:07 UTC

Include our badge in your README