Created
March 5, 2017 00:10
-
-
Save willpearse/18a05d3f2e6041c7a72df6feecf3e61d to your computer and use it in GitHub Desktop.
Calculating PD for managers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Loading a package | |
library(pez) | |
#Building a tree | |
tree <- read.tree("Vascular_Plants_rooted.dated.tre") #file from http://datadryad.org/resource/doi:10.5061/dryad.63q27 | |
species <- c("Quercus_notreal","Pinus_notreal","Blasia_notreal","Riccia_notreal") | |
tree <- congeneric.merge(tree, species) | |
tree <- drop.tip(tree, setdiff(tree$tip.label, species)) | |
#Calculating PD | |
c.data <- comparative.comm(tree, community.data) | |
.pd(c.data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment