subtree: Create a subtree by specifying tips to keep.

Description Usage Arguments Value Examples

View source: R/subtree.r

Description

Create a subtree by specifying tips to keep.

Usage

1
subtree(tree, tips)

Arguments

tree

A phylo object, as returned from read.tree.

tips

A character, numeric, or logical vector of tips to keep.

Value

A phylo object for the subtree.

Examples

1
2
3
4
5
6
7
    library(rbiom)
    
    infile <- system.file("extdata", "newick.tre", package = "rbiom")
    tree <- read.tree(infile)
    
    leafs   <- tips(tree)
    subtree <- subtree(tree, head(leafs))

cmmr/rbiom documentation built on Nov. 21, 2018, 10:04 a.m.