R: Get parent

getPrnt {treeman} | R Documentation

## Get parent

### Description

Return parental (most recent common ancestor) node id for `ids`.

### Usage

    getPrnt(tree, ids)

### Arguments

`tree` | `TreeMan` object
`ids` | vector of node ids

### Details

Returns a character.

### See Also

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

### Examples

    library(treeman)
    data(mammals)
    # choosing ids from the two main branches of apes allows to find the parent for all apes
    ape_id <- getPrnt(mammals, ids=c('Homo_sapiens', 'Hylobates_concolor'))

[Package treeman version 1.1.4 Index]