R: Get age

getNdAge {treeman} | R Documentation

## Get age

### Description

Return the age for `id`. Requires the known age of the tree to be provided.

### Usage

    getNdAge(tree, id, tree_age)

### Arguments

`tree` | `TreeMan` object
`id` | node id
`tree_age` | numeric value of known age of tree

### Details

Returns a numeric.

### See Also

`getNdsAge`, `getSpnAge`, `getSpnsAge`, `getPrnt`, `getAge` https://github.com/DomBennett/treeman/wiki/get-methods

### Examples

    library(treeman)
    data(mammals)
    # when did apes emerge?
    # get parent id for all apes
    prnt_id <- getPrnt(mammals, ids=c('Homo_sapiens', 'Hylobates_concolor'))
    # mammal_age <- getAge(mammals)  # ~166.2, needs to be performed when tree is not up-to-date
    getNdAge(mammals, id=prnt_id, tree_age=166.2)

[Package treeman version 1.1.4 Index]