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

Description Usage Arguments Value Examples

View source: R/Prey_Cluster.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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 July 21, 2021, 1:06 a.m.