Skip to content

A function to compute ancestral states using phytools and make a phylomorphospace in ggplot2

Notifications You must be signed in to change notification settings

wabarr/ggphylomorpho

Repository files navigation

readme

Andrew Barr
9/18/2017

install and load package

Note: this assumes you already installed the devtools package. If you haven't you should do so using the normal R package management tools.

#devtools::install_github("wabarr/ggphylomorpho")
library(ggphylomorpho)

make example data

sampleData <- makesampledata()

plot(sampleData$tree)

head(sampleData$DF)
##              PC1       PC2 taxon  group
## AAAAA -1.6961220 -3.166955 AAAAA group1
## BBBBB -1.6417467 -3.020521 BBBBB group2
## CCCCC -1.2058984 -3.519850 CCCCC group1
## DDDDD -1.6926564 -1.302847 DDDDD group2
## EEEEE  1.1066959 -1.219074 EEEEE group1
## FFFFF  0.8772968 -1.233387 FFFFF group2

check out the documentation for the function

?ggphylomorpho

make a phylomorphospace

ggphylomorpho(tree=sampleData$tree, tipinfo=sampleData$DF)

About

A function to compute ancestral states using phytools and make a phylomorphospace in ggplot2

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages