shipunov (version 1.13)

BootA: Bootstrap clustering

Description

How to bootstrap clustering with 'ape'

Usage

BootA(dat, FUN=function(.x) ape::nj(dist(.x)), iter=1000, mc.cores=1, tresh=50,
 cons=TRUE, prop=0.5)

Arguments

dat

data

FUN

how to bootstrap (see examples)

iter

number of iterations, default 1000

mc.cores

how many cores to employ (system-dependent)

tresh

Threshold for printing bootstrap values

cons

Calculate consensus tree?

prop

0.5 is majority-rule consensus (default), 1 is strict consensus

Details

This is how to bootstrap clustering with 'ape::boot.phylo()'.

See Also

Bclust, BootA, ape::boot.phylo

Examples

Run this code
# NOT RUN {
dat <- iris[, -5]
row.names(dat) <- abbreviate(make.names(iris[, 5], unique=TRUE))
iris.BA1 <- BootA(dat, iter=100)
plot(iris.BA1$boot.tree, show.node.label=TRUE)
plot(iris.BA1$cons.tree)
iris.BA2 <- BootA(dat, FUN=function(.x) ape::as.phylo(hclust(dist(.x))), iter=100)
# }
# NOT RUN {
## change (or remove) 'mc.cores=...' in accordance with your system features
iris.BA3 <- BootA(dat, FUN=function(.x) phangorn::NJ(dist(.x)), iter=100,
 mc.cores=4)
# }

Run the code above in your browser using DataLab