getDescendants: Get descendants

Description Usage Arguments Value

Description

This function takes a data.table in a tree like structure and returns, for each top node, a data.table with all the descendants (children of children of ...).

Usage

1
getDescendants(tree, parentColname, childColname)

Arguments

tree

A data.table object.

parentColname

The column name of the parent column of tree.

childColname

The column name of the child column of tree.

Value

A data.table object with two columns: the first is the column of all the top level nodes and the next contains all the descendants of that node.


SWS-Methodology/faoswsUtil documentation built on May 9, 2019, 11:53 a.m.