Learn R Programming

IDTurtle (version 1.2)

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

Description

Plot a cluster dendrogram of RMSD data frame

Usage

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'

See Also

hclust

Examples

Run this code
#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)

Run the code above in your browser using DataLab