checkPhylo4: Validity checking for phylo4 objects

Description Usage Arguments Value Note Author(s) See Also

View source: R/checkdata.R


Basic checks on the validity of S4 phylogenetic objects





A prospective phylo4 or phylo4d object


As required by validObject, returns an error string (describing problems) or TRUE if everything is OK.


These functions are only intended to be called by other phylobase functions.

checkPhylo4 is an (inflexible) wrapper for checkTree. The rules for phylo4 objects essentially follow those for phylo objects from the ape package, which are in turn defined in These are essentially that:

You can alter some of the default options by using the function phylobase.options.

For phylo4d objects, checkTree also calls checkPhylo4Data to check the validity of the data associated with the tree. It ensures that (1) the data associated with the tree have the correct dimensions, (2) that the row names for the data are correct.


Ben Bolker, Steven Kembel, Francois Michonneau

See Also

the phylo4 constructor and phylo4 class; the phylo4d-methods constructor and the phylo4d class do checks for the data associated with trees. See coerce-methods for translation functions and phylobase.options to change some of the default options of the validator.

phylobase documentation built on March 26, 2020, 7:44 p.m.