get_phylogeny: Get a phylogeny for a dataset

Description Usage Arguments Details Value Examples

View source: R/taxa.R

Description

This function loads the taxa reported in a dataset (see get_taxa) and creates a phylogeny for those taxa, using the phylo class. Equal branch lengths are used. This function differs from as.phylo.formula in that it does not expect all taxonomic levels to be non NA: tips can be at different taxonomic depths. The object has internal node labels showing the taxonomic hierarchy of the phylogeny.

Usage

1

Arguments

record

A single dataset record id

Details

Note that the phylogeny will contain singleton nodes if an internal taxon has a single descendant: the ape functions has.singles and collapse.singles can be used to detect and remove these if required.

Value

An phylo object.

Examples

1
2
   beetle_phylo <- get_phylogeny(1400562)
   plot(beetle_phylo, show.node.label=TRUE, font=1, no.margin=TRUE)

ImperialCollegeLondon/safe_data documentation built on Oct. 8, 2019, 4:27 p.m.