check_phylogeny: Check if the phylogeny is a valid phylogeny object.

Description Usage Arguments Value Author(s) See Also Examples

Description

Calls stop if the phylogeny is invalid

Usage

1
check_phylogeny(phylogeny)

Arguments

phylogeny

a phylogeny of type phylo

Value

nothing

Author(s)

Richèl J.C. Bilderbeek

See Also

Use read.tree to create a phylogeny

Examples

1
2
3
4
5
6
7
 phylogeny <- ape::read.tree(text = "(A:1, B:1):1;")
 testthat::expect_silent(check_phylogeny(phylogeny))

 # Must stop on non-phylogenies
 testthat::expect_error(check_phylogeny(phylo = "nonsense"))
 testthat::expect_error(check_phylogeny(phylo = NULL))
 testthat::expect_error(check_phylogeny(phylo = NA))

ropensci/beautier documentation built on May 14, 2019, 8:52 p.m.