Learn R Programming

phyreg (version 0.7)

Identifying higher nodes: Identifying higher nodes in an internal-format phylogeny

Description

The internal ID numbers of species are just their position in the main datafile, which should be the same as the order in internal, taxonomic vector and newick formats for phylogenies. Identifying higher nodes from their ID numbers can be more difficult. who allows you to name a node, or list of nodes, and a phylogeny, and it provides information to help you identify the node(s). This might be useful when looking at short regression output, or the plot from phyreg.

Usage

who(phy, nodes, find = "mm")

Arguments

phy
This is an internal-format phylogeny, as supplied in phyreg output as $fullphy for the full phylogeny or $usedphy for the reduced phylogeny (reflecting species omitted either because of the subset argument of phyreg or because of missing values). The full phylogeny will usually be the right one to use, because all the usual output uses those originalIDs, rather than the reduced ones.
nodes
an integer representing an node ID number, or a list, for example c(101,123) or 101:137. If not specified, it will be taken to be the list of all higher nodes.
find
if "sp" then all the species below the node are printed, if "mm" then the minimum and maximum of those species numbers are printed, and if "dg" (or anything else) then the IDs of the daughter nodes are printed.

Value

If find="sp" or find="dg", the results are printed out, and nothing is returned.If find="mm", a data-frame is returned with three columns: ID for the number of the higher node, minsp for the first species, and maxsp for the last species.

Details

If the species below a higher node are a contiguous set, then find="mm" (for min and max) will conveniently tell you the first and last species in that set. If your higher nodes have interdigitating sets of species, then you may need to choose "sp" to see the complete set. For drawing out your own phylogeny, find="dg" for the daughter nodes could be helpful. Examples of use are provided in phyreg

See Also

phyreg uses these phylogenies and produces the output that who can help to interpret.