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(79 + ,94 + ,24188 + ,2 + ,58 + ,103 + ,18273 + ,NA + ,60 + ,93 + ,14130 + ,NA + ,108 + ,103 + ,32287 + ,4 + ,49 + ,51 + ,8654 + ,NA + ,0 + ,70 + ,9245 + ,NA + ,121 + ,91 + ,33251 + ,NA + ,1 + ,22 + ,1271 + ,NA + ,20 + ,38 + ,5279 + ,NA + ,43 + ,93 + ,27101 + ,0 + ,69 + ,60 + ,16373 + ,NA + ,78 + ,123 + ,19716 + ,0 + ,86 + ,148 + ,17753 + ,-4 + ,44 + ,90 + ,9028 + ,4 + ,104 + ,124 + ,18653 + ,4 + ,63 + ,70 + ,8828 + ,NA + ,158 + ,168 + ,29498 + ,0 + ,102 + ,115 + ,27563 + ,-1 + ,77 + ,71 + ,18293 + ,0 + ,82 + ,66 + ,22530 + ,NA + ,115 + ,134 + ,15977 + ,NA + ,101 + ,117 + ,35082 + ,NA + ,80 + ,108 + ,16116 + ,1 + ,50 + ,84 + ,15849 + ,NA + ,83 + ,156 + ,16026 + ,NA + ,123 + ,120 + ,26569 + ,0 + ,73 + ,114 + ,24785 + ,3 + ,81 + ,94 + ,17569 + ,NA + ,105 + ,120 + ,23825 + ,-1 + ,47 + ,81 + ,7869 + ,NA + ,105 + ,110 + ,14975 + ,NA + ,94 + ,133 + ,37791 + ,NA + ,44 + ,122 + ,9605 + ,NA + ,114 + ,158 + ,27295 + ,NA + ,38 + ,109 + ,2746 + ,NA + ,107 + ,124 + ,34461 + ,4 + ,30 + ,39 + ,8098 + ,NA + ,71 + ,92 + ,4787 + ,NA + ,84 + ,126 + ,24919 + ,3 + ,0 + ,0 + ,603 + ,NA + ,59 + ,70 + ,16329 + ,NA + ,33 + ,37 + ,12558 + ,1 + ,42 + ,38 + ,7784 + ,0 + ,96 + ,120 + ,28522 + ,-2 + ,106 + ,93 + ,22265 + ,-3 + ,56 + ,95 + ,14459 + ,-4 + ,57 + ,77 + ,14526 + ,NA + ,59 + ,90 + ,22240 + ,2 + ,39 + ,80 + ,11802 + ,NA + ,34 + ,31 + ,7623 + ,NA + ,76 + ,110 + ,11912 + ,2 + ,20 + ,66 + ,7935 + ,NA + ,91 + ,138 + ,18220 + ,-4 + ,115 + ,133 + ,19199 + ,3 + ,85 + ,113 + ,19918 + ,NA + ,76 + ,100 + ,21884 + ,NA + ,8 + ,7 + ,2694 + ,NA + ,79 + ,140 + ,15808 + ,NA + ,21 + ,61 + ,3597 + ,NA + ,30 + ,41 + ,5296 + ,NA + ,76 + ,96 + ,25239 + ,2 + ,101 + ,164 + ,29801 + ,2 + ,94 + ,78 + ,18450 + ,0 + ,27 + ,49 + ,7132 + ,NA + ,92 + ,102 + ,34861 + ,5 + ,123 + ,124 + ,35940 + ,NA + ,75 + ,99 + ,16688 + ,-2 + ,128 + ,129 + ,24683 + ,0 + ,105 + ,62 + ,46230 + ,NA + ,55 + ,73 + ,10387 + ,NA + ,56 + ,114 + ,21436 + ,-2 + ,41 + ,99 + ,30546 + ,-3 + ,72 + ,70 + ,19746 + ,NA + ,67 + ,104 + ,15977 + ,2 + ,75 + ,116 + ,22583 + ,NA + ,114 + ,91 + ,17274 + ,NA + ,118 + ,74 + ,16469 + ,NA + ,77 + ,138 + ,14251 + ,2 + ,22 + ,67 + ,3007 + ,NA + ,66 + ,151 + ,16851 + ,2 + ,69 + ,72 + ,21113 + ,0 + ,105 + ,120 + ,17401 + ,4 + ,116 + ,115 + ,23958 + ,4 + ,88 + ,105 + ,23567 + ,NA + ,73 + ,104 + ,13065 + ,NA + ,99 + ,108 + ,15358 + ,NA + ,62 + ,98 + ,14587 + ,2 + ,53 + ,69 + ,12770 + ,NA + ,118 + ,111 + ,24021 + ,NA + ,30 + ,99 + ,9648 + ,NA + ,100 + ,71 + ,20537 + ,2 + ,49 + ,27 + ,7905 + ,NA + ,24 + ,69 + ,4527 + ,NA + ,67 + ,107 + ,30495 + ,-4 + ,46 + ,73 + ,7117 + ,3 + ,57 + ,107 + ,17719 + ,NA + ,75 + ,93 + ,27056 + ,NA + ,135 + ,129 + ,33473 + ,3 + ,68 + ,69 + ,9758 + ,NA + ,124 + ,118 + ,21115 + ,2 + ,33 + ,73 + ,7236 + ,NA + ,98 + ,119 + ,13790 + ,NA + ,58 + ,104 + ,32902 + ,-1 + ,68 + ,107 + ,25131 + ,-3 + ,81 + ,99 + ,30910 + ,NA + ,131 + ,90 + ,35947 + ,NA + ,110 + ,197 + ,29848 + ,NA + ,37 + ,36 + ,6943 + ,0 + ,130 + ,85 + ,42705 + ,NA + ,93 + ,139 + ,31808 + ,1 + ,118 + ,106 + ,26675 + ,NA + ,39 + ,50 + ,8435 + ,NA + ,13 + ,64 + ,7409 + ,NA + ,74 + ,31 + ,14993 + ,NA + ,81 + ,63 + ,36867 + ,NA + ,109 + ,92 + ,33835 + ,NA + ,151 + ,106 + ,24164 + ,NA + ,51 + ,63 + ,12607 + ,NA + ,28 + ,69 + ,22609 + ,NA + ,40 + ,41 + ,5892 + ,NA + ,56 + ,56 + ,17014 + ,-3 + ,27 + ,25 + ,5394 + ,NA + ,37 + ,65 + ,9178 + ,NA + ,83 + ,93 + ,6440 + ,3 + ,54 + ,114 + ,21916 + ,NA + ,27 + ,38 + ,4011 + ,NA + ,28 + ,44 + ,5818 + ,NA + ,59 + ,87 + ,18647 + ,0 + ,133 + ,110 + ,20556 + ,0 + ,12 + ,0 + ,238 + ,NA + ,0 + ,27 + ,70 + ,NA + ,106 + ,83 + ,22392 + ,0 + ,23 + ,30 + ,3913 + ,NA + ,44 + ,80 + ,12237 + ,NA + ,71 + ,98 + ,8388 + ,3 + ,116 + ,82 + ,22120 + ,-3 + ,4 + ,0 + ,338 + ,NA + ,62 + ,60 + ,11727 + ,NA + ,12 + ,28 + ,3704 + ,NA + ,18 + ,9 + ,3988 + ,NA + ,14 + ,33 + ,3030 + ,NA + ,60 + ,59 + ,13520 + ,NA + ,7 + ,49 + ,1421 + ,NA + ,98 + ,115 + ,20923 + ,0 + ,64 + ,140 + ,20237 + ,-4 + ,29 + ,49 + ,3219 + ,NA + ,32 + ,120 + ,3769 + ,2 + ,25 + ,66 + ,12252 + ,-1 + ,16 + ,21 + ,1888 + ,NA + ,48 + ,124 + ,14497 + ,NA + ,100 + ,152 + ,28864 + ,NA + ,46 + ,139 + ,21721 + ,3 + ,45 + ,38 + ,4821 + ,NA + ,129 + ,144 + ,33644 + ,NA + ,130 + ,120 + ,15923 + ,NA + ,136 + ,160 + ,42935 + ,NA + ,59 + ,114 + ,18864 + ,NA + ,25 + ,39 + ,4977 + ,NA + ,32 + ,78 + ,7785 + ,NA + ,63 + ,119 + ,17939 + ,2 + ,95 + ,141 + ,23436 + ,5 + ,14 + ,101 + ,325 + ,NA + ,36 + ,56 + ,13539 + ,NA + ,113 + ,133 + ,34538 + ,2 + ,47 + ,83 + ,12198 + ,NA + ,92 + ,116 + ,26924 + ,NA + ,70 + ,90 + ,12716 + ,NA + ,19 + ,36 + ,8172 + ,NA + ,50 + ,50 + ,10855 + ,NA + ,41 + ,61 + ,11932 + ,NA + ,91 + ,97 + ,14300 + ,NA + ,111 + ,98 + ,25515 + ,-2 + ,41 + ,78 + ,2805 + ,NA + ,120 + ,117 + ,29402 + ,0 + ,135 + ,148 + ,16440 + ,NA + ,27 + ,41 + ,11221 + ,NA + ,87 + ,105 + ,28732 + ,3 + ,25 + ,55 + ,5250 + ,-2 + ,131 + ,132 + ,28608 + ,0 + ,45 + ,44 + ,8092 + ,NA + ,29 + ,21 + ,4473 + ,NA + ,58 + ,50 + ,1572 + ,NA + ,4 + ,0 + ,2065 + ,NA + ,47 + ,73 + ,14817 + ,6 + ,109 + ,86 + ,16714 + ,-3 + ,7 + ,0 + ,556 + ,NA + ,12 + ,13 + ,2089 + ,NA + ,0 + ,4 + ,2658 + ,NA + ,37 + ,57 + ,10695 + ,NA + ,37 + ,48 + ,1669 + ,3 + ,46 + ,46 + ,16267 + ,NA + ,15 + ,48 + ,7768 + ,0 + ,42 + ,32 + ,7252 + ,NA + ,7 + ,68 + ,6387 + ,NA + ,54 + ,87 + ,18715 + ,NA + ,54 + ,43 + ,7936 + ,-2 + ,14 + ,67 + ,8643 + ,NA + ,16 + ,46 + ,7294 + ,1 + ,33 + ,46 + ,4570 + ,NA + ,32 + ,56 + ,7185 + ,NA + ,21 + ,48 + ,10058 + ,NA + ,15 + ,44 + ,2342 + ,NA + ,38 + ,60 + ,8509 + ,NA + ,22 + ,65 + ,13275 + ,0 + ,28 + ,55 + ,6816 + ,NA + ,10 + ,38 + ,1930 + ,NA + ,31 + ,52 + ,8086 + ,NA + ,32 + ,60 + ,10737 + ,NA + ,32 + ,54 + ,8033 + ,NA + ,43 + ,86 + ,7058 + ,NA + ,27 + ,24 + ,6782 + ,NA + ,37 + ,52 + ,5401 + ,2 + ,20 + ,49 + ,6521 + ,NA + ,32 + ,61 + ,10856 + ,NA + ,0 + ,61 + ,2154 + ,NA + ,5 + ,81 + ,6117 + ,NA + ,26 + ,43 + ,5238 + ,NA + ,10 + ,40 + ,4820 + ,NA + ,27 + ,40 + ,5615 + ,NA + ,11 + ,56 + ,4272 + ,NA + ,29 + ,68 + ,8702 + ,2 + ,25 + ,79 + ,15340 + ,NA + ,55 + ,47 + ,8030 + ,-3 + ,23 + ,57 + ,9526 + ,NA + ,5 + ,41 + ,1278 + ,-2 + ,43 + ,29 + ,4236 + ,NA + ,23 + ,3 + ,3023 + ,NA + ,34 + ,60 + ,7196 + ,NA + ,36 + ,30 + ,3394 + ,NA + ,35 + ,79 + ,6371 + ,NA + ,0 + ,47 + ,1574 + ,1 + ,37 + ,40 + ,9620 + ,NA + ,28 + ,48 + ,6978 + ,NA + ,16 + ,36 + ,4911 + ,NA + ,26 + ,42 + ,8645 + ,NA + ,38 + ,49 + ,8987 + ,NA + ,23 + ,57 + ,5544 + ,NA + ,22 + ,12 + ,3083 + ,NA + ,30 + ,40 + ,6909 + ,NA + ,16 + ,43 + ,3189 + ,NA + ,18 + ,33 + ,6745 + ,NA + ,28 + ,77 + ,16724 + ,NA + ,32 + ,43 + ,4850 + ,NA + ,21 + ,45 + ,7025 + ,NA + ,23 + ,47 + ,6047 + ,NA + ,29 + ,43 + ,7377 + ,NA + ,50 + ,45 + ,9078 + ,NA + ,12 + ,50 + ,4605 + ,NA + ,21 + ,35 + ,3238 + ,NA + ,18 + ,7 + ,8100 + ,NA + ,27 + ,71 + ,9653 + ,-4 + ,41 + ,67 + ,8914 + ,NA + ,13 + ,0 + ,786 + ,NA + ,12 + ,62 + ,6700 + ,NA + ,21 + ,54 + ,5788 + ,NA + ,8 + ,4 + ,593 + ,NA + ,26 + ,25 + ,4506 + ,NA + ,27 + ,40 + ,6382 + ,NA + ,13 + ,38 + ,5621 + ,NA + ,16 + ,19 + ,3997 + ,NA + ,2 + ,17 + ,520 + ,NA + ,42 + ,67 + ,8891 + ,NA + ,5 + ,14 + ,999 + ,NA + ,37 + ,30 + ,7067 + ,0 + ,17 + ,54 + ,4639 + ,NA + ,38 + ,35 + ,5654 + ,NA + ,37 + ,59 + ,6928 + ,NA + ,29 + ,24 + ,1514 + ,1 + ,32 + ,58 + ,9238 + ,NA + ,35 + ,42 + ,8204 + ,NA + ,17 + ,46 + ,5926 + ,NA + ,20 + ,61 + ,5785 + ,NA + ,7 + ,3 + ,4 + ,NA + ,46 + ,52 + ,5930 + ,NA + ,24 + ,25 + ,3710 + ,NA + ,40 + ,40 + ,705 + ,NA + ,3 + ,32 + ,443 + ,NA + ,10 + ,4 + ,2416 + ,NA + ,37 + ,49 + ,7747 + ,NA + ,17 + ,63 + ,5432 + ,0 + ,28 + ,67 + ,4913 + ,NA + ,19 + ,32 + ,2650 + ,NA + ,29 + ,23 + ,2370 + ,NA + ,8 + ,7 + ,775 + ,NA + ,10 + ,54 + ,5576 + ,NA + ,15 + ,37 + ,1352 + ,NA + ,15 + ,35 + ,3080 + ,NA + ,28 + ,51 + ,10205 + ,NA + ,17 + ,39 + ,6095 + ,NA) + ,dim=c(4 + ,289) + ,dimnames=list(c('blogged_comp.' + ,'feedb.mess.long' + ,'tot.revisions' + ,'Result_test') + ,1:289)) > y <- array(NA,dim=c(4,289),dimnames=list(c('blogged_comp.','feedb.mess.long','tot.revisions','Result_test'),1:289)) > 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/1s9l61324663885.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] 4 > 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/2jvjc1324663885.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 = 20.6992, df = 287, p-value < 2.2e-16 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.7230375 0.8163483 sample estimates: cor 0.7738587 > 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 > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/3xblr1324663885.tab") > > try(system("convert tmp/1s9l61324663885.ps tmp/1s9l61324663885.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.011 0.095 1.100