get_parent_id {autoharp}R Documentation

Generic for Getting Parent Node Id.

Description

The generic method definition for getting parent node id.

Usage

get_parent_id(x, node_num)

## S4 method for signature 'TreeHarp'
get_parent_id(x, node_num)

## S4 method for signature 'list'
get_parent_id(x, node_num)

Arguments

x

An object of class TreeHarp or an adjacency list.

node_num

An integer, length 1. This the node whose parent we are after. If node_num is equal to 1, then NULL is returned because that should be the root node.

Value

An integer, indicating the parent node.

Methods (by class)

See Also

get_child_ids


[Package autoharp version 0.0.10 Index]