Learn R Programming

RAM (version 1.2.0)

dissim: Calculate Dissimilarity Matrix Data

Description

These functions calculate different measures related to dissimilarity matrices. All of these functions allow you to specify one of many dissimilarity indices to be used.

Usage

dissim.clust(elem, is.OTU=TRUE, stand.method=NULL, 
             dist.method="morisita", clust.method="average")
dissim.eig(elem, is.OTU=TRUE, stand.method=NULL, 
           dist.method="morisita")
dissim.ord(elem, is.OTU=TRUE, stand.method=NULL,          
           dist.method="morisita", k=NULL)
dissim.GOF(elem, is.OTU=TRUE, stand.method=NULL, 
           dist.method="morisita")
dissim.tree(elem, is.OTU=TRUE, stand.method=NULL, 
           dist.method="morisita", clust.method="average")
dissim.pvar(elem, is.OTU=TRUE, stand.method=NULL, 
            dist.method="morisita")

Arguments

elem
an ecology data set that can be an OTU table or a taxonomy abundance table. See RAM.input.formatting for details.
is.OTU
logical, whether the ecology data sets are OTU tables or taxonomy abundance matrices. See RAM.input.formatting for details.
stand.method
optional, if is.null, the standardization method for data transforamtion; must be one of the following: "total", "max", "frequency", "normalize", "range", "standardize", "pa", "chi.square", "hellinger", "log". See also
dist.method
the dissimilarity index to be used; one of "manhattan", "euclidean", "canberra", "bray", "kulczynski", "jaccard", "gower", "altGower","morisita
k
the number of dimensions desired. If NULL, the maximum value will be calculated and used.
clust.method
the method used for clustering the data. Must be one of "ward", "single", "complete", "average", "mcquitty", "median", or "centroid". See also

Value

  • dissim.clustreturns a hierarchical clustering of the dissimilarity matrix.
  • dist.eigenvalreturns the eigenvalues of the dissimilarity matrix.
  • dissim.ordreturns a list: the first item is the the ordination distances, the second is the dissimilarity matrix distances.
  • dissim.GOFreturns the goodness of fit values of the dissimilarity matrix, for various numbers of dimensions used.
  • dissim.treereturns a list: the first item is the tree distances, the second is the dissimilarity matrix distances.
  • dissim.pvarreturns a numeric vector containing the percent variation explained by each axis (where each sample corresponds to an axis).

See Also

decostand, vegdist, hclust, dissim.plot

Examples

Run this code
data(ITS1)

# calculate clustering, using default method
dissim.clust(ITS1)

# calculate tree distances, specifying a distance method
# (but use default clustering method)
dissim.tree(ITS1, dist.method="euclidean")

# calcualte ordination distances, specifying both distance 
# and ordination methods
dissim.ord(ITS1, dist.method="bray", k=3)

Run the code above in your browser using DataLab