R version 2.7.2 (2008-08-25) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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. > x <- array(list(100.00 + ,100.00 + ,100.00 + ,100.00 + ,100.00 + ,100.39 + ,100.37 + ,100.35 + ,100.33 + ,100.31 + ,100.15 + ,100.26 + ,100.38 + ,100.50 + ,100.61 + ,100.21 + ,100.37 + ,100.52 + ,100.68 + ,100.84 + ,100.03 + ,100.18 + ,100.34 + ,100.49 + ,100.64 + ,99.58 + ,99.78 + ,99.97 + ,100.17 + ,100.36 + ,99.40 + ,99.64 + ,99.88 + ,100.13 + ,100.37 + ,99.77 + ,100.01 + ,100.26 + ,100.50 + ,100.75 + ,100.41 + ,100.67 + ,100.93 + ,101.19 + ,101.45 + ,100.12 + ,100.50 + ,100.88 + ,101.25 + ,101.63 + ,99.83 + ,100.28 + ,100.73 + ,101.18 + ,101.63 + ,99.73 + ,100.24 + ,100.74 + ,101.25 + ,101.75 + ,98.74 + ,99.49 + ,100.25 + ,101.00 + ,101.76 + ,98.44 + ,99.36 + ,100.29 + ,101.22 + ,102.14 + ,98.79 + ,99.68 + ,100.57 + ,101.46 + ,102.35 + ,99.60 + ,100.42 + ,101.24 + ,102.05 + ,102.87 + ,99.82 + ,100.75 + ,101.69 + ,102.62 + ,103.55 + ,99.85 + ,100.87 + ,101.89 + ,102.90 + ,103.92 + ,100.01 + ,101.04 + ,102.07 + ,103.10 + ,104.13 + ,100.28 + ,101.36 + ,102.43 + ,103.51 + ,104.58 + ,100.63 + ,101.57 + ,102.51 + ,103.45 + ,104.39 + ,101.14 + ,101.93 + ,102.71 + ,103.50 + ,104.29 + ,101.51 + ,102.37 + ,103.22 + ,104.08 + ,104.93 + ,102.41 + ,103.10 + ,103.79 + ,104.48 + ,105.17 + ,102.46 + ,103.22 + ,103.99 + ,104.75 + ,105.52 + ,102.09 + ,102.96 + ,103.83 + ,104.70 + ,105.57 + ,101.99 + ,102.77 + ,103.55 + ,104.33 + ,105.11 + ,101.52 + ,102.38 + ,103.24 + ,104.11 + ,104.97 + ,102.44 + ,103.10 + ,103.77 + ,104.43 + ,105.09 + ,103.42 + ,103.90 + ,104.37 + ,104.85 + ,105.33 + ,103.63 + ,104.12 + ,104.61 + ,105.11 + ,105.60 + ,103.28 + ,103.75 + ,104.21 + ,104.68 + ,105.14 + ,103.98 + ,104.37 + ,104.77 + ,105.16 + ,105.56 + ,103.56 + ,103.94 + ,104.33 + ,104.71 + ,105.09 + ,103.42 + ,103.78 + ,104.14 + ,104.51 + ,104.87 + ,103.92 + ,104.15 + ,104.37 + ,104.59 + ,104.81 + ,103.81 + ,104.01 + ,104.20 + ,104.40 + ,104.60 + ,103.09 + ,103.33 + ,103.58 + ,103.83 + ,104.07 + ,102.60 + ,103.05 + ,103.51 + ,103.96 + ,104.41 + ,102.77 + ,103.08 + ,103.39 + ,103.71 + ,104.02 + ,102.60 + ,102.86 + ,103.11 + ,103.37 + ,103.62 + ,102.88 + ,103.08 + ,103.28 + ,103.48 + ,103.68 + ,102.17 + ,102.50 + ,102.83 + ,103.15 + ,103.48 + ,101.85 + ,102.20 + ,102.56 + ,102.91 + ,103.27 + ,101.66 + ,102.14 + ,102.62 + ,103.10 + ,103.58 + ,101.91 + ,102.28 + ,102.66 + ,103.03 + ,103.41 + ,102.13 + ,102.43 + ,102.72 + ,103.02 + ,103.31 + ,102.71 + ,102.82 + ,102.92 + ,103.02 + ,103.13 + ,103.17 + ,103.22 + ,103.26 + ,103.31 + ,103.36 + ,102.89 + ,102.95 + ,103.02 + ,103.08 + ,103.14 + ,102.94 + ,103.14 + ,103.33 + ,103.53 + ,103.73 + ,103.33 + ,103.45 + ,103.57 + ,103.68 + ,103.80 + ,103.75 + ,103.68 + ,103.61 + ,103.54 + ,103.46 + ,104.11 + ,103.98 + ,103.85 + ,103.72 + ,103.60 + ,104.77 + ,104.49 + ,104.22 + ,103.94 + ,103.67 + ,104.62 + ,104.39 + ,104.15 + ,103.92 + ,103.68 + ,105.00 + ,104.76 + ,104.52 + ,104.28 + ,104.04 + ,105.74 + ,105.51 + ,105.27 + ,105.03 + ,104.79 + ,105.94 + ,105.77 + ,105.60 + ,105.43 + ,105.26 + ,106.37 + ,106.18 + ,105.99 + ,105.80 + ,105.62 + ,106.65 + ,106.44 + ,106.23 + ,106.03 + ,105.82 + ,107.08 + ,106.74 + ,106.40 + ,106.05 + ,105.71 + ,106.77 + ,106.51 + ,106.25 + ,106.00 + ,105.74 + ,107.21 + ,106.97 + ,106.74 + ,106.50 + ,106.26 + ,107.34 + ,107.15 + ,106.96 + ,106.78 + ,106.59 + ,107.12 + ,106.93 + ,106.74 + ,106.55 + ,106.36 + ,106.86 + ,106.73 + ,106.59 + ,106.46 + ,106.33 + ,106.92 + ,106.78 + ,106.65 + ,106.51 + ,106.37 + ,106.95 + ,106.75 + ,106.56 + ,106.36 + ,106.17 + ,107.23 + ,106.96 + ,106.69 + ,106.42 + ,106.16 + ,106.94 + ,106.80 + ,106.66 + ,106.51 + ,106.37 + ,106.62 + ,106.51 + ,106.40 + ,106.29 + ,106.18 + ,105.94 + ,105.97 + ,105.99 + ,106.01 + ,106.03 + ,105.91 + ,105.95 + ,105.99 + ,106.03 + ,106.08 + ,106.52 + ,106.45 + ,106.38 + ,106.31 + ,106.24 + ,106.85 + ,106.63 + ,106.41 + ,106.19 + ,105.97 + ,107.22 + ,106.99 + ,106.75 + ,106.52 + ,106.28 + ,107.28 + ,107.09 + ,106.90 + ,106.71 + ,106.52 + ,107.86 + ,107.57 + ,107.29 + ,107.00 + ,106.72 + ,107.68 + ,107.46 + ,107.24 + ,107.02 + ,106.80 + ,108.07 + ,107.82 + ,107.56 + ,107.31 + ,107.06 + ,107.87 + ,107.66 + ,107.45 + ,107.23 + ,107.02 + ,107.65 + ,107.50 + ,107.35 + ,107.19 + ,107.04 + ,108.16 + ,107.89 + ,107.63 + ,107.36 + ,107.09 + ,108.60 + ,108.24 + ,107.88 + ,107.51 + ,107.15 + ,108.92 + ,108.57 + ,108.21 + ,107.86 + ,107.50 + ,109.66 + ,109.22 + ,108.78 + ,108.34 + ,107.90 + ,109.87 + ,109.40 + ,108.94 + ,108.48 + ,108.02 + ,109.54 + ,109.10 + ,108.66 + ,108.22 + ,107.78 + ,109.06 + ,108.72 + ,108.38 + ,108.04 + ,107.70) + ,dim=c(5 + ,90) + ,dimnames=list(c('IND90_UT10' + ,'IND70_UT30' + ,'IND50_UT50' + ,'IND30_UT70' + ,'IND10_UT90') + ,1:90)) > y <- array(NA,dim=c(5,90),dimnames=list(c('IND90_UT10','IND70_UT30','IND50_UT50','IND30_UT70','IND10_UT90'),1:90)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par4 = 'FALSE' > par3 = 'FALSE' > par2 = 'ALL' > par1 = 'mcquitty' > ylab = 'height' > xlab = 'cases' > main = 'Dendrogram' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > par3 <- as.logical(par3) > par4 <- as.logical(par4) > if (par3 == 'TRUE'){ + dum = xlab + xlab = ylab + ylab = dum + } > x <- t(y) > hc <- hclust(dist(x),method=par1) > d <- as.dendrogram(hc) > str(d) --[dendrogram w/ 2 branches and 90 members at h = 11.5] |--[dendrogram w/ 2 branches and 33 members at h = 4.88] | |--[dendrogram w/ 2 branches and 21 members at h = 2.02] | | |--[dendrogram w/ 2 branches and 16 members at h = 1.01] | | | |--[dendrogram w/ 2 branches and 6 members at h = 0.644] | | | | |--[dendrogram w/ 2 branches and 2 members at h = 0.134] | | | | | |--leaf "72" | | | | | `--leaf "75" | | | | `--[dendrogram w/ 2 branches and 4 members at h = 0.44] | | | | |--leaf "62" | | | | `--[dendrogram w/ 2 branches and 3 members at h = 0.382] | | | | |--leaf "76" | | | | `--[dendrogram w/ 2 branches and 2 members at h = 0.164] | | | | |--leaf "61" | | | | `--leaf "63" | | | `--[dendrogram w/ 2 branches and 10 members at h = 0.645] | | | |--[dendrogram w/ 2 branches and 2 members at h = 0.144] | | | | |--leaf "65" | | | | `--leaf "78" | | | `--[dendrogram w/ 2 branches and 8 members at h = 0.403] | | | |--[dendrogram w/ 2 branches and 4 members at h = 0.212] | | | | |--leaf "70" | | | | `--[dendrogram w/ 2 branches and 3 members at h = 0.147] | | | | |--leaf "66" | | | | `--[dendrogram w/ 2 branches and 2 members at h = 0.0374] | | | | |--leaf "64" | | | | `--leaf "77" | | | `--[dendrogram w/ 2 branches and 4 members at h = 0.242] | | | |--leaf "69" | | | `--[dendrogram w/ 2 branches and 3 members at h = 0.13] | | | |--leaf "67" | | | `--[dendrogram w/ 2 branches and 2 members at h = 0.03] | | | |--leaf "68" | | | `--leaf "71" | | `--[dendrogram w/ 2 branches and 5 members at h = 1.35] | | |--[dendrogram w/ 2 branches and 3 members at h = 0.696] | | | |--leaf "60" | | | `--[dendrogram w/ 2 branches and 2 members at h = 0.0648] | | | |--leaf "73" | | | `--leaf "74" | | `--[dendrogram w/ 2 branches and 2 members at h = 0.773] | | |--leaf "58" | | `--leaf "59" | `--[dendrogram w/ 2 branches and 12 members at h = 2.42] | |--[dendrogram w/ 2 branches and 3 members at h = 0.502] | | |--leaf "88" | | `--[dendrogram w/ 2 branches and 2 members at h = 0.268] | | |--leaf "87" | | `--leaf "89" | `--[dendrogram w/ 2 branches and 9 members at h = 1.46] | |--[dendrogram w/ 2 branches and 6 members at h = 0.628] | | |--[dendrogram w/ 2 branches and 2 members at h = 0.146] | | | |--leaf "81" | | | `--leaf "84" | | `--[dendrogram w/ 2 branches and 4 members at h = 0.409] | | |--[dendrogram w/ 2 branches and 2 members at h = 0.232] | | | |--leaf "79" | | | `--leaf "80" | | `--[dendrogram w/ 2 branches and 2 members at h = 0.293] | | |--leaf "82" | | `--leaf "83" | `--[dendrogram w/ 2 branches and 3 members at h = 0.94] | |--leaf "85" | `--[dendrogram w/ 2 branches and 2 members at h = 0.379] | |--leaf "86" | `--leaf "90" `--[dendrogram w/ 2 branches and 57 members at h = 6.03] |--[dendrogram w/ 2 branches and 19 members at h = 3.21] | |--[dendrogram w/ 2 branches and 4 members at h = 1.43] | | |--leaf "16" | | `--[dendrogram w/ 2 branches and 3 members at h = 0.716] | | |--leaf "17" | | `--[dendrogram w/ 2 branches and 2 members at h = 0.414] | | |--leaf "18" | | `--leaf "19" | `--[dendrogram w/ 2 branches and 15 members at h = 2.2] | |--[dendrogram w/ 2 branches and 8 members at h = 0.996] | | |--[dendrogram w/ 2 branches and 3 members at h = 0.715] | | | |--leaf "1" | | | `--[dendrogram w/ 2 branches and 2 members at h = 0.249] | | | |--leaf "6" | | | `--leaf "7" | | `--[dendrogram w/ 2 branches and 5 members at h = 0.725] | | |--leaf "2" | | `--[dendrogram w/ 2 branches and 4 members at h = 0.536] | | |--leaf "8" | | `--[dendrogram w/ 2 branches and 3 members at h = 0.384] | | |--leaf "4" | | `--[dendrogram w/ 2 branches and 2 members at h = 0.153] | | |--leaf "3" | | `--leaf "5" | `--[dendrogram w/ 2 branches and 7 members at h = 1.77] | |--[dendrogram w/ 2 branches and 4 members at h = 0.634] | | |--[dendrogram w/ 2 branches and 2 members at h = 0.176] | | | |--leaf "11" | | | `--leaf "12" | | `--[dendrogram w/ 2 branches and 2 members at h = 0.389] | | |--leaf "9" | | `--leaf "10" | `--[dendrogram w/ 2 branches and 3 members at h = 0.737] | |--leaf "15" | `--[dendrogram w/ 2 branches and 2 members at h = 0.549] | |--leaf "13" | `--leaf "14" `--[dendrogram w/ 2 branches and 38 members at h = 3.29] |--[dendrogram w/ 2 branches and 15 members at h = 2.15] | |--[dendrogram w/ 2 branches and 7 members at h = 1.09] | | |--[dendrogram w/ 2 branches and 2 members at h = 0.0557] | | | |--leaf "23" | | | `--leaf "28" | | `--[dendrogram w/ 2 branches and 5 members at h = 0.721] | | |--leaf "27" | | `--[dendrogram w/ 2 branches and 4 members at h = 0.585] | | |--[dendrogram w/ 2 branches and 2 members at h = 0.101] | | | |--leaf "24" | | | `--leaf "29" | | `--[dendrogram w/ 2 branches and 2 members at h = 0.485] | | |--leaf "25" | | `--leaf "26" | `--[dendrogram w/ 2 branches and 8 members at h = 1.72] | |--[dendrogram w/ 2 branches and 5 members at h = 0.538] | | |--[dendrogram w/ 2 branches and 2 members at h = 0.254] | | | |--leaf "43" | | | `--leaf "47" | | `--[dendrogram w/ 2 branches and 3 members at h = 0.381] | | |--leaf "45" | | `--[dendrogram w/ 2 branches and 2 members at h = 0.232] | | |--leaf "44" | | `--leaf "46" | `--[dendrogram w/ 2 branches and 3 members at h = 0.886] | |--leaf "22" | `--[dendrogram w/ 2 branches and 2 members at h = 0.461] | |--leaf "20" | `--leaf "21" `--[dendrogram w/ 2 branches and 23 members at h = 2.29] |--[dendrogram w/ 2 branches and 12 members at h = 1.47] | |--[dendrogram w/ 2 branches and 2 members at h = 0.574] | | |--leaf "53" | | `--leaf "54" | `--[dendrogram w/ 2 branches and 10 members at h = 1.1] | |--[dendrogram w/ 2 branches and 7 members at h = 0.775] | | |--[dendrogram w/ 2 branches and 4 members at h = 0.564] | | | |--leaf "41" | | | `--[dendrogram w/ 2 branches and 3 members at h = 0.415] | | | |--leaf "40" | | | `--[dendrogram w/ 2 branches and 2 members at h = 0.121] | | | |--leaf "42" | | | `--leaf "51" | | `--[dendrogram w/ 2 branches and 3 members at h = 0.674] | | |--leaf "49" | | `--[dendrogram w/ 2 branches and 2 members at h = 0.251] | | |--leaf "48" | | `--leaf "50" | `--[dendrogram w/ 2 branches and 3 members at h = 0.873] | |--leaf "39" | `--[dendrogram w/ 2 branches and 2 members at h = 0.409] | |--leaf "38" | `--leaf "52" `--[dendrogram w/ 2 branches and 11 members at h = 2.10] |--[dendrogram w/ 2 branches and 3 members at h = 0.754] | |--leaf "57" | `--[dendrogram w/ 2 branches and 2 members at h = 0.195] | |--leaf "55" | `--leaf "56" `--[dendrogram w/ 2 branches and 8 members at h = 1.09] |--[dendrogram w/ 2 branches and 2 members at h = 0.463] | |--leaf "31" | `--leaf "33" `--[dendrogram w/ 2 branches and 6 members at h = 0.73] |--[dendrogram w/ 2 branches and 2 members at h = 0.375] | |--leaf "36" | `--leaf "37" `--[dendrogram w/ 2 branches and 4 members at h = 0.442] |--[dendrogram w/ 2 branches and 2 members at h = 0.316] | |--leaf "30" | `--leaf "34" `--[dendrogram w/ 2 branches and 2 members at h = 0.357] |--leaf "32" `--leaf "35" > mysub <- paste('Method: ',par1) > postscript(file="/var/www/html/rcomp/tmp/1ako31225884811.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > if (par4 == 'TRUE'){ + plot(d,main=main,ylab=ylab,xlab=xlab,horiz=par3, nodePar=list(pch = c(1,NA), cex=0.8, lab.cex = 0.8),type='t',center=T, sub=mysub) + } else { + plot(d,main=main,ylab=ylab,xlab=xlab,horiz=par3, nodePar=list(pch = c(1,NA), cex=0.8, lab.cex = 0.8), sub=mysub) + } > dev.off() null device 1 > if (par2 != 'ALL'){ + if (par3 == 'TRUE'){ + ylab = 'cluster' + } else { + xlab = 'cluster' + } + par2 <- as.numeric(par2) + memb <- cutree(hc, k = par2) + cent <- NULL + for(k in 1:par2){ + cent <- rbind(cent, colMeans(x[memb == k, , drop = FALSE])) + } + hc1 <- hclust(dist(cent),method=par1, members = table(memb)) + de <- as.dendrogram(hc1) + postscript(file="/var/www/html/rcomp/tmp/2mvz11225884811.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + if (par4 == 'TRUE'){ + plot(de,main=main,ylab=ylab,xlab=xlab,horiz=par3, nodePar=list(pch = c(1,NA), cex=0.8, lab.cex = 0.8),type='t',center=T, sub=mysub) + } else { + plot(de,main=main,ylab=ylab,xlab=xlab,horiz=par3, nodePar=list(pch = c(1,NA), cex=0.8, lab.cex = 0.8), sub=mysub) + } + dev.off() + str(de) + } > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Summary of Dendrogram',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Label',header=TRUE) > a<-table.element(a,'Height',header=TRUE) > a<-table.row.end(a) > num <- length(x[,1])-1 > for (i in 1:num) + { + a<-table.row.start(a) + a<-table.element(a,hc$labels[i]) + a<-table.element(a,hc$height[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3tpu91225884811.tab") > if (par2 != 'ALL'){ + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Summary of Cut Dendrogram',2,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Label',header=TRUE) + a<-table.element(a,'Height',header=TRUE) + a<-table.row.end(a) + num <- par2-1 + for (i in 1:num) + { + a<-table.row.start(a) + a<-table.element(a,i) + a<-table.element(a,hc1$height[i]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/4hfon1225884811.tab") + } > > system("convert tmp/1ako31225884811.ps tmp/1ako31225884811.png") > system("convert tmp/2mvz11225884811.ps tmp/2mvz11225884811.png") convert: unable to open image `tmp/2mvz11225884811.ps': No such file or directory. convert: missing an image filename `tmp/2mvz11225884811.png'. > > > proc.time() user system elapsed 0.927 0.195 1.114