Learn R Programming

oak (version 0.2.3)

Tree: Tree Class

Description

Tree class

Node class; inherits from the class Nodes.

Usage

Tree

Node

Arguments

Format

An object of class R6ClassGenerator of length 24.

Fields

data

object to be converted to an rtree.

label

character. The label of the node; must be part of the tree's labels.

tree

rtree. The tree where the node belongs to.

...

Additional parameters (currently not used).

Methods

get_tree()

Get the tree (as an rtree object)

ancestors_of(.node, include_node = FALSE)

Get the ancestors of the node

children_of(.node, degree = 1L)

Get the children of the node

descendants_of(.node, include_node = FALSE)

Get the descendants of the node

parent_of(.node, degree = 1L)

Get the parent of the node

siblings_of(.node, include_node = FALSE)

Get the siblings of the node

get_label()

Get the label of the node

ancestors(include_node = FALSE)

Get the ancestors of the node

children(degree = 1L)

Get the children of the node

descendants(include_node = FALSE)

Get the descendants of the node

parent(degree = 1L)

Get the parent of the node

siblings(include_node = FALSE)

Get the siblings of the node

See Also

Nodes and Node in this package.

Tree and Nodes in this package.