R version 2.12.1 (2010-12-16) 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(210907 + ,56 + ,115 + ,112285 + ,145 + ,120982 + ,56 + ,109 + ,84786 + ,101 + ,176508 + ,54 + ,146 + ,83123 + ,98 + ,179321 + ,89 + ,116 + ,101193 + ,132 + ,123185 + ,40 + ,68 + ,38361 + ,60 + ,52746 + ,25 + ,101 + ,68504 + ,38 + ,385534 + ,92 + ,96 + ,119182 + ,144 + ,33170 + ,18 + ,67 + ,22807 + ,5 + ,101645 + ,63 + ,44 + ,17140 + ,28 + ,149061 + ,44 + ,100 + ,116174 + ,84 + ,165446 + ,33 + ,93 + ,57635 + ,79 + ,237213 + ,84 + ,140 + ,66198 + ,127 + ,173326 + ,88 + ,166 + ,71701 + ,78 + ,133131 + ,55 + ,99 + ,57793 + ,60 + ,258873 + ,60 + ,139 + ,80444 + ,131 + ,180083 + ,66 + ,130 + ,53855 + ,84 + ,324799 + ,154 + ,181 + ,97668 + ,133 + ,230964 + ,53 + ,116 + ,133824 + ,150 + ,236785 + ,119 + ,116 + ,101481 + ,91 + ,135473 + ,41 + ,88 + ,99645 + ,132 + ,202925 + ,61 + ,139 + ,114789 + ,136 + ,215147 + ,58 + ,135 + ,99052 + ,124 + ,344297 + ,75 + ,108 + ,67654 + ,118 + ,153935 + ,33 + ,89 + ,65553 + ,70 + ,132943 + ,40 + ,156 + ,97500 + ,107 + ,174724 + ,92 + ,129 + ,69112 + ,119 + ,174415 + ,100 + ,118 + ,82753 + ,89 + ,225548 + ,112 + ,118 + ,85323 + ,112 + ,223632 + ,73 + ,125 + ,72654 + ,108 + ,124817 + ,40 + ,95 + ,30727 + ,52 + ,221698 + ,45 + ,126 + ,77873 + ,112 + ,210767 + ,60 + ,135 + ,117478 + ,116 + ,170266 + ,62 + ,154 + ,74007 + ,123 + ,260561 + ,75 + ,165 + ,90183 + ,125 + ,84853 + ,31 + ,113 + ,61542 + ,27 + ,294424 + ,77 + ,127 + ,101494 + ,162 + ,101011 + ,34 + ,52 + ,27570 + ,32 + ,215641 + ,46 + ,121 + ,55813 + ,64 + ,325107 + ,99 + ,136 + ,79215 + ,92 + ,7176 + ,17 + ,0 + ,1423 + ,0 + ,167542 + ,66 + ,108 + ,55461 + ,83 + ,106408 + ,30 + ,46 + ,31081 + ,41 + ,96560 + ,76 + ,54 + ,22996 + ,47 + ,265769 + ,146 + ,124 + ,83122 + ,120 + ,269651 + ,67 + ,115 + ,70106 + ,105 + ,149112 + ,56 + ,128 + ,60578 + ,79 + ,175824 + ,107 + ,80 + ,39992 + ,65 + ,152871 + ,58 + ,97 + ,79892 + ,70 + ,111665 + ,34 + ,104 + ,49810 + ,55 + ,116408 + ,61 + ,59 + ,71570 + ,39 + ,362301 + ,119 + ,125 + ,100708 + ,67 + ,78800 + ,42 + ,82 + ,33032 + ,21 + ,183167 + ,66 + ,149 + ,82875 + ,127 + ,277965 + ,89 + ,149 + ,139077 + ,152 + ,150629 + ,44 + ,122 + ,71595 + ,113 + ,168809 + ,66 + ,118 + ,72260 + ,99 + ,24188 + ,24 + ,12 + ,5950 + ,7 + ,329267 + ,259 + ,144 + ,115762 + ,141 + ,65029 + ,17 + ,67 + ,32551 + ,21 + ,101097 + ,64 + ,52 + ,31701 + ,35 + ,218946 + ,41 + ,108 + ,80670 + ,109 + ,244052 + ,68 + ,166 + ,143558 + ,133 + ,341570 + ,168 + ,80 + ,117105 + ,123 + ,103597 + ,43 + ,60 + ,23789 + ,26 + ,233328 + ,132 + ,107 + ,120733 + ,230 + ,256462 + ,105 + ,127 + ,105195 + ,166 + ,206161 + ,71 + ,107 + ,73107 + ,68 + ,311473 + ,112 + ,146 + ,132068 + ,147 + ,235800 + ,94 + ,84 + ,149193 + ,179 + ,177939 + ,82 + ,141 + ,46821 + ,61 + ,207176 + ,70 + ,123 + ,87011 + ,101 + ,196553 + ,57 + ,111 + ,95260 + ,108 + ,174184 + ,53 + ,98 + ,55183 + ,90 + ,143246 + ,103 + ,105 + ,106671 + ,114 + ,187559 + ,121 + ,135 + ,73511 + ,103 + ,187681 + ,62 + ,107 + ,92945 + ,142 + ,119016 + ,52 + ,85 + ,78664 + ,79 + ,182192 + ,52 + ,155 + ,70054 + ,88 + ,73566 + ,32 + ,88 + ,22618 + ,25 + ,194979 + ,62 + ,155 + ,74011 + ,83 + ,167488 + ,45 + ,104 + ,83737 + ,113 + ,143756 + ,46 + ,132 + ,69094 + ,118 + ,275541 + ,63 + ,127 + ,93133 + ,110 + ,243199 + ,75 + ,108 + ,95536 + ,129 + ,182999 + ,88 + ,129 + ,225920 + ,51 + ,135649 + ,46 + ,116 + ,62133 + ,93 + ,152299 + ,53 + ,122 + ,61370 + ,76 + ,120221 + ,37 + ,85 + ,43836 + ,49 + ,346485 + ,90 + ,147 + ,106117 + ,118 + ,145790 + ,63 + ,99 + ,38692 + ,38 + ,193339 + ,78 + ,87 + ,84651 + ,141 + ,80953 + ,25 + ,28 + ,56622 + ,58 + ,122774 + ,45 + ,90 + ,15986 + ,27 + ,130585 + ,46 + ,109 + ,95364 + ,91 + ,112611 + ,41 + ,78 + ,26706 + ,48 + ,286468 + ,144 + ,111 + ,89691 + ,63 + ,241066 + ,82 + ,158 + ,67267 + ,56 + ,148446 + ,91 + ,141 + ,126846 + ,144 + ,204713 + ,71 + ,122 + ,41140 + ,73 + ,182079 + ,63 + ,124 + ,102860 + ,168 + ,140344 + ,53 + ,93 + ,51715 + ,64 + ,220516 + ,62 + ,124 + ,55801 + ,97 + ,243060 + ,63 + ,112 + ,111813 + ,117 + ,162765 + ,32 + ,108 + ,120293 + ,100 + ,182613 + ,39 + ,99 + ,138599 + ,149 + ,232138 + ,62 + ,117 + ,161647 + ,187 + ,265318 + ,117 + ,199 + ,115929 + ,127 + ,85574 + ,34 + ,78 + ,24266 + ,37 + ,310839 + ,92 + ,91 + ,162901 + ,245 + ,225060 + ,93 + ,158 + ,109825 + ,87 + ,232317 + ,54 + ,126 + ,129838 + ,177 + ,144966 + ,144 + ,122 + ,37510 + ,49 + ,43287 + ,14 + ,71 + ,43750 + ,49 + ,155754 + ,61 + ,75 + ,40652 + ,73 + ,164709 + ,109 + ,115 + ,87771 + ,177 + ,201940 + ,38 + ,119 + ,85872 + ,94 + ,235454 + ,73 + ,124 + ,89275 + ,117 + ,220801 + ,75 + ,72 + ,44418 + ,60 + ,99466 + ,50 + ,91 + ,192565 + ,55 + ,92661 + ,61 + ,45 + ,35232 + ,39 + ,133328 + ,55 + ,78 + ,40909 + ,64 + ,61361 + ,77 + ,39 + ,13294 + ,26 + ,125930 + ,75 + ,68 + ,32387 + ,64 + ,100750 + ,72 + ,119 + ,140867 + ,58 + ,224549 + ,50 + ,117 + ,120662 + ,95 + ,82316 + ,32 + ,39 + ,21233 + ,25 + ,102010 + ,53 + ,50 + ,44332 + ,26 + ,101523 + ,42 + ,88 + ,61056 + ,76 + ,243511 + ,71 + ,155 + ,101338 + ,129 + ,22938 + ,10 + ,0 + ,1168 + ,11 + ,41566 + ,35 + ,36 + ,13497 + ,2 + ,152474 + ,65 + ,123 + ,65567 + ,101 + ,61857 + ,25 + ,32 + ,25162 + ,28 + ,99923 + ,66 + ,99 + ,32334 + ,36 + ,132487 + ,41 + ,136 + ,40735 + ,89 + ,317394 + ,86 + ,117 + ,91413 + ,193 + ,21054 + ,16 + ,0 + ,855 + ,4 + ,209641 + ,42 + ,88 + ,97068 + ,84 + ,22648 + ,19 + ,39 + ,44339 + ,23 + ,31414 + ,19 + ,25 + ,14116 + ,39 + ,46698 + ,45 + ,52 + ,10288 + ,14 + ,131698 + ,65 + ,75 + ,65622 + ,78 + ,91735 + ,35 + ,71 + ,16563 + ,14 + ,244749 + ,95 + ,124 + ,76643 + ,101 + ,184510 + ,49 + ,151 + ,110681 + ,82 + ,79863 + ,37 + ,71 + ,29011 + ,24 + ,128423 + ,64 + ,145 + ,92696 + ,36 + ,97839 + ,38 + ,87 + ,94785 + ,75 + ,38214 + ,34 + ,27 + ,8773 + ,16 + ,151101 + ,32 + ,131 + ,83209 + ,55 + ,272458 + ,65 + ,162 + ,93815 + ,131 + ,172494 + ,52 + ,165 + ,86687 + ,131 + ,108043 + ,62 + ,54 + ,34553 + ,39 + ,328107 + ,65 + ,159 + ,105547 + ,144 + ,250579 + ,83 + ,147 + ,103487 + ,139 + ,351067 + ,95 + ,170 + ,213688 + ,211 + ,158015 + ,29 + ,119 + ,71220 + ,78 + ,98866 + ,18 + ,49 + ,23517 + ,50 + ,85439 + ,33 + ,104 + ,56926 + ,39 + ,229242 + ,247 + ,120 + ,91721 + ,90 + ,351619 + ,139 + ,150 + ,115168 + ,166 + ,84207 + ,29 + ,112 + ,111194 + ,12 + ,120445 + ,118 + ,59 + ,51009 + ,57 + ,324598 + ,110 + ,136 + ,135777 + ,133 + ,131069 + ,67 + ,107 + ,51513 + ,69 + ,204271 + ,42 + ,130 + ,74163 + ,119 + ,165543 + ,65 + ,115 + ,51633 + ,119 + ,141722 + ,94 + ,107 + ,75345 + ,65 + ,116048 + ,64 + ,75 + ,33416 + ,61 + ,250047 + ,81 + ,71 + ,83305 + ,49 + ,299775 + ,95 + ,120 + ,98952 + ,101 + ,195838 + ,67 + ,116 + ,102372 + ,196 + ,173260 + ,63 + ,79 + ,37238 + ,15 + ,254488 + ,83 + ,150 + ,103772 + ,136 + ,104389 + ,45 + ,156 + ,123969 + ,89 + ,136084 + ,30 + ,51 + ,27142 + ,40 + ,199476 + ,70 + ,118 + ,135400 + ,123 + ,92499 + ,32 + ,71 + ,21399 + ,21 + ,224330 + ,83 + ,144 + ,130115 + ,163 + ,135781 + ,31 + ,47 + ,24874 + ,29 + ,74408 + ,67 + ,28 + ,34988 + ,35 + ,81240 + ,66 + ,68 + ,45549 + ,13 + ,14688 + ,10 + ,0 + ,6023 + ,5 + ,181633 + ,70 + ,110 + ,64466 + ,96 + ,271856 + ,103 + ,147 + ,54990 + ,151 + ,7199 + ,5 + ,0 + ,1644 + ,6 + ,46660 + ,20 + ,15 + ,6179 + ,13 + ,17547 + ,5 + ,4 + ,3926 + ,3 + ,133368 + ,36 + ,64 + ,32755 + ,56 + ,95227 + ,34 + ,111 + ,34777 + ,23 + ,152601 + ,48 + ,85 + ,73224 + ,57 + ,98146 + ,40 + ,68 + ,27114 + ,14 + ,79619 + ,43 + ,40 + ,20760 + ,43 + ,59194 + ,31 + ,80 + ,37636 + ,20 + ,139942 + ,42 + ,88 + ,65461 + ,72 + ,118612 + ,46 + ,48 + ,30080 + ,87 + ,72880 + ,33 + ,76 + ,24094 + ,21) + ,dim=c(5 + ,197) + ,dimnames=list(c('time' + ,'logins' + ,'feedback' + ,'totsize' + ,'totblogs') + ,1:197)) > y <- array(NA,dim=c(5,197),dimnames=list(c('time','logins','feedback','totsize','totblogs'),1:197)) > 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/1bo7f1323961446.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/23fn31323961446.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.372, df = 195, p-value < 2.2e-16 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.5768235 0.7348193 sample estimates: cor 0.6631449 > 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 > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/38udc1323961447.tab") > > try(system("convert tmp/1bo7f1323961446.ps tmp/1bo7f1323961446.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.332 0.104 1.486