pscore | R Documentation |
Calculates the parsimony score using the Fitch algorithm.
pscore(tree, x, ...)
tree |
object of class |
x |
vector (e.g., factor vector), matrix, or data frame. Should contain names or row names. |
... |
optional arguments. |
Mostly for diagnostic purposes. Users interested in using Maximum Parsimony for phylogeny inference or ancestral state reconstruction should refer to the phangorn package.
A numerical value or vector of values.
Liam Revell liam.revell@umb.edu
Felsenstein, J. (2004) Inferring Phylogenies. Sinauer.
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
fitMk
, sim.Mk
## load tree and data from Revell & Collar (2009)
data(sunfish.tree)
data(sunfish.data)
## extract discrete character (feeding mode)
fmode<-setNames(sunfish.data$feeding.mode,
rownames(sunfish.data))
## compute the parsimony score
pscore(sunfish.tree,fmode)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.