treeman v1.1.3


Monthly downloads



Phylogenetic Tree Manipulation Class and Methods

S4 class and methods for intuitive and efficient phylogenetic tree manipulation.



Build StatusCoverage StatusCRAN downloadsRdoc

An R package for manipulating phylogentic trees using an intuitive S4 class structure.

The treeman R package provides a list based class for encoding phylogenetic trees in R, making manipulating phylogenetic trees easier to code and more efficient to run. treeman is aimed to be fast, simple and intuitive.


With CRAN:


Installing the development copy via GitHub


Quick guide

# working with the TreeMan class
?TreeMan  # check the documentation
tree <- randTree(10)  # generate a random tree of 10 tips
summary(tree)  # check key stats
tree["tips"]  # extract key stats

For more details check out the wiki.




Version 1.1 released.


Bennett, D.J., Sutton, M.D. & Turvey, S.T., 2017. treeman: an R package for efficient and intuitive manipulation of phylogenetic trees. BMC Research Notes, 10(1), p.30. Available online


D.J. Bennett (but I welcome pull requests!)

Functions in treeman

Name Description
TreeMan-to-phylo Convert TreeMan to phylo
TreeMen-class TreeMen-class
calcOvrlp Calculate phylogenetic overlap
calcPhyDv Calculate phylogenetic diversity
checkTreeMen Check if trees are correct
fastCheckTreeMan Check if tree is correct, fast!
getNdKids Get children IDs
getNdLng Get lineage
getOtgrp Get outgroup
getPath Get path between nodes
list-to-TreeMen Convert list to a TreeMen
loadTreeMan Load a TreeMan object in serialization format
multiPhylo-to-TreeMen Convert multiPhylo to TreeMen
birds Phylogenetic tree of Aves
phylo-class phylo class
blncdTree Generate a balanced tree
calcDstTrp Calculate the triplet distance between two trees
calcFrPrp Calculate evolutionary distinctness
getAge Get age of tree
getBiprts Get the sets of labels for each bipartition in tree
getNdsKids Get children IDs for multiple nodes
TreeMen-to-multiPhylo Convert TreeMen to multiPhylo
rmNdmtrx Remove node matrix
cTrees cTrees
getNdsLng Get lineage for multiple nodes
getPrnt Get parent
calcDstBLD Calculate the BLD between two trees
addClade Add clade to tree
getCnnctdNds Get all nodes connected by given tips
rmNodes Remove nodes from a tree
calcDstMtrx Calculate the distance matrix
getDcsd Get extinct tips from a tree
calcDstRF Calculate the Robinson-Foulds distance between two trees
getSpnAge Get age range
getNdSlt Get a node slot
setTxnyms Set the txnym slots in a tree
getNdSstr Get sister id
getNdsAge Get ages for multiple nodes
getNdsFrmTxnyms Get IDs for nodes represented txnyms
phylo-to-TreeMan Convert phylo to TreeMan
getNdsPD Get phylogenetic diversities of nodes
pinTips Pin tips to a tree
getNdsPrdst Get pre-distances
plants Phylogenetic tree of European Flora
getSubtree Get subtree
setNdOther Set a user defined slot
getSpnsAge Get age ranges for multiple nodes
taxaResolve Resolve taxonmic names online
pstMnp Update prinds and tinds
writeTrmn Write a .trmn tree
rmTips Remove tips from a tree
rmOtherSlt Remove a user-defined slot
calcNdBlnc Calculate the balance of a node
TreeMan-class TreeMan-class
Node-class Node-class
calcNdsBlnc Calculate the balances of all nodes
mammals Phylogenetic tree of Mammalia
addNdmtrx Add node matrix to a tree
setNdSpn Set the branch length of a specific node
ultrTree Make tree ultrametric
unblncdTree Generate an unbalanced tree
addTip Add tip to a tree
calcPrtFrPrp Calculate evolutionary distinctness for part of tree
checkNdlst Check if ndlst is correct
getNdPrids Get pre-nodes to root
updateSlts Update tree slots after manipulation
writeTree Write a Newick tree
multiPhylo-class multiPhylo class
randTree Generate a random tree
getNdPtids Get post-nodes to tips
readTree Read a Newick tree
getLvng Get extant tips from a tree
getNdsSlt Get a node slot for multiple nodes
getNdAge Get age
getNdPD Get phylogenetic diversity of node
getNdPrdst Get pre-distance
getNdsSstr Get sister id
getNdsPrids Get pre-nodes for multiple nodes
setAge Set the age of a tree
getNdsPtids Get post-nodes to tips for multiple nodes
setNdID Set the ID of a node
getUnqNds Get unique nodes represented by tips
isUltrmtrc Is tree ultrametric?
readTrmn Read a .trmn tree
rmClade Remove a clade from a tree
saveTreeMan Save a TreeMan object in serialization format
setNdsID Set the IDs of multiple nodes
setNdsSpn Set the branch lengths of specific nodes
setPD Set the phylogenetic diversity
searchTxnyms Get node labels based on online taxonomic database
setNdsOther Set a user defined slot for multiple nodes
treeman-package Phylogenetic Tree Manipulation
twoer Generate a tree of two tips
No Results!

Last month downloads


Type Package
License GPL-2
RoxygenNote 6.0.1
Collate 'calc-methods.R' 'check_methods.R' 'cnvrt-methods.R' 'gen-methods.R' 'get-nd-methods.R' 'get-nds-methods.R' 'get-spcl-methods.R' 'manip-methods.R' 'ndlst-methods.R' 'ndmtrx-methods.R' 'node-declaration.R' 'read-write-methods.R' 'server-methods.R' 'set-methods.R' 'treeman-declaration.R' 'treemen-declaration.R' 'update-methods.R' 'viz-methods.R' 'zzz.R'
NeedsCompilation yes
Packaged 2018-09-17 10:21:24 UTC; dom
Repository CRAN
Date/Publication 2018-09-17 10:50:03 UTC

Include our badge in your README