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(112285 + ,210907 + ,81 + ,79 + ,30 + ,84786 + ,120982 + ,55 + ,58 + ,28 + ,83123 + ,176508 + ,50 + ,60 + ,38 + ,101193 + ,179321 + ,125 + ,108 + ,30 + ,38361 + ,123185 + ,40 + ,49 + ,22 + ,68504 + ,52746 + ,37 + ,0 + ,26 + ,119182 + ,385534 + ,63 + ,121 + ,25 + ,22807 + ,33170 + ,44 + ,1 + ,18 + ,116174 + ,149061 + ,66 + ,43 + ,26 + ,57635 + ,165446 + ,57 + ,69 + ,25 + ,66198 + ,237213 + ,74 + ,78 + ,38 + ,71701 + ,173326 + ,49 + ,86 + ,44 + ,57793 + ,133131 + ,52 + ,44 + ,30 + ,80444 + ,258873 + ,88 + ,104 + ,40 + ,53855 + ,180083 + ,36 + ,63 + ,34 + ,97668 + ,324799 + ,108 + ,158 + ,47 + ,133824 + ,230964 + ,43 + ,102 + ,30 + ,101481 + ,236785 + ,75 + ,77 + ,31 + ,99645 + ,135473 + ,32 + ,82 + ,23 + ,114789 + ,202925 + ,44 + ,115 + ,36 + ,99052 + ,215147 + ,85 + ,101 + ,36 + ,67654 + ,344297 + ,86 + ,80 + ,30 + ,65553 + ,153935 + ,56 + ,50 + ,25 + ,97500 + ,132943 + ,50 + ,83 + ,39 + ,69112 + ,174724 + ,135 + ,123 + ,34 + ,82753 + ,174415 + ,63 + ,73 + ,31 + ,85323 + ,225548 + ,81 + ,81 + ,31 + ,72654 + ,223632 + ,52 + ,105 + ,33 + ,30727 + ,124817 + ,44 + ,47 + ,25 + ,77873 + ,221698 + ,113 + ,105 + ,33 + ,117478 + ,210767 + ,39 + ,94 + ,35 + ,74007 + ,170266 + ,73 + ,44 + ,42 + ,90183 + ,260561 + ,48 + ,114 + ,43 + ,61542 + ,84853 + ,33 + ,38 + ,30 + ,101494 + ,294424 + ,59 + ,107 + ,33 + ,55813 + ,215641 + ,69 + ,71 + ,32 + ,79215 + ,325107 + ,64 + ,84 + ,36 + ,55461 + ,167542 + ,59 + ,59 + ,28 + ,31081 + ,106408 + ,32 + ,33 + ,14 + ,83122 + ,265769 + ,37 + ,96 + ,32 + ,70106 + ,269651 + ,31 + ,106 + ,30 + ,60578 + ,149112 + ,65 + ,56 + ,35 + ,79892 + ,152871 + ,74 + ,59 + ,28 + ,49810 + ,111665 + ,54 + ,39 + ,28 + ,71570 + ,116408 + ,76 + ,34 + ,39 + ,100708 + ,362301 + ,715 + ,76 + ,34 + ,33032 + ,78800 + ,57 + ,20 + ,26 + ,82875 + ,183167 + ,66 + ,91 + ,39 + ,139077 + ,277965 + ,106 + ,115 + ,39 + ,71595 + ,150629 + ,54 + ,85 + ,33 + ,72260 + ,168809 + ,32 + ,76 + ,28 + ,5950 + ,24188 + ,20 + ,8 + ,4 + ,115762 + ,329267 + ,71 + ,79 + ,39 + ,32551 + ,65029 + ,21 + ,21 + ,18 + ,31701 + ,101097 + ,70 + ,30 + ,14 + ,80670 + ,218946 + ,112 + ,76 + ,29 + ,143558 + ,244052 + ,66 + ,101 + ,44 + ,120733 + ,233328 + ,165 + ,92 + ,28 + ,105195 + ,256462 + ,56 + ,123 + ,35 + ,73107 + ,206161 + ,61 + ,75 + ,28 + ,132068 + ,311473 + ,53 + ,128 + ,38 + ,149193 + ,235800 + ,127 + ,105 + ,23 + ,46821 + ,177939 + ,63 + ,55 + ,36 + ,87011 + ,207176 + ,38 + ,56 + ,32 + ,95260 + ,196553 + ,50 + ,41 + ,29 + ,55183 + ,174184 + ,52 + ,72 + ,25 + ,106671 + ,143246 + ,42 + ,67 + ,27 + ,73511 + ,187559 + ,76 + ,75 + ,36 + ,92945 + ,187681 + ,67 + ,114 + ,28 + ,78664 + ,119016 + ,50 + ,118 + ,23 + ,70054 + ,182192 + ,53 + ,77 + ,40 + ,22618 + ,73566 + ,39 + ,22 + ,23 + ,74011 + ,194979 + ,50 + ,66 + ,40 + ,83737 + ,167488 + ,77 + ,69 + ,28 + ,69094 + ,143756 + ,57 + ,105 + ,34 + ,93133 + ,275541 + ,73 + ,116 + ,33 + ,95536 + ,243199 + ,34 + ,88 + ,28 + ,225920 + ,182999 + ,39 + ,73 + ,34 + ,62133 + ,135649 + ,46 + ,99 + ,30 + ,61370 + ,152299 + ,63 + ,62 + ,33 + ,43836 + ,120221 + ,35 + ,53 + ,22 + ,106117 + ,346485 + ,106 + ,118 + ,38 + ,38692 + ,145790 + ,43 + ,30 + ,26 + ,84651 + ,193339 + ,47 + ,100 + ,35 + ,56622 + ,80953 + ,31 + ,49 + ,8 + ,15986 + ,122774 + ,162 + ,24 + ,24 + ,95364 + ,130585 + ,57 + ,67 + ,29 + ,89691 + ,286468 + ,263 + ,57 + ,29 + ,67267 + ,241066 + ,78 + ,75 + ,45 + ,126846 + ,148446 + ,63 + ,135 + ,37 + ,41140 + ,204713 + ,54 + ,68 + ,33 + ,102860 + ,182079 + ,63 + ,124 + ,33 + ,51715 + ,140344 + ,77 + ,33 + ,25 + ,55801 + ,220516 + ,79 + ,98 + ,32 + ,111813 + ,243060 + ,110 + ,58 + ,29 + ,120293 + ,162765 + ,56 + ,68 + ,28 + ,138599 + ,182613 + ,56 + ,81 + ,28 + ,161647 + ,232138 + ,43 + ,131 + ,31 + ,115929 + ,265318 + ,111 + ,110 + ,52 + ,162901 + ,310839 + ,62 + ,130 + ,24 + ,109825 + ,225060 + ,56 + ,93 + ,41 + ,129838 + ,232317 + ,74 + ,118 + ,33 + ,37510 + ,144966 + ,60 + ,39 + ,32 + ,43750 + ,43287 + ,43 + ,13 + ,19 + ,40652 + ,155754 + ,68 + ,74 + ,20 + ,87771 + ,164709 + ,53 + ,81 + ,31 + ,85872 + ,201940 + ,87 + ,109 + ,31 + ,89275 + ,235454 + ,46 + ,151 + ,32 + ,192565 + ,99466 + ,32 + ,28 + ,23 + ,140867 + ,100750 + ,67 + ,83 + ,30 + ,120662 + ,224549 + ,47 + ,54 + ,31 + ,101338 + ,243511 + ,65 + ,133 + ,42 + ,1168 + ,22938 + ,9 + ,12 + ,1 + ,65567 + ,152474 + ,45 + ,106 + ,32 + ,25162 + ,61857 + ,25 + ,23 + ,11 + ,40735 + ,132487 + ,97 + ,71 + ,36 + ,91413 + ,317394 + ,53 + ,116 + ,31 + ,855 + ,21054 + ,2 + ,4 + ,0 + ,97068 + ,209641 + ,52 + ,62 + ,24 + ,14116 + ,31414 + ,22 + ,18 + ,8 + ,76643 + ,244749 + ,144 + ,98 + ,33 + ,110681 + ,184510 + ,60 + ,64 + ,40 + ,92696 + ,128423 + ,89 + ,32 + ,38 + ,94785 + ,97839 + ,42 + ,25 + ,24 + ,8773 + ,38214 + ,52 + ,16 + ,8 + ,83209 + ,151101 + ,98 + ,48 + ,35 + ,93815 + ,272458 + ,99 + ,100 + ,43 + ,86687 + ,172494 + ,52 + ,46 + ,43 + ,105547 + ,328107 + ,125 + ,129 + ,41 + ,103487 + ,250579 + ,106 + ,130 + ,38 + ,213688 + ,351067 + ,95 + ,136 + ,45 + ,71220 + ,158015 + ,40 + ,59 + ,31 + ,56926 + ,85439 + ,43 + ,32 + ,28 + ,91721 + ,229242 + ,128 + ,63 + ,31 + ,115168 + ,351619 + ,142 + ,95 + ,40 + ,111194 + ,84207 + ,73 + ,14 + ,30 + ,135777 + ,324598 + ,128 + ,113 + ,37 + ,51513 + ,131069 + ,61 + ,47 + ,30 + ,74163 + ,204271 + ,73 + ,92 + ,35 + ,51633 + ,165543 + ,148 + ,70 + ,32 + ,75345 + ,141722 + ,64 + ,19 + ,27 + ,98952 + ,299775 + ,97 + ,91 + ,31 + ,102372 + ,195838 + ,50 + ,111 + ,31 + ,37238 + ,173260 + ,37 + ,41 + ,21 + ,103772 + ,254488 + ,50 + ,120 + ,39 + ,123969 + ,104389 + ,105 + ,135 + ,41 + ,135400 + ,199476 + ,46 + ,87 + ,32 + ,130115 + ,224330 + ,52 + ,131 + ,39 + ,6023 + ,14688 + ,0 + ,4 + ,0 + ,64466 + ,181633 + ,48 + ,47 + ,30 + ,54990 + ,271856 + ,91 + ,109 + ,37 + ,1644 + ,7199 + ,0 + ,7 + ,0 + ,6179 + ,46660 + ,7 + ,12 + ,5 + ,3926 + ,17547 + ,3 + ,0 + ,1 + ,34777 + ,95227 + ,70 + ,37 + ,32 + ,73224 + ,152601 + ,36 + ,46 + ,24) + ,dim=c(5 + ,156) + ,dimnames=list(c('Tot_size' + ,'Time_RFC' + ,'PR_view' + ,'Blogged' + ,'Reviewed') + ,1:156)) > y <- array(NA,dim=c(5,156),dimnames=list(c('Tot_size','Time_RFC','PR_view','Blogged','Reviewed'),1:156)) > 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/wessaorg/rcomp/tmp/1tv3j1324045761.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/2z4r31324045761.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 = 9.1102, df = 154, p-value = 4.441e-16 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.4791989 0.6852001 sample estimates: cor 0.5917778 > 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/wessaorg/rcomp/tmp/3854k1324045761.tab") > > try(system("convert tmp/1tv3j1324045761.ps tmp/1tv3j1324045761.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.940 0.100 1.036