R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(252101 + ,62 + ,34 + ,104 + ,124252 + ,134577 + ,59 + ,30 + ,111 + ,98956 + ,198520 + ,62 + ,38 + ,93 + ,98073 + ,189326 + ,94 + ,34 + ,119 + ,106816 + ,137449 + ,43 + ,25 + ,57 + ,41449 + ,65295 + ,27 + ,31 + ,80 + ,76173 + ,439387 + ,103 + ,29 + ,107 + ,177551 + ,33186 + ,19 + ,18 + ,22 + ,22807 + ,178368 + ,51 + ,30 + ,103 + ,126938 + ,186657 + ,38 + ,29 + ,72 + ,61680 + ,261949 + ,96 + ,38 + ,123 + ,72117 + ,191051 + ,95 + ,49 + ,164 + ,79738 + ,138866 + ,57 + ,33 + ,100 + ,57793 + ,296878 + ,66 + ,46 + ,143 + ,91677 + ,192648 + ,72 + ,38 + ,79 + ,64631 + ,333462 + ,162 + ,52 + ,183 + ,106385 + ,243571 + ,58 + ,32 + ,123 + ,161961 + ,263451 + ,130 + ,35 + ,81 + ,112669 + ,155679 + ,48 + ,25 + ,74 + ,114029 + ,227053 + ,70 + ,42 + ,158 + ,124550 + ,240028 + ,63 + ,40 + ,133 + ,105416 + ,388549 + ,90 + ,35 + ,128 + ,72875 + ,156540 + ,34 + ,25 + ,84 + ,81964 + ,148421 + ,43 + ,46 + ,184 + ,104880 + ,177732 + ,97 + ,36 + ,127 + ,76302 + ,191441 + ,105 + ,35 + ,128 + ,96740 + ,249893 + ,122 + ,38 + ,118 + ,93071 + ,236812 + ,76 + ,35 + ,125 + ,78912 + ,142329 + ,45 + ,28 + ,89 + ,35224 + ,259667 + ,53 + ,37 + ,122 + ,90694 + ,231625 + ,65 + ,40 + ,151 + ,125369 + ,176062 + ,67 + ,42 + ,122 + ,80849 + ,286683 + ,79 + ,44 + ,162 + ,104434 + ,87485 + ,33 + ,33 + ,121 + ,65702 + ,322865 + ,83 + ,35 + ,132 + ,108179 + ,247082 + ,51 + ,37 + ,110 + ,63583 + ,346011 + ,106 + ,39 + ,135 + ,95066 + ,191653 + ,74 + ,32 + ,80 + ,62486 + ,114673 + ,31 + ,17 + ,46 + ,31081 + ,284224 + ,161 + ,34 + ,127 + ,94584 + ,284195 + ,72 + ,33 + ,103 + ,87408 + ,155363 + ,59 + ,35 + ,95 + ,68966 + ,177306 + ,67 + ,32 + ,100 + ,88766 + ,144571 + ,49 + ,35 + ,102 + ,57139 + ,140319 + ,73 + ,45 + ,45 + ,90586 + ,405267 + ,135 + ,38 + ,122 + ,109249 + ,78800 + ,42 + ,26 + ,66 + ,33032 + ,201970 + ,69 + ,45 + ,159 + ,96056 + ,302674 + ,99 + ,44 + ,153 + ,146648 + ,164733 + ,50 + ,40 + ,131 + ,80613 + ,194221 + ,68 + ,33 + ,113 + ,87026 + ,24188 + ,24 + ,4 + ,7 + ,5950 + ,342263 + ,279 + ,41 + ,147 + ,131106 + ,65029 + ,17 + ,18 + ,61 + ,32551 + ,101097 + ,64 + ,14 + ,41 + ,31701 + ,246088 + ,46 + ,33 + ,108 + ,91072 + ,273108 + ,75 + ,49 + ,184 + ,159803 + ,282220 + ,160 + ,32 + ,115 + ,143950 + ,273495 + ,119 + ,37 + ,132 + ,112368 + ,214872 + ,74 + ,32 + ,113 + ,82124 + ,335121 + ,124 + ,41 + ,141 + ,144068 + ,267171 + ,107 + ,25 + ,65 + ,162627 + ,187938 + ,88 + ,40 + ,87 + ,55062 + ,229512 + ,78 + ,35 + ,121 + ,95329 + ,209798 + ,61 + ,33 + ,112 + ,105612 + ,201345 + ,60 + ,28 + ,81 + ,62853 + ,163833 + ,114 + ,31 + ,116 + ,125976 + ,204250 + ,129 + ,40 + ,132 + ,79146 + ,197813 + ,67 + ,32 + ,104 + ,108461 + ,132955 + ,60 + ,25 + ,80 + ,99971 + ,216092 + ,59 + ,42 + ,145 + ,77826 + ,73566 + ,32 + ,23 + ,67 + ,22618 + ,213198 + ,67 + ,42 + ,159 + ,84892 + ,181713 + ,49 + ,38 + ,90 + ,92059 + ,148698 + ,49 + ,34 + ,120 + ,77993 + ,300103 + ,70 + ,38 + ,126 + ,104155 + ,251437 + ,78 + ,32 + ,118 + ,109840 + ,197295 + ,101 + ,37 + ,112 + ,238712 + ,158163 + ,55 + ,34 + ,123 + ,67486 + ,155529 + ,57 + ,33 + ,98 + ,68007 + ,132672 + ,41 + ,25 + ,78 + ,48194 + ,377205 + ,100 + ,40 + ,119 + ,134796 + ,145905 + ,66 + ,26 + ,99 + ,38692 + ,223701 + ,87 + ,40 + ,81 + ,93587 + ,80953 + ,25 + ,8 + ,27 + ,56622 + ,130805 + ,47 + ,27 + ,77 + ,15986 + ,135082 + ,48 + ,32 + ,118 + ,113402 + ,300805 + ,156 + ,33 + ,122 + ,97967 + ,271806 + ,95 + ,50 + ,103 + ,74844 + ,150949 + ,96 + ,37 + ,129 + ,136051 + ,225805 + ,79 + ,33 + ,69 + ,50548 + ,197389 + ,68 + ,34 + ,121 + ,112215 + ,156583 + ,56 + ,28 + ,81 + ,59591 + ,222599 + ,66 + ,32 + ,119 + ,59938 + ,261601 + ,70 + ,32 + ,116 + ,137639 + ,178489 + ,35 + ,32 + ,123 + ,143372 + ,200657 + ,43 + ,31 + ,111 + ,138599 + ,259084 + ,68 + ,35 + ,100 + ,174110 + ,313075 + ,130 + ,58 + ,221 + ,135062 + ,346933 + ,100 + ,27 + ,95 + ,175681 + ,246440 + ,104 + ,45 + ,153 + ,130307 + ,252444 + ,58 + ,37 + ,118 + ,139141 + ,159965 + ,159 + ,32 + ,50 + ,44244 + ,43287 + ,14 + ,19 + ,64 + ,43750 + ,172239 + ,68 + ,22 + ,34 + ,48029 + ,183738 + ,120 + ,35 + ,76 + ,95216 + ,227681 + ,43 + ,36 + ,112 + ,92288 + ,260464 + ,81 + ,36 + ,115 + ,94588 + ,106288 + ,54 + ,23 + ,69 + ,197426 + ,109632 + ,77 + ,36 + ,108 + ,151244 + ,268905 + ,58 + ,36 + ,130 + ,139206 + ,266805 + ,78 + ,42 + ,110 + ,106271 + ,23623 + ,11 + ,1 + ,0 + ,1168 + ,152474 + ,65 + ,32 + ,83 + ,71764 + ,61857 + ,25 + ,11 + ,30 + ,25162 + ,144889 + ,43 + ,40 + ,106 + ,45635 + ,346600 + ,99 + ,34 + ,91 + ,101817 + ,21054 + ,16 + ,0 + ,0 + ,855 + ,224051 + ,45 + ,27 + ,69 + ,100174 + ,31414 + ,19 + ,8 + ,9 + ,14116 + ,261043 + ,105 + ,35 + ,123 + ,85008 + ,197819 + ,57 + ,41 + ,143 + ,124254 + ,154984 + ,73 + ,40 + ,125 + ,105793 + ,112933 + ,45 + ,28 + ,81 + ,117129 + ,38214 + ,34 + ,8 + ,21 + ,8773 + ,158671 + ,33 + ,35 + ,124 + ,94747 + ,302148 + ,70 + ,47 + ,168 + ,107549 + ,177918 + ,55 + ,46 + ,149 + ,97392 + ,350552 + ,70 + ,42 + ,147 + ,126893 + ,275578 + ,91 + ,48 + ,145 + ,118850 + ,368746 + ,106 + ,49 + ,172 + ,234853 + ,172464 + ,31 + ,35 + ,126 + ,74783 + ,94381 + ,35 + ,32 + ,89 + ,66089 + ,243875 + ,279 + ,36 + ,137 + ,95684 + ,382487 + ,153 + ,42 + ,149 + ,139537 + ,114525 + ,40 + ,35 + ,121 + ,144253 + ,335681 + ,119 + ,37 + ,133 + ,153824 + ,147989 + ,72 + ,34 + ,93 + ,63995 + ,216638 + ,45 + ,36 + ,119 + ,84891 + ,192862 + ,72 + ,36 + ,102 + ,61263 + ,184818 + ,107 + ,32 + ,45 + ,106221 + ,336707 + ,105 + ,33 + ,104 + ,113587 + ,215836 + ,76 + ,35 + ,111 + ,113864 + ,173260 + ,63 + ,21 + ,78 + ,37238 + ,271773 + ,89 + ,40 + ,120 + ,119906 + ,130908 + ,52 + ,49 + ,176 + ,135096 + ,204009 + ,75 + ,33 + ,109 + ,151611 + ,245514 + ,92 + ,39 + ,132 + ,144645 + ,1 + ,0 + ,0 + ,0 + ,0 + ,14688 + ,10 + ,0 + ,0 + ,6023 + ,98 + ,1 + ,0 + ,0 + ,0 + ,455 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,195765 + ,75 + ,33 + ,78 + ,77457 + ,326038 + ,121 + ,42 + ,104 + ,62464 + ,0 + ,0 + ,0 + ,0 + ,0 + ,203 + ,4 + ,0 + ,0 + ,0 + ,7199 + ,5 + ,0 + ,0 + ,1644 + ,46660 + ,20 + ,5 + ,13 + ,6179 + ,17547 + ,5 + ,1 + ,4 + ,3926 + ,107465 + ,38 + ,38 + ,65 + ,42087 + ,969 + ,2 + ,0 + ,0 + ,0 + ,173102 + ,58 + ,28 + ,55 + ,87656) + ,dim=c(5 + ,164) + ,dimnames=list(c('TimeinRFC' + ,'#logins' + ,'#FBmess' + ,'#revCom' + ,'#char') + ,1:164)) > y <- array(NA,dim=c(5,164),dimnames=list(c('TimeinRFC','#logins','#FBmess','#revCom','#char'),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 = 'kendall' > 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/wessaorg/rcomp/tmp/1vgbi1323623891.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/2182i1323623891.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) Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 11.335, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.5987349 > 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/wessaorg/rcomp/tmp/3zv4m1323623891.tab") > > try(system("convert tmp/1vgbi1323623891.ps tmp/1vgbi1323623891.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.127 0.140 1.380