cluster.RMSD: Plot a cluster dendrogram of RMSD data frame

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/cluster.RMSD.R

Description

Plot a cluster dendrogram of RMSD data frame

Usage

1
cluster.RMSD(RMSD, method = "ward.D")

Arguments

RMSD

RMSD data frame obtained with the function RMSD.idturtle

method

Method of clustering. See help of hclust function in package stats

Value

Plot a clustering dendrogram using the RMSD values among pairs as the dissimilitude index. It also returns an object of the class 'hclust'

Note

This function only prepare data to make an hclust analysis (package stats) and plot it. It is useful to visually see what turtles are similar among them and to detect some different measure which can be an error

Author(s)

Aitor Valdeon

See Also

hclust

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#Charge and prepare example data
data(data.comp,data.ref)
comp<-data.comp[1:20,]
ref<-data.comp[!(1:nrow(data.comp)),]
cont<-0
repeat{
  cont<-cont+1
  r<-data.ref[data.ref$ID==comp[cont,c("ID")],]
  ref<-rbind(ref,r)
  if(cont==20){
    break
  }
}
data.RMSD<-rbind(comp,ref)
#Delete non-interesting objects for this action
rm(cont,r,data.comp,data.ref,comp,ref)
#Execute RMSD.idturtle. Column date in data.RMSD is named in spanish (Fecha)
RMSD<-RMSD.idturtle(data.RMSD,date="Fecha")
#Plot cluster dendrogram
cluster.RMSD(RMSD)

Example output

[1] "Calculating ratios from raw data"
[1] "Ratios calculated"
[1] "Comparing turtles"
[1] "Comparing turtle 1 with the rest"
[1] "Comparing turtle 2 with the rest"
[1] "Comparing turtle 3 with the rest"
[1] "Comparing turtle 4 with the rest"
[1] "Comparing turtle 5 with the rest"
[1] "Comparing turtle 6 with the rest"
[1] "Comparing turtle 7 with the rest"
[1] "Comparing turtle 8 with the rest"
[1] "Comparing turtle 9 with the rest"
[1] "Comparing turtle 10 with the rest"
[1] "Comparing turtle 11 with the rest"
[1] "Comparing turtle 12 with the rest"
[1] "Comparing turtle 13 with the rest"
[1] "Comparing turtle 14 with the rest"
[1] "Comparing turtle 15 with the rest"
[1] "Comparing turtle 16 with the rest"
[1] "Comparing turtle 17 with the rest"
[1] "Comparing turtle 18 with the rest"
[1] "Comparing turtle 19 with the rest"
[1] "Comparing turtle 20 with the rest"
[1] "Comparing turtle 21 with the rest"
[1] "Comparing turtle 22 with the rest"
[1] "Comparing turtle 23 with the rest"
[1] "Comparing turtle 24 with the rest"
[1] "Comparing turtle 25 with the rest"
[1] "Comparing turtle 26 with the rest"
[1] "Comparing turtle 27 with the rest"
[1] "Comparing turtle 28 with the rest"
[1] "Comparing turtle 29 with the rest"
[1] "Comparing turtle 30 with the rest"
[1] "Comparing turtle 31 with the rest"
[1] "Comparing turtle 32 with the rest"
[1] "Comparing turtle 33 with the rest"
[1] "Comparing turtle 34 with the rest"
[1] "Comparing turtle 35 with the rest"
[1] "Comparing turtle 36 with the rest"
[1] "Comparing turtle 37 with the rest"
[1] "Comparing turtle 38 with the rest"
[1] "Comparing turtle 39 with the rest"
[1] "Comparing turtle 40 with the rest"
[1] "Comparing turtle 41 with the rest"
[1] "Comparing turtle 42 with the rest"
[1] "Comparing turtle 43 with the rest"
[1] "Comparing turtle 44 with the rest"
[1] "Comparing turtle 45 with the rest"
[1] "Comparing turtle 46 with the rest"
[1] "Comparing turtle 47 with the rest"
[1] "Comparing turtle 48 with the rest"
[1] "Comparing turtle 49 with the rest"
[1] "Comparing turtle 50 with the rest"
[1] "Comparing turtle 51 with the rest"
[1] "Comparing turtle 52 with the rest"
[1] "Comparing turtle 53 with the rest"
[1] "Comparing turtle 54 with the rest"
[1] "Comparing turtle 55 with the rest"
[1] "Comparing turtle 56 with the rest"
[1] "Done"

Call:
hclust(d = RMSD, method = method)

Cluster method   : ward.D 
Number of objects: 56 

IDTurtle documentation built on May 30, 2017, 7:39 a.m.