prey.cluster: Produces a dendrogram using distances between the mean FA...

View source: R/Prey_Cluster.R

prey.clusterR Documentation

Produces a dendrogram using distances between the mean FA signatures of the prey types.

Description

Performs a hierarchical cluster analysis of mean prey fatty acid signatures using function hclust.

Usage

prey.cluster(prey.fa, method = "complete", dist.meas = 2)

Arguments

prey.fa

data frame of prey fatty acid signature samples. First column must be species used to group samples. Other columns are assumed to be fatty acid proportions.

method

the agglomeration method to be used. This should be one of the possible methods in hclust such as "single", "complete" or "average". Default is "complete".

dist.meas

distance measure to use for calculating dissimilarities: 1=KL, 2=AIT or 3=CS. Default is AIT.

Value

Plot (dendrogram)

Examples


## Fatty Acids
data(FAset)
fa.set = as.vector(unlist(FAset))

## prey.cluster requires full prey database.
data(preyFAs)
prey.sub=(preyFAs[,4:(ncol(preyFAs))])[fa.set]
prey.sub=prey.sub/apply(prey.sub,1,sum)
group=as.vector(preyFAs$Species)
prey.matrix=cbind(group,prey.sub)

prey.cluster(prey.matrix,method="average",dist.meas=3)

QFASA documentation built on Nov. 17, 2023, 1:08 a.m.