load a newick tree.
load.tree(treefile, ...)
treefile | Required. Path of phylogenetic tree to read |
---|---|
... | Optional. Pass any other arguments to read.tree |
a phylo4
tree object.
this is the recommended way to load a tree for use with phylocanvas. The reason is that
all of the javascript selector methods require that the nodes are named and the
selection of nodes based on names is straightforward with phylo4
objects. Therefore this function will read your newick tree, add names, and return a
phylo4
object that can be easily manipulated and subsetted
generating custom displays.
birdfile <- system.file("treedata/birdfamilies.tree", package="phylocanvas") tree <- load.tree(birdfile)