prey.cluster | R Documentation |
Performs a hierarchical cluster analysis of mean prey
fatty acid signatures using function hclust
.
prey.cluster(prey.fa, method = "complete", dist.meas = 2)
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 |
dist.meas |
distance measure to use for calculating dissimilarities:
1=KL, 2=AIT or 3=CS. Default is |
Plot (dendrogram)
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.