Learn R Programming

CluMix (version 2.3.1)

distmap: Display similarity matrix

Description

Calculates and visualizes a similarity matrix for subjects or variables in an image plot

Usage

distmap(data, what = c("subjects", "variables"), variables.method = 
c("associationMeasures", "distcor"), varweights, linkage = "ward.D2", 
reorderdend, col, ...)

Arguments

data

data.frame with original data or similarity matrix

what

Shall similarity matrix of subjects or variables be visualized?; ignored if data is a similarity matrix

variables.method

method to calculate similarities if what = "variables": combination of association measures ("associationMeasures") or distance correlation ("distcor")

varweights

optional vector of variable weights, used for calculating Gower's distances between subjects; ignored if what = "associationMeasures"

linkage

agglomeration method used for hierarchical clustering; corresponds to parameter method of hclust

reorderdend

optional numeric values for reordering the dendrogram (maintaining the constraints on the dendrogram), see wts option of reorder.dendrogram

col

Color palette; defaults to blue-scale palette, where darker blue indicates higher similarity

graphical parameters passed to heatmap.2

Value

Image plots and dendrograms

Details

If data is a data.frame, the similarity matrix is calculated for subjects (if what = "subjects") or variables (if what = "variables"). Similarities for subjects are calculated by similarity.subjects. \ Similarities for variables are derived by similarity.variables. Alternatively, data can also be a previously calculated similarity matrix.

See Also

similarity.variables, dist.variables, similarity.subjects, dist.subjects, mix.heatmap

Examples

Run this code
# NOT RUN {
data(mixdata)

## subjects
distmap(mixdata, what="subjects")

# example with variable weights
w <- rep(1:2, each=5)
distmap(mixdata, what="subjects", varweights=w)

## variables
distmap(mixdata, what="variables", method="association")
distmap(mixdata, what="variables", method="distcor")
# }

Run the code above in your browser using DataLab