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(140824 + ,165 + ,186099 + ,38 + ,110459 + ,135 + ,113854 + ,34 + ,105079 + ,121 + ,99776 + ,42 + ,112098 + ,148 + ,106194 + ,38 + ,43929 + ,73 + ,100792 + ,27 + ,76173 + ,49 + ,47552 + ,35 + ,187326 + ,185 + ,250931 + ,33 + ,22807 + ,5 + ,6853 + ,18 + ,144408 + ,125 + ,115466 + ,34 + ,66485 + ,93 + ,110896 + ,33 + ,79089 + ,154 + ,169351 + ,46 + ,81625 + ,98 + ,94853 + ,55 + ,68788 + ,70 + ,72591 + ,37 + ,103297 + ,148 + ,101345 + ,55 + ,69446 + ,100 + ,113713 + ,44 + ,114948 + ,150 + ,165354 + ,59 + ,167949 + ,197 + ,164263 + ,36 + ,125081 + ,114 + ,135213 + ,39 + ,125818 + ,169 + ,111669 + ,29 + ,136588 + ,200 + ,134163 + ,51 + ,112431 + ,148 + ,140303 + ,49 + ,103037 + ,140 + ,150773 + ,39 + ,82317 + ,74 + ,111848 + ,25 + ,118906 + ,128 + ,102509 + ,52 + ,83515 + ,140 + ,96785 + ,45 + ,104581 + ,116 + ,116136 + ,38 + ,103129 + ,147 + ,158376 + ,41 + ,83243 + ,132 + ,153990 + ,43 + ,37110 + ,70 + ,64057 + ,32 + ,113344 + ,144 + ,230054 + ,41 + ,139165 + ,155 + ,184531 + ,47 + ,86652 + ,165 + ,114198 + ,50 + ,112302 + ,161 + ,198299 + ,48 + ,69652 + ,31 + ,33750 + ,37 + ,119442 + ,199 + ,189723 + ,43 + ,69867 + ,78 + ,100826 + ,42 + ,101629 + ,121 + ,188355 + ,44 + ,70168 + ,112 + ,104470 + ,36 + ,31081 + ,41 + ,58391 + ,17 + ,103925 + ,158 + ,164808 + ,42 + ,92622 + ,123 + ,134097 + ,39 + ,79011 + ,104 + ,80238 + ,41 + ,93487 + ,94 + ,133252 + ,36 + ,64520 + ,73 + ,54518 + ,47 + ,93473 + ,52 + ,121850 + ,45 + ,114360 + ,71 + ,79367 + ,41 + ,33032 + ,21 + ,56968 + ,26 + ,96125 + ,155 + ,106314 + ,52 + ,151911 + ,174 + ,191889 + ,47 + ,89256 + ,136 + ,104864 + ,45 + ,95671 + ,128 + ,160791 + ,40 + ,5950 + ,7 + ,15049 + ,4 + ,149695 + ,165 + ,191179 + ,44 + ,32551 + ,21 + ,25109 + ,18 + ,31701 + ,35 + ,45824 + ,14 + ,100087 + ,137 + ,129711 + ,37 + ,169707 + ,174 + ,210012 + ,61 + ,150491 + ,257 + ,194679 + ,39 + ,120192 + ,207 + ,197680 + ,42 + ,95893 + ,103 + ,81180 + ,36 + ,151715 + ,171 + ,197765 + ,49 + ,176225 + ,279 + ,214738 + ,28 + ,59900 + ,83 + ,96252 + ,43 + ,104767 + ,130 + ,124527 + ,42 + ,114799 + ,131 + ,153242 + ,37 + ,72128 + ,126 + ,145707 + ,30 + ,143592 + ,158 + ,113963 + ,35 + ,89626 + ,138 + ,134904 + ,44 + ,131072 + ,200 + ,114268 + ,36 + ,126817 + ,104 + ,94333 + ,28 + ,81351 + ,111 + ,102204 + ,45 + ,22618 + ,26 + ,23824 + ,23 + ,88977 + ,115 + ,111563 + ,45 + ,92059 + ,127 + ,91313 + ,38 + ,81897 + ,140 + ,89770 + ,38 + ,108146 + ,121 + ,100125 + ,46 + ,126372 + ,183 + ,165278 + ,36 + ,249771 + ,68 + ,181712 + ,41 + ,71154 + ,112 + ,80906 + ,38 + ,71571 + ,103 + ,75881 + ,37 + ,55918 + ,63 + ,83963 + ,28 + ,160141 + ,166 + ,175721 + ,45 + ,38692 + ,38 + ,68580 + ,26 + ,102812 + ,163 + ,136323 + ,44 + ,56622 + ,59 + ,55792 + ,8 + ,15986 + ,27 + ,25157 + ,27 + ,123534 + ,108 + ,100922 + ,38 + ,108535 + ,88 + ,118845 + ,37 + ,93879 + ,92 + ,170492 + ,57 + ,144551 + ,170 + ,81716 + ,45 + ,56750 + ,98 + ,115750 + ,37 + ,127654 + ,205 + ,105590 + ,40 + ,65594 + ,96 + ,92795 + ,31 + ,59938 + ,107 + ,82390 + ,36 + ,146975 + ,150 + ,135599 + ,40 + ,143372 + ,123 + ,111542 + ,36 + ,168553 + ,176 + ,162519 + ,35 + ,183500 + ,213 + ,211381 + ,39 + ,165986 + ,208 + ,189944 + ,65 + ,184923 + ,307 + ,226168 + ,30 + ,140358 + ,125 + ,117495 + ,51 + ,149959 + ,208 + ,195894 + ,41 + ,57224 + ,73 + ,80684 + ,36 + ,43750 + ,49 + ,19630 + ,19 + ,48029 + ,82 + ,88634 + ,23 + ,104978 + ,206 + ,139292 + ,44 + ,100046 + ,112 + ,128602 + ,40 + ,101047 + ,139 + ,135848 + ,40 + ,197426 + ,60 + ,178377 + ,30 + ,160902 + ,70 + ,106330 + ,41 + ,147172 + ,112 + ,178303 + ,40 + ,109432 + ,142 + ,116938 + ,45 + ,1168 + ,11 + ,5841 + ,1 + ,83248 + ,130 + ,106020 + ,40 + ,25162 + ,31 + ,24610 + ,11 + ,45724 + ,132 + ,74151 + ,45 + ,110529 + ,219 + ,232241 + ,38 + ,855 + ,4 + ,6622 + ,0 + ,101382 + ,102 + ,127097 + ,30 + ,14116 + ,39 + ,13155 + ,8 + ,89506 + ,125 + ,160501 + ,39 + ,135356 + ,121 + ,91502 + ,48 + ,116066 + ,42 + ,24469 + ,48 + ,144244 + ,111 + ,88229 + ,29 + ,8773 + ,16 + ,13983 + ,8 + ,102153 + ,70 + ,80716 + ,43 + ,117440 + ,162 + ,157384 + ,52 + ,104128 + ,173 + ,122975 + ,53 + ,134238 + ,171 + ,191469 + ,48 + ,134047 + ,172 + ,231257 + ,48 + ,279488 + ,254 + ,258287 + ,50 + ,79756 + ,90 + ,122531 + ,40 + ,66089 + ,50 + ,61394 + ,36 + ,102070 + ,113 + ,86480 + ,40 + ,146760 + ,187 + ,195791 + ,46 + ,154771 + ,16 + ,18284 + ,42 + ,165933 + ,175 + ,147581 + ,46 + ,64593 + ,90 + ,72558 + ,39 + ,92280 + ,140 + ,147341 + ,41 + ,67150 + ,145 + ,114651 + ,46 + ,128692 + ,141 + ,100187 + ,32 + ,124089 + ,125 + ,130332 + ,39 + ,125386 + ,241 + ,134218 + ,39 + ,37238 + ,16 + ,10901 + ,21 + ,140015 + ,175 + ,145758 + ,45 + ,150047 + ,132 + ,75767 + ,50 + ,154451 + ,154 + ,134969 + ,36 + ,156349 + ,198 + ,169216 + ,44 + ,0 + ,0 + ,0 + ,0 + ,6023 + ,5 + ,7953 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,84601 + ,125 + ,105406 + ,37 + ,68946 + ,174 + ,174586 + ,52 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1644 + ,6 + ,4245 + ,0 + ,6179 + ,13 + ,21509 + ,5 + ,3926 + ,3 + ,7670 + ,1 + ,52789 + ,35 + ,15673 + ,43 + ,0 + ,0 + ,0 + ,0 + ,100350 + ,80 + ,75882 + ,34) + ,dim=c(4 + ,164) + ,dimnames=list(c('Characters' + ,'Hyperlinks' + ,'Seconds' + ,'Reviewed_Compendiums') + ,1:164)) > y <- array(NA,dim=c(4,164),dimnames=list(c('Characters','Hyperlinks','Seconds','Reviewed_Compendiums'),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/1b6gv1324213241.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/2wicg1324213241.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.3885, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.6019645 > 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/3dpq41324213241.tab") > > try(system("convert tmp/1b6gv1324213241.ps tmp/1b6gv1324213241.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.909 0.087 0.994