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 + ,100.3923915 + ,100.1469782 + ,100.2098364 + ,100.0333368 + ,99.58139317 + ,99.39752752 + ,99.77055523 + ,100.4100072 + ,100.1209892 + ,99.8346969 + ,99.73194308 + ,98.73507379 + ,98.43547688 + ,98.79352302 + ,99.60036697 + ,99.81912681 + ,99.85207285 + ,100.0149717 + ,100.2797274 + ,100.6265776 + ,101.1422532 + ,101.5114142 + ,102.406627 + ,102.4606437 + ,102.0859567 + ,101.9940832 + ,101.5227632 + ,102.4432499 + ,103.4183267 + ,103.6255915 + ,103.2809714 + ,103.9780125 + ,103.5614473 + ,103.4197679 + ,103.9249756 + ,103.8076496 + ,103.0867986 + ,102.5976695 + ,102.7651032 + ,102.604037 + ,102.8773928 + ,102.1741797 + ,101.8458687 + ,101.6623145 + ,101.9063562 + ,102.1328259 + ,102.7144129 + ,103.1725678 + ,102.8857222 + ,102.9393164 + ,103.3310852 + ,103.7529739 + ,104.1061803 + ,104.7656382 + ,104.6198755 + ,105.0019469 + ,105.7440415 + ,105.943346 + ,106.3702433 + ,106.6488737 + ,107.0807262 + ,106.7678311 + ,107.2100093 + ,107.3365011 + ,107.1157028 + ,106.8593784 + ,106.9207067 + ,106.9469724 + ,107.2281119 + ,106.9434167 + ,106.6173439 + ,105.9426599 + ,105.9096294 + ,106.5152012 + ,106.8456317 + ,107.2230793 + ,107.2840665 + ,107.8586282 + ,107.6796042 + ,108.0663273 + ,107.8699207 + ,107.6501918 + ,108.1600089 + ,108.5993711 + ,108.9244395 + ,109.6604091 + ,109.8659127 + ,109.5385803 + ,109.0590287 + ,100 + ,100.3728036 + ,100.2631251 + ,100.367031 + ,100.1846801 + ,99.77715805 + ,99.6404484 + ,100.0144309 + ,100.6711968 + ,100.4984384 + ,100.283058 + ,100.2372748 + ,99.49043439 + ,99.36214414 + ,99.68271512 + ,100.4183042 + ,100.7528364 + ,100.868608 + ,101.0440264 + ,101.3556712 + ,101.5664504 + ,101.9280922 + ,102.3666775 + ,103.0964279 + ,103.2246107 + ,102.9557241 + ,102.7732406 + ,102.3837901 + ,103.1046956 + ,103.8962307 + ,104.1200756 + ,103.7466454 + ,104.3729699 + ,103.9445764 + ,103.7820166 + ,104.1461223 + ,104.0058181 + ,103.3334668 + ,103.0514655 + ,103.0796137 + ,102.8588901 + ,103.0777974 + ,102.5006944 + ,102.2015936 + ,102.1420163 + ,102.2814503 + ,102.4274338 + ,102.8174718 + ,103.2182252 + ,102.950381 + ,103.1365657 + ,103.4482345 + ,103.6809205 + ,103.9785047 + ,104.4920792 + ,104.3850052 + ,104.7607192 + ,105.5052723 + ,105.7729705 + ,106.1815606 + ,106.4416895 + ,106.7381355 + ,106.5106808 + ,106.973578 + ,107.1498448 + ,106.9277366 + ,106.726053 + ,106.7830327 + ,106.7517596 + ,106.9601497 + ,106.8003646 + ,106.507976 + ,105.9656565 + ,105.9512345 + ,106.4470914 + ,106.6255458 + ,106.9873891 + ,107.0941481 + ,107.5731776 + ,107.4594563 + ,107.815257 + ,107.6578565 + ,107.4982245 + ,107.8930918 + ,108.2374694 + ,108.569179 + ,109.2191526 + ,109.4038454 + ,109.0992088 + ,108.7189329 + ,100 + ,100.3532156 + ,100.379272 + ,100.5242257 + ,100.3360234 + ,99.97292293 + ,99.88336928 + ,100.2583066 + ,100.9323864 + ,100.8758876 + ,100.7314192 + ,100.7426066 + ,100.245795 + ,100.2888114 + ,100.5719072 + ,101.2362414 + ,101.6865461 + ,101.8851432 + ,102.0730811 + ,102.431615 + ,102.5063233 + ,102.7139311 + ,103.2219408 + ,103.7862288 + ,103.9885777 + ,103.8254915 + ,103.552398 + ,103.244817 + ,103.7661413 + ,104.3741347 + ,104.6145597 + ,104.2123194 + ,104.7679272 + ,104.3277056 + ,104.1442653 + ,104.367269 + ,104.2039865 + ,103.580135 + ,103.5052616 + ,103.3941242 + ,103.1137432 + ,103.278202 + ,102.8272091 + ,102.5573185 + ,102.621718 + ,102.6565444 + ,102.7220417 + ,102.9205307 + ,103.2638825 + ,103.0150398 + ,103.333815 + ,103.5653838 + ,103.6088671 + ,103.8508291 + ,104.2185202 + ,104.150135 + ,104.5194915 + ,105.2665031 + ,105.6025951 + ,105.9928778 + ,106.2345053 + ,106.3955447 + ,106.2535305 + ,106.7371466 + ,106.9631885 + ,106.7397703 + ,106.5927277 + ,106.6453586 + ,106.5565469 + ,106.6921875 + ,106.6573125 + ,106.3986082 + ,105.988653 + ,105.9928396 + ,106.3789817 + ,106.4054599 + ,106.751699 + ,106.9042298 + ,107.287727 + ,107.2393084 + ,107.5641867 + ,107.4457922 + ,107.3462572 + ,107.6261746 + ,107.8755676 + ,108.2139185 + ,108.7778961 + ,108.9417781 + ,108.6598373 + ,108.3788371 + ,100 + ,100.3336277 + ,100.4954189 + ,100.6814203 + ,100.4873667 + ,100.1686878 + ,100.1262902 + ,100.5021823 + ,101.1935759 + ,101.2533368 + ,101.1797803 + ,101.2479383 + ,101.0011556 + ,101.2154787 + ,101.4610993 + ,102.0541787 + ,102.6202557 + ,102.9016783 + ,103.1021357 + ,103.5075589 + ,103.4461962 + ,103.4997701 + ,104.077204 + ,104.4760297 + ,104.7525446 + ,104.6952589 + ,104.3315554 + ,104.1058439 + ,104.4275869 + ,104.8520387 + ,105.1090438 + ,104.6779933 + ,105.1628846 + ,104.7108347 + ,104.506514 + ,104.5884158 + ,104.4021549 + ,103.8268032 + ,103.9590576 + ,103.7086347 + ,103.3685963 + ,103.4786067 + ,103.1537237 + ,102.9130434 + ,103.1014198 + ,103.0316385 + ,103.0166496 + ,103.0235896 + ,103.3095399 + ,103.0796985 + ,103.5310643 + ,103.6825332 + ,103.5368137 + ,103.7231535 + ,103.9449612 + ,103.9152647 + ,104.2782638 + ,105.0277339 + ,105.4322196 + ,105.8041951 + ,106.0273211 + ,106.052954 + ,105.9963802 + ,106.5007153 + ,106.7765322 + ,106.5518041 + ,106.4594024 + ,106.5076846 + ,106.3613342 + ,106.4242253 + ,106.5142604 + ,106.2892403 + ,106.0116495 + ,106.0344447 + ,106.3108719 + ,106.185374 + ,106.5160088 + ,106.7143115 + ,107.0022764 + ,107.0191605 + ,107.3131164 + ,107.2337279 + ,107.1942898 + ,107.3592575 + ,107.5136658 + ,107.8586579 + ,108.3366397 + ,108.4797108 + ,108.2204658 + ,108.0387413 + ,100 + ,100.3140397 + ,100.6115658 + ,100.838615 + ,100.6387101 + ,100.3644527 + ,100.369211 + ,100.746058 + ,101.4547655 + ,101.630786 + ,101.6281415 + ,101.75327 + ,101.7565162 + ,102.1421459 + ,102.3502914 + ,102.8721159 + ,103.5539653 + ,103.9182135 + ,104.1311904 + ,104.5835027 + ,104.386069 + ,104.2856091 + ,104.9324673 + ,105.1658306 + ,105.5165116 + ,105.5650263 + ,105.1107128 + ,104.9668708 + ,105.0890326 + ,105.3299427 + ,105.6035279 + ,105.1436673 + ,105.557842 + ,105.0939638 + ,104.8687628 + ,104.8095625 + ,104.6003233 + ,104.0734714 + ,104.4128536 + ,104.0231452 + ,103.6234494 + ,103.6790113 + ,103.4802384 + ,103.2687684 + ,103.5811216 + ,103.4067327 + ,103.3112576 + ,103.1266485 + ,103.3551972 + ,103.1443573 + ,103.7283136 + ,103.7996825 + ,103.4647603 + ,103.5954779 + ,103.6714023 + ,103.6803944 + ,104.037036 + ,104.7889647 + ,105.2618442 + ,105.6155124 + ,105.8201369 + ,105.7103633 + ,105.73923 + ,106.2642839 + ,106.5898759 + ,106.3638378 + ,106.326077 + ,106.3700106 + ,106.1661214 + ,106.1562631 + ,106.3712083 + ,106.1798724 + ,106.0346461 + ,106.0760499 + ,106.2427621 + ,105.9652881 + ,106.2803186 + ,106.5243931 + ,106.7168258 + ,106.7990127 + ,107.0620461 + ,107.0216636 + ,107.0423225 + ,107.0923404 + ,107.1517641 + ,107.5033974 + ,107.8953832 + ,108.0176435 + ,107.7810944 + ,107.6986454) + ,dim=c(90 + ,5) + ,dimnames=list(c('1' + ,'2' + ,'3' + ,'4' + ,'5' + ,'6' + ,'7' + ,'8' + ,'9' + ,'10' + ,'11' + ,'12' + ,'13' + ,'14' + ,'15' + ,'16' + ,'17' + ,'18' + ,'19' + ,'20' + ,'21' + ,'22' + ,'23' + ,'24' + ,'25' + ,'26' + ,'27' + ,'28' + ,'29' + ,'30' + ,'31' + ,'32' + ,'33' + ,'34' + ,'35' + ,'36' + ,'37' + ,'38' + ,'39' + ,'40' + ,'41' + ,'42' + ,'43' + ,'44' + ,'45' + ,'46' + ,'47' + ,'48' + ,'49' + ,'50' + ,'51' + ,'52' + ,'53' + ,'54' + ,'55' + ,'56' + ,'57' + ,'58' + ,'59' + ,'60' + ,'61' + ,'62' + ,'63' + ,'64' + ,'65' + ,'66' + ,'67' + ,'68' + ,'69' + ,'70' + ,'71' + ,'72' + ,'73' + ,'74' + ,'75' + ,'76' + ,'77' + ,'78' + ,'79' + ,'80' + ,'81' + ,'82' + ,'83' + ,'84' + ,'85' + ,'86' + ,'87' + ,'88' + ,'89' + ,'90 ') + ,1:5)) > y <- array(NA,dim=c(90,5),dimnames=list(c('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','65','66','67','68','69','70','71','72','73','74','75','76','77','78','79','80','81','82','83','84','85','86','87','88','89','90 '),1:5)) > 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 = 'ward' > 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 5 members at h = 18.6] |--[dendrogram w/ 2 branches and 2 members at h = 4.3] | |--leaf "1" | `--leaf "2" `--[dendrogram w/ 2 branches and 3 members at h = 7.17] |--leaf "5" `--[dendrogram w/ 2 branches and 2 members at h = 4.3] |--leaf "3" `--leaf "4" > mysub <- paste('Method: ',par1) > postscript(file="/var/www/html/rcomp/tmp/1ma9e1225896920.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/2i3tw1225896920.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/3sjw31225896920.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/4fvow1225896920.tab") + } > > system("convert tmp/1ma9e1225896920.ps tmp/1ma9e1225896920.png") > system("convert tmp/2i3tw1225896920.ps tmp/2i3tw1225896920.png") convert: unable to open image `tmp/2i3tw1225896920.ps': No such file or directory. convert: missing an image filename `tmp/2i3tw1225896920.png'. > > > proc.time() user system elapsed 0.693 0.194 0.773