data.tree v1.0.0


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

Vignettes of data.tree

No Results!

Last month downloads


Type Package
Date 2020-07-31
VignetteBuilder knitr, rmarkdown
License GPL (>= 2)
RoxygenNote 7.1.1
Encoding UTF-8
NeedsCompilation no
Packaged 2020-07-31 08:02:54 UTC; glurious2
Repository CRAN
Date/Publication 2020-08-03 15:50:02 UTC

Include our badge in your README