isMultiPhylo: Rboretum MultiPhylo Checker

View source: R/isMultiPhylo.R

isMultiPhyloR Documentation

Rboretum MultiPhylo Checker

Description

This function returns TRUE if the passed object is of class multiPhylo and has 2+ trees; Otherwise, FALSE

Usage

isMultiPhylo(
  test_object,
  check_named,
  check_rooted,
  check_three_taxa,
  check_all_taxa,
  check_all_equal,
  check_some_equal,
  check_all_unique
)

Arguments

test_object

R object to check

check_named

OPTIONAL: If TRUE, also check if trees are named. [Default: FALSE, don't check names]

check_rooted

OPTIONAL: If TRUE, also check if all trees are rooted. [Default: FALSE, don't check rootedness]

check_three_taxa

OPTIONAL: If TRUE, also check if all trees share at least three taxa. [Default: FALSE, don't check taxa]

check_all_taxa

OPTIONAL: If TRUE, also check if all trees share all taxa. [Default: FALSE, don't check taxa]

check_all_equal

OPTIONAL: If TRUE, also check whether all trees have one, shared topology after pruning to a common set of taxa [Default: FALSE, don't check topology]

check_some_equal

OPTIONAL: If TRUE, also check whether some, but not all, trees share a topology after pruning to a common set of taxa [Default: FALSE, don't check topology]

check_all_unique

OPTIONAL: If TRUE, also check whether all trees have a unique topology after pruning to a common set of taxa [Default: FALSE, don't check topology]

Value

TRUE if 'test_object' is a multiPhylo with 2+ trees; otherwise, FALSE

Examples

isMultiPhylo(myTrees) # Check if 'myTrees' is a valid multiPhylo object with 2+ trees
isMultiPhylo(myTrees,check_named=TRUE) # Check if 'myTrees' is a valid multiPhylo object with 2+ trees, and that all trees have names
isMultiPhylo(myTrees,check_rooted=TRUE) # Check if 'myTrees' is a valid multiPhylo object with 2+ trees, and that all trees are rooted
isMultiPhylo(myTrees,check_three_taxa) # Check if 'myTrees' is a valid multiPhylo object with 2+ trees, and that all trees share at least three taxa
isMultiPhylo(myTrees,check_all_taxa) # Check if 'myTrees' is a valid multiPhylo object with 2+ trees, and that all trees share all taxa

BobLiterman/Rboretum documentation built on July 6, 2023, 7:46 p.m.