spider (version 1.5.0)

tclust: Clustering by a threshold

Description

Identifies clusters, excluding individuals greater than the threshold from any member.

Usage

tclust(distobj, threshold = 0.01)

Arguments

distobj

A distance object (usually from dist.dna).

threshold

Distance cutoff for clustering. Default of 0.01 (1%).

Value

A list with each element giving the index of the individuals contained in each cluster.

Details

If two individuals are more distant than threshold from each other, but both within threshold of a third, all three are contained in a single cluster.

See Also

dist.dna, localMinima. See Also as help, ~~~

Examples

Run this code
# NOT RUN {

data(anoteropsis)
anoSpp <- sapply(strsplit(dimnames(anoteropsis)[[1]], split="_"), 
	function(x) paste(x[1], x[2], sep="_"))
anoDist <- ape::dist.dna(anoteropsis)

tclust(anoDist)

#Names of individuals
anoClust <- tclust(anoDist)
lapply(anoClust, function(x) anoSpp[x])

# }

Run the code above in your browser using DataLab