R: Get pre-distance

getNdPrdst {treeman} | R Documentation

## Get pre-distance

### Description

Return root to tip distance (prdst) for `id`

### Usage

    getNdPrdst(tree, id)

### Arguments

`tree` | `TreeMan` object
`id` | node id

### Details

Sums the lengths of all branches from `id` to root.

### See Also

`getNdsPrdst`, https://github.com/DomBennett/treeman/wiki/get-methods

### Examples

    library(treeman)
    tree <- randTree(10)
    getNdPrdst(tree, id='t1')  # return the distance to root from t1

[Package treeman version 1.1.4 Index]