Last data update: 2014.03.03

R: Subjects dendrogram
dendro.subjectsR Documentation

Subjects dendrogram

Description

Get dendrogram for subjects (observations) based on variables of mixed data types

Usage

dendro.subjects(data, weights)

Arguments

data

data frame

weights

optional vector of weights for variables in data

Details

Distances between subjects are based on Gower's general similarity coefficient with an extension of Podani for ordinal variables, see gowdis. In the case that all variables are quantitative, Euclidean distances are used. Then a dendrogram is derived by standard hierarchical clustering (hclust with default options).

Value

An object of class dendrogram

Author(s)

Manuela Hummel

References

Gower J (1971). A general coefficient of similarity and some of its properties. Biometrics, 27:857-871.

Podani J (1999). Extending Gower's general coefficient of similarity to ordinal characters. Taxon, 48(2):331-340.

See Also

dendro.variables, dist.subjects, mix.heatmap

Examples

data(mixdata)

dend <- dendro.subjects(mixdata)
plot(dend)

## example with weights
w <- rep(1:2, each=5)
dend <- dendro.subjects(mixdata, weights=w)
plot(dend)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(CluMix)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/CluMix/dendro.subjects.Rd_%03d_medium.png", width=480, height=480)
> ### Name: dendro.subjects
> ### Title: Subjects dendrogram
> ### Aliases: dendro.subjects
> ### Keywords: cluster
> 
> ### ** Examples
> 
> data(mixdata)
> 
> dend <- dendro.subjects(mixdata)
> plot(dend)
> 
> ## example with weights
> w <- rep(1:2, each=5)
> dend <- dendro.subjects(mixdata, weights=w)
> plot(dend)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>