TreeSearch (version 0.4.0)

Fitch: Calculate parsimony score with inapplicable data

Description

Uses code modified from the Morphy library to calculate a parsimony score in datasets that contain inapplicable data.

Usage

Fitch(tree, dataset)

Arguments

tree

A tree of class phylo.

dataset

A phylogenetic data matrix of class phyDat, whose names correspond to the labels of any accompanying tree.

Value

This function returns the elements from a list containing:

  • The total parsimony score

  • The parsimony score associated with each character

  • A matrix comprising character reconstructions for each node after the final pass

The elements to return are specified by the parameter detail. If a single element is requested (default) then just that element will be returned If multiple elements are requested then these will be returned in a list.

See Also

Other tree scoring: CharacterLength, IWScore, MorphyTreeLength

Examples

Run this code
# NOT RUN {
data('inapplicable.datasets')
tree <- TreeTools::RandomTree(inapplicable.phyData[[1]])
result <- Fitch(tree, inapplicable.phyData[[1]])

# }

Run the code above in your browser using DataLab