fitch: Fitch parsimony score

Description Usage Arguments Value Examples

View source: R/tree_helpers.R

Description

Fitch parsimony score

Usage

1
fitch(phy, states)

Arguments

phy

tree

states

named state vector (typically the estimated z-scores)

Value

Fitch parsimony score

Examples

1
2
3
4
5
nwk <- "(((t4:8,(t6:5,t5:5):3):66,t2:74):40,(t7:39,(t1:10,t3:10):29):75);"
tree <- ape::read.tree(text = nwk)
states <- c(t1 = "A", t2 = "B", t3 = "A", t4 = "C",
            t5 = "C", t6 = "C", t7 = "A")
fitch(tree, states) ## 2

abichat/zazou documentation built on Sept. 8, 2021, 6:53 a.m.