BootA: Bootstrap clustering

View source: R/aaa.r

BootAR Documentation

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()'.

Author(s)

Alexey Shipunov

See Also

Bclust, BootA, ape::boot.phylo

Examples

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)

## End(Not run)

shipunov documentation built on Feb. 16, 2023, 9:05 p.m.

Related to BootA in shipunov...