R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(140824 + ,269998 + ,116 + ,165 + ,90 + ,110459 + ,176565 + ,127 + ,132 + ,63 + ,105079 + ,222373 + ,106 + ,121 + ,59 + ,112098 + ,218443 + ,133 + ,145 + ,135 + ,43929 + ,157206 + ,64 + ,71 + ,48 + ,76173 + ,70849 + ,89 + ,47 + ,46 + ,187326 + ,482608 + ,122 + ,177 + ,109 + ,22807 + ,33186 + ,22 + ,5 + ,46 + ,144408 + ,207822 + ,117 + ,124 + ,75 + ,66485 + ,211698 + ,82 + ,92 + ,72 + ,79089 + ,292874 + ,136 + ,149 + ,78 + ,81625 + ,235891 + ,184 + ,93 + ,61 + ,68788 + ,156623 + ,106 + ,70 + ,58 + ,103297 + ,344166 + ,162 + ,148 + ,114 + ,69446 + ,211787 + ,86 + ,100 + ,45 + ,114948 + ,369753 + ,199 + ,142 + ,127 + ,167949 + ,292100 + ,139 + ,194 + ,58 + ,125081 + ,315018 + ,92 + ,113 + ,90 + ,125818 + ,168686 + ,85 + ,162 + ,41 + ,136588 + ,256016 + ,174 + ,186 + ,59 + ,112431 + ,269240 + ,148 + ,147 + ,99 + ,103037 + ,425544 + ,144 + ,137 + ,101 + ,82317 + ,161962 + ,84 + ,71 + ,62 + ,118906 + ,189897 + ,208 + ,123 + ,65 + ,83515 + ,200545 + ,144 + ,134 + ,150 + ,104581 + ,203723 + ,139 + ,115 + ,72 + ,103129 + ,267198 + ,127 + ,138 + ,91 + ,83243 + ,263212 + ,136 + ,125 + ,60 + ,37110 + ,155915 + ,99 + ,66 + ,53 + ,113344 + ,326805 + ,135 + ,137 + ,140 + ,139165 + ,271661 + ,165 + ,152 + ,49 + ,86652 + ,197192 + ,139 + ,159 + ,81 + ,112302 + ,318563 + ,178 + ,159 + ,53 + ,69652 + ,97717 + ,137 + ,31 + ,40 + ,119442 + ,346931 + ,148 + ,185 + ,72 + ,69867 + ,273950 + ,127 + ,78 + ,87 + ,101629 + ,411809 + ,141 + ,117 + ,72 + ,70168 + ,208192 + ,89 + ,109 + ,67 + ,31081 + ,115469 + ,46 + ,41 + ,36 + ,103925 + ,328339 + ,143 + ,149 + ,45 + ,92622 + ,324178 + ,122 + ,123 + ,42 + ,79011 + ,157897 + ,103 + ,103 + ,70 + ,93487 + ,192883 + ,108 + ,87 + ,82 + ,64520 + ,173450 + ,126 + ,71 + ,85 + ,93473 + ,153778 + ,45 + ,51 + ,82 + ,114360 + ,445562 + ,122 + ,70 + ,792 + ,33032 + ,78800 + ,66 + ,21 + ,57 + ,96125 + ,208051 + ,180 + ,155 + ,80 + ,151911 + ,323152 + ,165 + ,172 + ,116 + ,89256 + ,175523 + ,146 + ,133 + ,68 + ,95671 + ,213050 + ,137 + ,125 + ,48 + ,5950 + ,24188 + ,7 + ,7 + ,20 + ,149695 + ,372225 + ,157 + ,158 + ,81 + ,32551 + ,65029 + ,61 + ,21 + ,21 + ,31701 + ,101097 + ,41 + ,35 + ,70 + ,100087 + ,269593 + ,120 + ,133 + ,124 + ,169707 + ,302218 + ,208 + ,169 + ,80 + ,150491 + ,315889 + ,127 + ,256 + ,206 + ,120192 + ,322546 + ,147 + ,190 + ,62 + ,95893 + ,246873 + ,127 + ,100 + ,77 + ,151715 + ,360665 + ,161 + ,171 + ,65 + ,176225 + ,296186 + ,73 + ,267 + ,146 + ,59900 + ,232336 + ,94 + ,80 + ,71 + ,104767 + ,254550 + ,142 + ,126 + ,59 + ,114799 + ,228595 + ,125 + ,132 + ,58 + ,72128 + ,216027 + ,87 + ,121 + ,58 + ,143592 + ,187959 + ,128 + ,156 + ,54 + ,89626 + ,227699 + ,148 + ,133 + ,89 + ,131072 + ,229698 + ,116 + ,199 + ,78 + ,126817 + ,166791 + ,89 + ,98 + ,62 + ,81351 + ,239277 + ,154 + ,109 + ,63 + ,22618 + ,73566 + ,67 + ,25 + ,39 + ,88977 + ,242498 + ,171 + ,113 + ,58 + ,92059 + ,187167 + ,90 + ,126 + ,94 + ,81897 + ,178281 + ,133 + ,137 + ,61 + ,108146 + ,349060 + ,137 + ,121 + ,92 + ,126372 + ,323126 + ,133 + ,178 + ,48 + ,249771 + ,206059 + ,125 + ,63 + ,50 + ,71154 + ,184970 + ,134 + ,109 + ,58 + ,71571 + ,168990 + ,110 + ,101 + ,67 + ,55918 + ,153613 + ,89 + ,61 + ,41 + ,160141 + ,429481 + ,138 + ,157 + ,114 + ,38692 + ,145919 + ,99 + ,38 + ,45 + ,102812 + ,280343 + ,92 + ,159 + ,57 + ,56622 + ,80953 + ,27 + ,58 + ,31 + ,15986 + ,148106 + ,77 + ,27 + ,175 + ,123534 + ,146777 + ,127 + ,108 + ,63 + ,108535 + ,336054 + ,137 + ,83 + ,278 + ,93879 + ,307486 + ,122 + ,88 + ,91 + ,144551 + ,178495 + ,143 + ,164 + ,68 + ,56750 + ,251466 + ,85 + ,96 + ,58 + ,127654 + ,230961 + ,131 + ,192 + ,71 + ,65594 + ,175244 + ,90 + ,94 + ,86 + ,59938 + ,261494 + ,135 + ,107 + ,89 + ,146975 + ,301883 + ,132 + ,144 + ,134 + ,143372 + ,189252 + ,139 + ,123 + ,64 + ,168553 + ,222504 + ,127 + ,170 + ,72 + ,183500 + ,278170 + ,104 + ,210 + ,61 + ,165986 + ,367723 + ,221 + ,193 + ,123 + ,184923 + ,392346 + ,106 + ,297 + ,73 + ,140358 + ,281033 + ,161 + ,125 + ,80 + ,149959 + ,273642 + ,130 + ,204 + ,85 + ,57224 + ,186856 + ,59 + ,70 + ,116 + ,43750 + ,43287 + ,64 + ,49 + ,43 + ,48029 + ,185302 + ,36 + ,82 + ,85 + ,104978 + ,203088 + ,88 + ,205 + ,72 + ,100046 + ,259692 + ,125 + ,111 + ,110 + ,101047 + ,301456 + ,124 + ,135 + ,55 + ,197426 + ,119969 + ,83 + ,59 + ,44 + ,160902 + ,153028 + ,127 + ,70 + ,79 + ,147172 + ,306952 + ,143 + ,108 + ,58 + ,109432 + ,297807 + ,115 + ,141 + ,70 + ,1168 + ,23623 + ,0 + ,11 + ,9 + ,83248 + ,175532 + ,94 + ,130 + ,49 + ,25162 + ,61857 + ,30 + ,28 + ,25 + ,45724 + ,163766 + ,119 + ,101 + ,107 + ,110529 + ,384053 + ,102 + ,216 + ,63 + ,855 + ,21054 + ,0 + ,4 + ,2 + ,101382 + ,252805 + ,77 + ,97 + ,67 + ,14116 + ,31961 + ,9 + ,39 + ,22 + ,89506 + ,294609 + ,137 + ,119 + ,152 + ,135356 + ,235069 + ,157 + ,118 + ,78 + ,116066 + ,174862 + ,146 + ,41 + ,112 + ,144244 + ,152043 + ,84 + ,107 + ,47 + ,8773 + ,38214 + ,21 + ,16 + ,52 + ,102153 + ,189451 + ,139 + ,69 + ,108 + ,117440 + ,344802 + ,168 + ,160 + ,110 + ,104128 + ,190943 + ,163 + ,158 + ,61 + ,134238 + ,396160 + ,167 + ,161 + ,134 + ,134047 + ,314212 + ,145 + ,165 + ,120 + ,279488 + ,396712 + ,175 + ,246 + ,111 + ,79756 + ,187992 + ,137 + ,89 + ,49 + ,66089 + ,102424 + ,100 + ,49 + ,55 + ,102070 + ,283392 + ,150 + ,107 + ,149 + ,146760 + ,401260 + ,163 + ,182 + ,155 + ,154771 + ,135936 + ,137 + ,16 + ,103 + ,165933 + ,373146 + ,149 + ,173 + ,142 + ,64593 + ,157429 + ,112 + ,90 + ,76 + ,92280 + ,236370 + ,135 + ,140 + ,83 + ,67150 + ,258959 + ,114 + ,142 + ,185 + ,128692 + ,214338 + ,45 + ,126 + ,69 + ,124089 + ,363154 + ,120 + ,123 + ,117 + ,125386 + ,232339 + ,115 + ,239 + ,63 + ,37238 + ,173260 + ,78 + ,15 + ,37 + ,140015 + ,317676 + ,136 + ,170 + ,56 + ,150047 + ,168994 + ,179 + ,123 + ,122 + ,154451 + ,233293 + ,118 + ,151 + ,52 + ,156349 + ,301585 + ,147 + ,194 + ,64 + ,0 + ,1 + ,0 + ,0 + ,0 + ,6023 + ,14688 + ,0 + ,5 + ,0 + ,0 + ,98 + ,0 + ,0 + ,0 + ,0 + ,455 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,84601 + ,216803 + ,88 + ,122 + ,58 + ,68946 + ,365230 + ,115 + ,173 + ,109 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,203 + ,0 + ,0 + ,0 + ,1644 + ,7199 + ,0 + ,6 + ,0 + ,6179 + ,46660 + ,13 + ,13 + ,7 + ,3926 + ,17547 + ,4 + ,3 + ,3 + ,52789 + ,116678 + ,76 + ,35 + ,89 + ,0 + ,969 + ,0 + ,0 + ,0 + ,100350 + ,195592 + ,63 + ,72 + ,46) + ,dim=c(5 + ,164) + ,dimnames=list(c('#Karakters' + ,'Totale_tijd_RFC' + ,'#Feedback_Messages(+120karakters)' + ,'#Blogs' + ,'#Compendium_views(PR)') + ,1:164)) > y <- array(NA,dim=c(5,164),dimnames=list(c('#Karakters','Totale_tijd_RFC','#Feedback_Messages(+120karakters)','#Blogs','#Compendium_views(PR)'),1:164)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par1 = 'pearson' > main = 'Correlation Matrix' > panel.tau <- function(x, y, digits=2, prefix='', cex.cor) + { + usr <- par('usr'); on.exit(par(usr)) + par(usr = c(0, 1, 0, 1)) + rr <- cor.test(x, y, method=par1) + r <- round(rr$p.value,2) + txt <- format(c(r, 0.123456789), digits=digits)[1] + txt <- paste(prefix, txt, sep='') + if(missing(cex.cor)) cex <- 0.5/strwidth(txt) + text(0.5, 0.5, txt, cex = cex) + } > panel.hist <- function(x, ...) + { + usr <- par('usr'); on.exit(par(usr)) + par(usr = c(usr[1:2], 0, 1.5) ) + h <- hist(x, plot = FALSE) + breaks <- h$breaks; nB <- length(breaks) + y <- h$counts; y <- y/max(y) + rect(breaks[-nB], 0, breaks[-1], y, col='grey', ...) + } > postscript(file="/var/www/rcomp/tmp/1r90r1324316961.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pairs(t(y),diag.panel=panel.hist, upper.panel=panel.smooth, lower.panel=panel.tau, main=main) > dev.off() null device 1 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/rcomp/createtable") > > n <- length(y[,1]) > n [1] 5 > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,paste('Correlations for all pairs of data series (method=',par1,')',sep=''),n+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,' ',header=TRUE) > for (i in 1:n) { + a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE) + } > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,dimnames(t(x))[[2]][i],header=TRUE) + for (j in 1:n) { + r <- cor.test(y[i,],y[j,],method=par1) + a<-table.element(a,round(r$estimate,3)) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/2pwm21324316961.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Correlations for all pairs of data series with p-values',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'pair',1,TRUE) > a<-table.element(a,'Pearson r',1,TRUE) > a<-table.element(a,'Spearman rho',1,TRUE) > a<-table.element(a,'Kendall tau',1,TRUE) > a<-table.row.end(a) > cor.test(y[1,],y[2,],method=par1) Pearson's product-moment correlation data: y[1, ] and y[2, ] t = 12.9006, df = 162, p-value < 2.2e-16 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.6270066 0.7800123 sample estimates: cor 0.7118553 > for (i in 1:(n-1)) + { + for (j in (i+1):n) + { + a<-table.row.start(a) + dum <- paste(dimnames(t(x))[[2]][i],';',dimnames(t(x))[[2]][j],sep='') + a<-table.element(a,dum,header=TRUE) + rp <- cor.test(y[i,],y[j,],method='pearson') + a<-table.element(a,round(rp$estimate,4)) + rs <- cor.test(y[i,],y[j,],method='spearman') + a<-table.element(a,round(rs$estimate,4)) + rk <- cor.test(y[i,],y[j,],method='kendall') + a<-table.element(a,round(rk$estimate,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-value',header=T) + a<-table.element(a,paste('(',round(rp$p.value,4),')',sep='')) + a<-table.element(a,paste('(',round(rs$p.value,4),')',sep='')) + a<-table.element(a,paste('(',round(rk$p.value,4),')',sep='')) + a<-table.row.end(a) + } + } Warning messages: 1: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 2: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 3: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 4: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 5: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 6: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 7: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 8: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 9: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 10: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/3v0gf1324316961.tab") > > try(system("convert tmp/1r90r1324316961.ps tmp/1r90r1324316961.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.060 0.060 1.104