data(nancycats)
nan9 <- popsub(nancycats, 9)
set.seed(9999)
# Generate a tree using nei's distance
neinan <- aboot(nan9, dist = nei.dist)
set.seed(9999)
# Generate a tree using custom distance
bindist <- function(x) dist(x$tab, method = "binary")
binnan <- aboot(nan9, dist = bindist)
# AFLP data
data(Aeut)
# Nei's distance
anei <- aboot(Aeut, dist = nei.dist, sample = 1000, cutoff = 50)
# Rogers' distance
arog <- aboot(Aeut, dist = rogers.dist, sample = 1000, cutoff = 50)
# This can also be run on genpop objects
Aeut.gc <- as.genclone(Aeut, hierarchy=other(Aeut)$population_hierarchy[-1])
setpop(Aeut.gc) <- ~Pop/Subpop
Aeut.pop <- genind2genpop(Aeut.gc)
set.seed(5000)
aboot(Aeut.pop) # compare to Grunwald et al. 2006
Run the code above in your browser using DataLab