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 + ,73 + ,279055 + ,95 + ,96 + ,110459 + ,74 + ,212083 + ,68 + ,75 + ,105079 + ,83 + ,233939 + ,64 + ,70 + ,112098 + ,106 + ,222117 + ,139 + ,134 + ,43929 + ,54 + ,179751 + ,51 + ,72 + ,76173 + ,28 + ,70849 + ,46 + ,8 + ,187326 + ,131 + ,568125 + ,118 + ,169 + ,22807 + ,19 + ,33186 + ,46 + ,1 + ,144408 + ,62 + ,227332 + ,79 + ,88 + ,66485 + ,48 + ,258874 + ,76 + ,98 + ,79089 + ,119 + ,357366 + ,82 + ,112 + ,81625 + ,130 + ,263934 + ,66 + ,125 + ,68788 + ,83 + ,204003 + ,60 + ,57 + ,103297 + ,85 + ,368577 + ,117 + ,139 + ,69446 + ,88 + ,269455 + ,50 + ,87 + ,114948 + ,187 + ,395936 + ,133 + ,176 + ,167949 + ,76 + ,335567 + ,63 + ,114 + ,125081 + ,171 + ,423110 + ,100 + ,121 + ,125818 + ,58 + ,182016 + ,44 + ,103 + ,136588 + ,88 + ,267365 + ,65 + ,135 + ,112431 + ,73 + ,279428 + ,103 + ,123 + ,103037 + ,111 + ,508849 + ,103 + ,99 + ,82317 + ,47 + ,206722 + ,62 + ,74 + ,118906 + ,58 + ,200004 + ,70 + ,103 + ,83515 + ,133 + ,257139 + ,159 + ,158 + ,104581 + ,137 + ,270815 + ,78 + ,116 + ,103129 + ,133 + ,296850 + ,101 + ,102 + ,83243 + ,90 + ,307100 + ,73 + ,132 + ,37110 + ,58 + ,184160 + ,58 + ,62 + ,113344 + ,79 + ,393860 + ,147 + ,150 + ,139165 + ,89 + ,327660 + ,54 + ,143 + ,86652 + ,82 + ,252512 + ,84 + ,50 + ,112302 + ,102 + ,373013 + ,56 + ,141 + ,69652 + ,47 + ,115602 + ,45 + ,48 + ,119442 + ,103 + ,430118 + ,87 + ,141 + ,69867 + ,56 + ,273950 + ,87 + ,83 + ,101629 + ,128 + ,428077 + ,77 + ,112 + ,70168 + ,91 + ,251349 + ,72 + ,79 + ,31081 + ,34 + ,115658 + ,36 + ,33 + ,103925 + ,209 + ,395417 + ,51 + ,152 + ,92622 + ,85 + ,343783 + ,44 + ,126 + ,79011 + ,77 + ,207083 + ,75 + ,85 + ,93487 + ,82 + ,214456 + ,87 + ,84 + ,64520 + ,67 + ,182398 + ,97 + ,68 + ,93473 + ,84 + ,157164 + ,90 + ,50 + ,114360 + ,157 + ,459455 + ,860 + ,101 + ,33032 + ,42 + ,78800 + ,57 + ,20 + ,96125 + ,84 + ,217932 + ,99 + ,101 + ,151911 + ,123 + ,368086 + ,120 + ,150 + ,89256 + ,67 + ,215843 + ,76 + ,118 + ,95676 + ,80 + ,244765 + ,56 + ,99 + ,5950 + ,24 + ,24188 + ,20 + ,8 + ,149695 + ,333 + ,399093 + ,94 + ,88 + ,32551 + ,17 + ,65029 + ,21 + ,21 + ,31701 + ,64 + ,101097 + ,70 + ,30 + ,100087 + ,65 + ,305640 + ,133 + ,98 + ,169707 + ,90 + ,369627 + ,86 + ,163 + ,150491 + ,204 + ,367127 + ,224 + ,132 + ,120192 + ,152 + ,374193 + ,65 + ,161 + ,95893 + ,89 + ,270099 + ,86 + ,89 + ,151715 + ,151 + ,391871 + ,70 + ,160 + ,176225 + ,121 + ,315924 + ,148 + ,139 + ,59900 + ,124 + ,291391 + ,72 + ,104 + ,104767 + ,93 + ,295075 + ,59 + ,103 + ,114799 + ,81 + ,280018 + ,67 + ,66 + ,72128 + ,71 + ,267432 + ,58 + ,163 + ,143592 + ,140 + ,215924 + ,60 + ,93 + ,89626 + ,157 + ,256641 + ,105 + ,85 + ,131072 + ,87 + ,260919 + ,84 + ,150 + ,126817 + ,73 + ,182961 + ,63 + ,143 + ,81351 + ,74 + ,256967 + ,67 + ,107 + ,22618 + ,32 + ,73566 + ,39 + ,22 + ,88977 + ,93 + ,272362 + ,60 + ,85 + ,92059 + ,61 + ,220707 + ,94 + ,91 + ,81897 + ,68 + ,228835 + ,67 + ,131 + ,108146 + ,91 + ,371391 + ,96 + ,140 + ,126372 + ,104 + ,398210 + ,54 + ,156 + ,249771 + ,110 + ,220401 + ,54 + ,81 + ,71154 + ,70 + ,229333 + ,62 + ,137 + ,71571 + ,71 + ,217623 + ,71 + ,102 + ,55918 + ,53 + ,200046 + ,50 + ,72 + ,160141 + ,131 + ,483074 + ,117 + ,161 + ,38692 + ,71 + ,145943 + ,45 + ,30 + ,102812 + ,108 + ,295224 + ,61 + ,120 + ,56622 + ,25 + ,80953 + ,31 + ,49 + ,15986 + ,61 + ,180759 + ,175 + ,71 + ,123534 + ,61 + ,179344 + ,70 + ,76 + ,108535 + ,221 + ,415550 + ,284 + ,85 + ,93879 + ,128 + ,369093 + ,95 + ,146 + ,144551 + ,106 + ,180679 + ,72 + ,165 + ,56750 + ,104 + ,299505 + ,63 + ,89 + ,127654 + ,84 + ,292260 + ,75 + ,168 + ,65594 + ,67 + ,199481 + ,90 + ,48 + ,59938 + ,78 + ,282361 + ,89 + ,149 + ,146975 + ,89 + ,329281 + ,138 + ,75 + ,165904 + ,48 + ,234577 + ,68 + ,107 + ,169265 + ,67 + ,297995 + ,80 + ,116 + ,183500 + ,88 + ,305984 + ,65 + ,165 + ,165986 + ,163 + ,416463 + ,130 + ,155 + ,184923 + ,118 + ,414359 + ,85 + ,165 + ,140358 + ,142 + ,297080 + ,83 + ,121 + ,149959 + ,70 + ,318283 + ,89 + ,156 + ,57224 + ,197 + ,222281 + ,116 + ,86 + ,43750 + ,14 + ,43287 + ,43 + ,13 + ,48029 + ,86 + ,223456 + ,87 + ,113 + ,104978 + ,159 + ,261598 + ,80 + ,114 + ,100046 + ,60 + ,299566 + ,132 + ,133 + ,101047 + ,95 + ,321797 + ,59 + ,169 + ,197426 + ,89 + ,174736 + ,50 + ,30 + ,160902 + ,102 + ,169579 + ,87 + ,121 + ,147172 + ,77 + ,354041 + ,62 + ,82 + ,109432 + ,90 + ,303273 + ,70 + ,148 + ,1168 + ,13 + ,23668 + ,9 + ,12 + ,83248 + ,79 + ,196743 + ,54 + ,146 + ,25162 + ,25 + ,61857 + ,25 + ,23 + ,45724 + ,53 + ,207339 + ,113 + ,84 + ,110529 + ,123 + ,431443 + ,63 + ,163 + ,855 + ,16 + ,21054 + ,2 + ,4 + ,101382 + ,52 + ,252805 + ,67 + ,81 + ,14116 + ,22 + ,31961 + ,22 + ,18 + ,89506 + ,124 + ,360401 + ,157 + ,118 + ,135356 + ,76 + ,251240 + ,79 + ,76 + ,116066 + ,96 + ,187003 + ,113 + ,55 + ,144244 + ,58 + ,180842 + ,50 + ,62 + ,8773 + ,34 + ,38214 + ,52 + ,16 + ,102153 + ,55 + ,278173 + ,113 + ,98 + ,117440 + ,84 + ,358276 + ,115 + ,137 + ,104128 + ,66 + ,211775 + ,78 + ,50 + ,134238 + ,89 + ,445926 + ,135 + ,152 + ,134047 + ,99 + ,348017 + ,120 + ,163 + ,279488 + ,133 + ,441946 + ,122 + ,142 + ,79756 + ,42 + ,210700 + ,54 + ,77 + ,66089 + ,46 + ,126320 + ,63 + ,59 + ,102070 + ,361 + ,316128 + ,162 + ,94 + ,146760 + ,198 + ,466139 + ,162 + ,128 + ,154771 + ,62 + ,162279 + ,107 + ,63 + ,165933 + ,139 + ,412099 + ,146 + ,127 + ,64593 + ,83 + ,173802 + ,77 + ,59 + ,92280 + ,54 + ,292443 + ,87 + ,118 + ,67150 + ,100 + ,283913 + ,192 + ,110 + ,128692 + ,126 + ,244802 + ,75 + ,45 + ,124089 + ,125 + ,387072 + ,131 + ,96 + ,125386 + ,92 + ,246963 + ,67 + ,128 + ,37238 + ,63 + ,173260 + ,37 + ,41 + ,140015 + ,108 + ,346748 + ,61 + ,146 + ,150047 + ,58 + ,176654 + ,127 + ,147 + ,154451 + ,92 + ,264767 + ,58 + ,121 + ,156349 + ,112 + ,314070 + ,71 + ,185 + ,0 + ,0 + ,1 + ,0 + ,0 + ,6023 + ,10 + ,14688 + ,0 + ,4 + ,0 + ,1 + ,98 + ,0 + ,0 + ,0 + ,2 + ,455 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,84601 + ,92 + ,284420 + ,72 + ,85 + ,68946 + ,164 + ,410509 + ,123 + ,157 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,203 + ,0 + ,0 + ,1644 + ,5 + ,7199 + ,0 + ,7 + ,6179 + ,20 + ,46660 + ,7 + ,12 + ,3926 + ,5 + ,17547 + ,3 + ,0 + ,52789 + ,46 + ,121550 + ,106 + ,37 + ,0 + ,2 + ,969 + ,0 + ,0 + ,100350 + ,74 + ,242258 + ,53 + ,62) + ,dim=c(5 + ,164) + ,dimnames=list(c('Characters' + ,'Logins' + ,'Time' + ,'PR' + ,'Computations') + ,1:164)) > y <- array(NA,dim=c(5,164),dimnames=list(c('Characters','Logins','Time','PR','Computations'),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/1zk0s1324625223.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/2rn631324625223.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 = 8.3743, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.4425251 > 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/3xgt11324625223.tab") > > try(system("convert tmp/1zk0s1324625223.ps tmp/1zk0s1324625223.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.131 0.147 1.316