trim.phylo: Trim a phylogenetic tree using Genus species names

View source: R/phylogeny.R

trim.phyloR Documentation

Trim a phylogenetic tree using Genus species names

Description

Read in a vector of genus species names and a tree and drop the tips in the tree that match the vector of names.

Usage

trim.phylo(phylo, gs.vect)

Arguments

phylo

a phylogenetic tree

gs.vect

a vector of character strings in the 'Genus_species' format

Value

a plot of a transformed phylogenetic tree

Examples


data.path <- system.file("extdata","primate-example.data.csv", package="mmodely")
data <- read.csv(data.path, row.names=1)
data$gn_sp <- rownames(data)

tree.path <- system.file("extdata","primate-springer.2012.tre", package="mmodely")
phylo <- read.tree(tree.path)[[5]]

trim.phylo(phylo, gs.vect=data$gn_sp)


mmodely documentation built on May 31, 2023, 6:47 p.m.