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.

Install the latest version of this package by entering the following in R:
install.packages("data.tree")
AuthorFacundo 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 publication2017-01-06 11:42:07
MaintainerChristoph Glur <christoph.glur@ipub.com>
LicenseGPL (>= 2)
Version0.7.0
http://github.com/gluc/data.tree

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

ToDiagrammeRGraph: 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

Functions

acme Man page
Aggregate Man page
AreNamesUnique Man page
as.data.frame.Node Man page
as.dendrogram.Node Man page
as.igraph.Node Man page
as.list.Node Man page
as.Node Man page
as.Node.BinaryTree Man page
as.Node.data.frame Man page
as.Node.dendrogram Man page
as.Node.list Man page
as.Node.party Man page
as.Node.phylo Man page
as.phylo.Node Man page
averageBranchingFactor Man page
CheckNameReservedWord Man page
Climb Man page
Clone Man page
CreateRandomTree Man page
CreateRegularTree Man page
Cumulate Man page
data.tree Man page
data.tree-package Man page
DefaultPlotHeight Man page
Distance Man page
Do Man page
FindNode Man page
FormatFixedDecimal Man page
FormatPercent Man page
FromDataFrameNetwork Man page
FromDataFrameTable Man page
FromListExplicit Man page
FromListSimple Man page
Get Man page
GetAttribute Man page
GetDefaultTooltip Man page
GetPhyloNr Man page
isLeaf Man page
isNotLeaf Man page
isNotRoot Man page
isRoot Man page
mushroom Man page
Navigate Man page
Node Man page
NODE_RESERVED_NAMES_CONST Man page
plot.Node Man page
print.Node Man page
Prune Man page
Revert Man page
Set Man page
SetEdgeStyle Man page
SetFormat Man page
SetGraphStyle Man page
SetNodeStyle Man page
Sort Man page
ToDataFrameNetwork Man page
ToDataFrameTable Man page
ToDataFrameTree Man page
ToDataFrameTypeCol Man page
ToDiagrammeRGraph Man page
ToListExplicit Man page
ToListSimple Man page
ToNewick Man page
Traverse Man page

Files

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

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.