data.tree: 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.

Author
Facundo Munoz [ctb] (improve list conversion), Markus Wamser [ctb] (fixed some typos), Pierre Formont [ctb] (additional features), Kent Russel [ctb] (documentation), Noam Ross [ctb] (fixes), Duncan Garmonsway [ctb] (fixes), Christoph Glur [aut, cre] (R interface)
Date of publication
2016-11-24 22:54:00
Maintainer
Christoph Glur <christoph.glur@ipub.com>
License
GPL (>= 2)
Version
0.6.2
URLs

View on CRAN

Man pages

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

Files in this package

data.tree
data.tree/inst
data.tree/inst/extdata
data.tree/inst/extdata/portfolio.csv
data.tree/inst/extdata/flare.json
data.tree/inst/extdata/jennylind.yaml
data.tree/inst/extdata/useR15.csv
data.tree/inst/doc
data.tree/inst/doc/applications.R
data.tree/inst/doc/applications.Rmd
data.tree/inst/doc/applications.html
data.tree/inst/doc/data.tree.html
data.tree/inst/doc/data.tree.Rmd
data.tree/inst/doc/data.tree.R
data.tree/tests
data.tree/tests/testthat.R
data.tree/tests/testthat
data.tree/tests/testthat/test-draw.R
data.tree/tests/testthat/test-treeConversion.R
data.tree/tests/testthat/test-treeConversionDataFrame.R
data.tree/tests/testthat/test-treeConversionigraph.R
data.tree/tests/testthat/test-treeMethods.R
data.tree/tests/testthat/test-treeConversionParty.R
data.tree/tests/testthat/test-treeConversionApe.R
data.tree/tests/testthat/test-treeConversionDendrogram.R
data.tree/tests/testthat/test-treeConstruction.R
data.tree/tests/testthat/test-treeDocu.R
data.tree/tests/testthat/test-treeMethodsSideEffect.R
data.tree/tests/testthat/test-util.R
data.tree/NAMESPACE
data.tree/NEWS
data.tree/data
data.tree/data/acme.rda
data.tree/data/mushroom.rda
data.tree/R
data.tree/R/node_conversion_party.R
data.tree/R/node_conversion_dataframe.R
data.tree/R/node_methods_sideeffect.R
data.tree/R/node_conversion_dendrogram.R
data.tree/R/node_conversion.R
data.tree/R/node_methods.R
data.tree/R/node.R
data.tree/R/node_methods_traversal.R
data.tree/R/data_doc.R
data.tree/R/node_conversion_igraph.R
data.tree/R/data.tree.R
data.tree/R/util.R
data.tree/R/node_plot.R
data.tree/R/node_conversion_ape.R
data.tree/R/node_actives.R
data.tree/R/release.R
data.tree/R/node_conversion_list.R
data.tree/vignettes
data.tree/vignettes/applications.Rmd
data.tree/vignettes/applications.banner.html
data.tree/vignettes/data.tree.Rmd
data.tree/vignettes/assets
data.tree/vignettes/assets/listviewer.jpg
data.tree/vignettes/assets/acmestyle2.png
data.tree/vignettes/assets/acmestyle3.png
data.tree/vignettes/assets/postorder.png
data.tree/vignettes/assets/dtree.png
data.tree/vignettes/assets/bubbles.jpg
data.tree/vignettes/assets/preorder.png
data.tree/vignettes/assets/acmestyle.png
data.tree/vignettes/assets/acme.png
data.tree/vignettes/banner_applications.jpg
data.tree/vignettes/banner_intro.jpg
data.tree/vignettes/intro.banner.html
data.tree/MD5
data.tree/build
data.tree/build/vignette.rds
data.tree/DESCRIPTION
data.tree/man
data.tree/man/as.Node.phylo.Rd
data.tree/man/as.phylo.Node.Rd
data.tree/man/isNotLeaf.Rd
data.tree/man/FormatPercent.Rd
data.tree/man/ToNewick.Rd
data.tree/man/Distance.Rd
data.tree/man/Sort.Rd
data.tree/man/as.list.Node.Rd
data.tree/man/NODE_RESERVED_NAMES_CONST.Rd
data.tree/man/as.Node.Rd
data.tree/man/acme.Rd
data.tree/man/SetFormat.Rd
data.tree/man/Clone.Rd
data.tree/man/Climb.Rd
data.tree/man/ToGraphViz.Rd
data.tree/man/mushroom.Rd
data.tree/man/Get.Rd
data.tree/man/isNotRoot.Rd
data.tree/man/as.Node.BinaryTree.Rd
data.tree/man/AreNamesUnique.Rd
data.tree/man/as.igraph.Node.Rd
data.tree/man/Prune.Rd
data.tree/man/DefaultPlotHeight.Rd
data.tree/man/FindNode.Rd
data.tree/man/print.Node.Rd
data.tree/man/as.dendrogram.Node.Rd
data.tree/man/Do.Rd
data.tree/man/Cumulate.Rd
data.tree/man/FormatFixedDecimal.Rd
data.tree/man/CheckNameReservedWord.Rd
data.tree/man/Navigate.Rd
data.tree/man/CreateRegularTree.Rd
data.tree/man/as.Node.list.Rd
data.tree/man/averageBranchingFactor.Rd
data.tree/man/Revert.Rd
data.tree/man/GetAttribute.Rd
data.tree/man/as.Node.data.frame.Rd
data.tree/man/as.data.frame.Node.Rd
data.tree/man/isLeaf.Rd
data.tree/man/data.tree.Rd
data.tree/man/CreateRandomTree.Rd
data.tree/man/Set.Rd
data.tree/man/as.Node.party.Rd
data.tree/man/GetPhyloNr.Rd
data.tree/man/Aggregate.Rd
data.tree/man/as.Node.dendrogram.Rd
data.tree/man/Traverse.Rd
data.tree/man/isRoot.Rd
data.tree/man/Node.Rd