get.fitch.n.mts | R Documentation |
Determine parsimony scores for all genetic loci, or a phenotypic variable, along a given tree. An extension of the fitch function available in package phangorn.
get.fitch.n.mts(x, tree, snps = NULL)
x |
A numeric matrix or vector containing two unique values with row.names matching tree tip.labels. |
tree |
A phylo object. |
Caitlin Collins caitiecollins@gmail.com
## Not run:
## generate a tree
tree <- ape::rtree(100)
## generate snps, a matrix of 0s and 1s
snps <- matrix(sample(c(0,1),100000,TRUE), nrow=100)
row.names(snps) <- tree$tip.label
## run function
out <- get.fitch.n.mts(x=snps, tree)
## examine output
str(out)
table(out)
hist(out)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.