root: Root(s) of a tree

Description Usage Arguments Value

Description

Find the root of a tree (or the multiple roots for a non-rooted tree)

Usage

1
2
3
4
5
6
7
8
9
root(.tree)

## S3 method for class 'rtree'
root(.tree)

roots(.tree)

## S3 method for class 'rtree'
roots(.tree)

Arguments

.tree

A tree.

Value

root returns a node, the root of the tree if it exists; if .tree is not rooted, an error is thrown.

roots returns a list of nodes, the roots of the tree.


paulponcet/oak documentation built on May 14, 2019, 7:21 p.m.