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(8.4 + ,9.5 + ,308.347 + ,577.992 + ,8.4 + ,9.1 + ,298.427 + ,565.464 + ,8.4 + ,9 + ,289.231 + ,547.344 + ,8.6 + ,9.3 + ,291.975 + ,554.788 + ,8.9 + ,9.9 + ,294.912 + ,562.325 + ,8.8 + ,9.8 + ,293.488 + ,560.854 + ,8.3 + ,9.4 + ,290.555 + ,555.332 + ,7.5 + ,8.3 + ,284.736 + ,543.599 + ,7.2 + ,8 + ,281.818 + ,536.662 + ,7.5 + ,8.5 + ,287.854 + ,542.722 + ,8.8 + ,10.4 + ,316.263 + ,593.530 + ,9.3 + ,11.1 + ,325.412 + ,610.763 + ,9.3 + ,10.9 + ,326.011 + ,612.613 + ,8.7 + ,9.9 + ,328.282 + ,611.324 + ,8.2 + ,9.2 + ,317.480 + ,594.167 + ,8.3 + ,9.2 + ,317.539 + ,595.454 + ,8.5 + ,9.5 + ,313.737 + ,590.865 + ,8.6 + ,9.6 + ,312.276 + ,589.379 + ,8.6 + ,9.5 + ,309.391 + ,584.428 + ,8.2 + ,9.1 + ,302.950 + ,573.100 + ,8.1 + ,8.9 + ,300.316 + ,567.456 + ,8 + ,9 + ,304.035 + ,569.028 + ,8.6 + ,10.1 + ,333.476 + ,620.735 + ,8.7 + ,10.3 + ,337.698 + ,628.884 + ,8.8 + ,10.2 + ,335.932 + ,628.232 + ,8.5 + ,9.6 + ,323.931 + ,612.117 + ,8.4 + ,9.2 + ,313.927 + ,595.404 + ,8.5 + ,9.3 + ,314.485 + ,597.141 + ,8.7 + ,9.4 + ,313.218 + ,593.408 + ,8.7 + ,9.4 + ,309.664 + ,590.072 + ,8.6 + ,9.2 + ,302.963 + ,579.799 + ,8.5 + ,9 + ,298.989 + ,574.205 + ,8.3 + ,9 + ,298.423 + ,572.775 + ,8.1 + ,9 + ,301.631 + ,572.942 + ,8.2 + ,9.8 + ,329.765 + ,619.567 + ,8.1 + ,10 + ,335.083 + ,625.809 + ,8.1 + ,9.9 + ,327.616 + ,619.916 + ,7.9 + ,9.3 + ,309.119 + ,587.625 + ,7.9 + ,9 + ,295.916 + ,565.742 + ,7.9 + ,9 + ,291.413 + ,557.274 + ,8 + ,9.1 + ,291.542 + ,560.576 + ,8 + ,9.1 + ,284.678 + ,548.854 + ,7.9 + ,9.1 + ,276.475 + ,531.673 + ,8 + ,9.2 + ,272.566 + ,525.919 + ,7.7 + ,8.8 + ,264.981 + ,511.038 + ,7.2 + ,8.3 + ,263.290 + ,498.662 + ,7.5 + ,8.4 + ,296.806 + ,555.362 + ,7.3 + ,8.1 + ,303.598 + ,564.591 + ,7 + ,7.8 + ,286.994 + ,541.657 + ,7 + ,7.9 + ,276.427 + ,527.070 + ,7 + ,7.9 + ,266.424 + ,509.846 + ,7.2 + ,8 + ,267.153 + ,514.258 + ,7.3 + ,7.9 + ,268.381 + ,516.922 + ,7.1 + ,7.5 + ,262.522 + ,507.561 + ,6.8 + ,7.2 + ,255.542 + ,492.622 + ,6.6 + ,6.9 + ,253.158 + ,490.243 + ,6.2 + ,6.6 + ,243.803 + ,469.357 + ,6.2 + ,6.7 + ,250.741 + ,477.580 + ,6.8 + ,7.3 + ,280.445 + ,528.379 + ,6.9 + ,7.5 + ,285.257 + ,533.590) + ,dim=c(4 + ,60) + ,dimnames=list(c('Totaal%werkzoekenden' + ,'Totaal%werkzoekendevrouwen' + ,'#nietwerkendewerkzoekendevrouwen' + ,'Totaalnietwerkendewerkzoekenden') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Totaal%werkzoekenden','Totaal%werkzoekendevrouwen','#nietwerkendewerkzoekendevrouwen','Totaalnietwerkendewerkzoekenden'),1:60)) > 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 60 members at h = 1247] |--[dendrogram w/ 2 branches and 21 members at h = 257] | |--[dendrogram w/ 2 branches and 11 members at h = 27.8] | | |--[dendrogram w/ 2 branches and 6 members at h = 7.04] | | | |--[dendrogram w/ 2 branches and 3 members at h = 2.62] | | | | |--leaf "11" | | | | `--[dendrogram w/ 2 branches and 2 members at h = 1.29] | | | | |--leaf "15" | | | | `--leaf "16" | | | `--[dendrogram w/ 2 branches and 3 members at h = 3.45] | | | |--leaf "29" | | | `--[dendrogram w/ 2 branches and 2 members at h = 1.83] | | | |--leaf "27" | | | `--leaf "28" | | `--[dendrogram w/ 2 branches and 5 members at h = 7.55] | | |--[dendrogram w/ 2 branches and 2 members at h = 2.09] | | | |--leaf "17" | | | `--leaf "18" | | `--[dendrogram w/ 2 branches and 3 members at h = 5.08] | | |--leaf "19" | | `--[dendrogram w/ 2 branches and 2 members at h = 2.63] | | |--leaf "30" | | `--leaf "38" | `--[dendrogram w/ 2 branches and 10 members at h = 49.5] | |--[dendrogram w/ 2 branches and 4 members at h = 4.06] | | |--leaf "14" | | `--[dendrogram w/ 2 branches and 3 members at h = 2.85] | | |--leaf "26" | | `--[dendrogram w/ 2 branches and 2 members at h = 1.95] | | |--leaf "12" | | `--leaf "13" | `--[dendrogram w/ 2 branches and 6 members at h = 22.6] | |--[dendrogram w/ 2 branches and 3 members at h = 3.88] | | |--leaf "36" | | `--[dendrogram w/ 2 branches and 2 members at h = 1.89] | | |--leaf "24" | | `--leaf "25" | `--[dendrogram w/ 2 branches and 3 members at h = 5.85] | |--leaf "23" | `--[dendrogram w/ 2 branches and 2 members at h = 2.18] | |--leaf "35" | `--leaf "37" `--[dendrogram w/ 2 branches and 39 members at h = 665] |--[dendrogram w/ 2 branches and 10 members at h = 100] | |--[dendrogram w/ 2 branches and 5 members at h = 12] | | |--[dendrogram w/ 2 branches and 2 members at h = 2.94] | | | |--leaf "52" | | | `--leaf "53" | | `--[dendrogram w/ 2 branches and 3 members at h = 5.29] | | |--leaf "54" | | `--[dendrogram w/ 2 branches and 2 members at h = 2.19] | | |--leaf "45" | | `--leaf "51" | `--[dendrogram w/ 2 branches and 5 members at h = 41.5] | |--[dendrogram w/ 2 branches and 2 members at h = 10.8] | | |--leaf "57" | | `--leaf "58" | `--[dendrogram w/ 2 branches and 3 members at h = 14.3] | |--leaf "46" | `--[dendrogram w/ 2 branches and 2 members at h = 3.39] | |--leaf "55" | `--leaf "56" `--[dendrogram w/ 2 branches and 29 members at h = 303] |--[dendrogram w/ 2 branches and 11 members at h = 61.8] | |--[dendrogram w/ 2 branches and 5 members at h = 9.92] | | |--[dendrogram w/ 2 branches and 3 members at h = 3.67] | | | |--leaf "8" | | | `--[dendrogram w/ 2 branches and 2 members at h = 1.62] | | | |--leaf "10" | | | `--leaf "49" | | `--[dendrogram w/ 2 branches and 2 members at h = 4.81] | | |--leaf "3" | | `--leaf "42" | `--[dendrogram w/ 2 branches and 6 members at h = 18.9] | |--[dendrogram w/ 2 branches and 2 members at h = 4.65] | | |--leaf "9" | | `--leaf "60" | `--[dendrogram w/ 2 branches and 4 members at h = 7.48] | |--leaf "44" | `--[dendrogram w/ 2 branches and 3 members at h = 5.52] | |--leaf "43" | `--[dendrogram w/ 2 branches and 2 members at h = 4.27] | |--leaf "50" | `--leaf "59" `--[dendrogram w/ 2 branches and 18 members at h = 88] |--[dendrogram w/ 2 branches and 7 members at h = 13.4] | |--[dendrogram w/ 2 branches and 3 members at h = 3.46] | | |--leaf "41" | | `--[dendrogram w/ 2 branches and 2 members at h = 2.05] | | |--leaf "5" | | `--leaf "6" | `--[dendrogram w/ 2 branches and 4 members at h = 7.54] | |--leaf "47" | `--[dendrogram w/ 2 branches and 3 members at h = 2.72] | |--leaf "40" | `--[dendrogram w/ 2 branches and 2 members at h = 1.55] | |--leaf "4" | `--leaf "7" `--[dendrogram w/ 2 branches and 11 members at h = 28.7] |--[dendrogram w/ 2 branches and 5 members at h = 9.43] | |--[dendrogram w/ 2 branches and 2 members at h = 2.58] | | |--leaf "2" | | `--leaf "39" | `--[dendrogram w/ 2 branches and 3 members at h = 4.72] | |--leaf "48" | `--[dendrogram w/ 2 branches and 2 members at h = 4.04] | |--leaf "21" | `--leaf "22" `--[dendrogram w/ 2 branches and 6 members at h = 15.3] |--[dendrogram w/ 2 branches and 2 members at h = 5.69] | |--leaf "1" | `--leaf "31" `--[dendrogram w/ 2 branches and 4 members at h = 5.98] |--[dendrogram w/ 2 branches and 2 members at h = 1.34] | |--leaf "20" | `--leaf "34" `--[dendrogram w/ 2 branches and 2 members at h = 1.55] |--leaf "32" `--leaf "33" > mysub <- paste('Method: ',par1) > postscript(file="/var/www/html/rcomp/tmp/1rxuf1226421026.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/29z981226421027.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/3m3ao1226421027.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/4m0rl1226421027.tab") + } > > system("convert tmp/1rxuf1226421026.ps tmp/1rxuf1226421026.png") > system("convert tmp/29z981226421027.ps tmp/29z981226421027.png") convert: unable to open image `tmp/29z981226421027.ps': No such file or directory. convert: missing an image filename `tmp/29z981226421027.png'. > > > proc.time() user system elapsed 0.821 0.187 0.970