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(162687 + ,48 + ,82 + ,20465 + ,233285 + ,75 + ,96 + ,33629 + ,7215 + ,0 + ,0 + ,1423 + ,164587 + ,74 + ,90 + ,25629 + ,283430 + ,92 + ,132 + ,54002 + ,546996 + ,137 + ,140 + ,151036 + ,192501 + ,65 + ,100 + ,33287 + ,213538 + ,97 + ,132 + ,31172 + ,182282 + ,62 + ,121 + ,28113 + ,336547 + ,72 + ,108 + ,57803 + ,122275 + ,50 + ,63 + ,49830 + ,203938 + ,88 + ,118 + ,52143 + ,119300 + ,68 + ,71 + ,21055 + ,220796 + ,79 + ,112 + ,47007 + ,174005 + ,56 + ,63 + ,28735 + ,156326 + ,54 + ,86 + ,59147 + ,164063 + ,101 + ,148 + ,78950 + ,90025 + ,13 + ,54 + ,13497 + ,179987 + ,80 + ,134 + ,46154 + ,47066 + ,19 + ,57 + ,53249 + ,109572 + ,33 + ,59 + ,10726 + ,241285 + ,99 + ,113 + ,83700 + ,208339 + ,38 + ,96 + ,40400 + ,164166 + ,68 + ,96 + ,33797 + ,159763 + ,54 + ,78 + ,36205 + ,207078 + ,63 + ,80 + ,30165 + ,217028 + ,66 + ,93 + ,58534 + ,201536 + ,90 + ,109 + ,44663 + ,408960 + ,75 + ,115 + ,92556 + ,250260 + ,68 + ,94 + ,40078 + ,216527 + ,69 + ,118 + ,34711 + ,212949 + ,80 + ,71 + ,31076 + ,164248 + ,59 + ,75 + ,74608 + ,276436 + ,135 + ,108 + ,58092 + ,238654 + ,75 + ,100 + ,42009 + ,0 + ,0 + ,0 + ,0 + ,233971 + ,54 + ,121 + ,36022 + ,149649 + ,62 + ,51 + ,23333 + ,161703 + ,46 + ,119 + ,53349 + ,254893 + ,83 + ,136 + ,92596 + ,269492 + ,106 + ,84 + ,49598 + ,169526 + ,51 + ,136 + ,44093 + ,107893 + ,27 + ,84 + ,84205 + ,229714 + ,78 + ,92 + ,63369 + ,139667 + ,71 + ,103 + ,60132 + ,175983 + ,44 + ,88 + ,37403 + ,81407 + ,23 + ,106 + ,24460 + ,251259 + ,78 + ,96 + ,46456 + ,239807 + ,60 + ,124 + ,66616 + ,172743 + ,73 + ,106 + ,41554 + ,48188 + ,12 + ,82 + ,22346 + ,169355 + ,104 + ,87 + ,30874 + ,335398 + ,95 + ,97 + ,68701 + ,244729 + ,57 + ,107 + ,35728 + ,208286 + ,68 + ,130 + ,29010 + ,159913 + ,44 + ,43 + ,23110 + ,232137 + ,62 + ,96 + ,38844 + ,101694 + ,26 + ,100 + ,27084 + ,157258 + ,67 + ,91 + ,35139 + ,211586 + ,36 + ,136 + ,57476 + ,181076 + ,56 + ,128 + ,33277 + ,158024 + ,55 + ,87 + ,31141 + ,141491 + ,54 + ,74 + ,61281 + ,130108 + ,61 + ,96 + ,25820 + ,166420 + ,27 + ,102 + ,23284 + ,135509 + ,64 + ,122 + ,35378 + ,195043 + ,76 + ,144 + ,74990 + ,138708 + ,93 + ,90 + ,29653 + ,116552 + ,59 + ,97 + ,64622 + ,31970 + ,5 + ,78 + ,4157 + ,277661 + ,58 + ,72 + ,29245 + ,167825 + ,47 + ,53 + ,50008 + ,135926 + ,88 + ,120 + ,52338 + ,136647 + ,57 + ,66 + ,13310 + ,171518 + ,81 + ,150 + ,92901 + ,108980 + ,35 + ,117 + ,10956 + ,183471 + ,102 + ,123 + ,34241 + ,167426 + ,73 + ,122 + ,75043 + ,112510 + ,32 + ,75 + ,21152 + ,92421 + ,34 + ,122 + ,42249 + ,117169 + ,80 + ,106 + ,42005 + ,304603 + ,49 + ,116 + ,41152 + ,75101 + ,30 + ,86 + ,14399 + ,145043 + ,57 + ,90 + ,28263 + ,95827 + ,54 + ,87 + ,17215 + ,173931 + ,38 + ,99 + ,48140 + ,250424 + ,63 + ,132 + ,62897 + ,115367 + ,58 + ,96 + ,22883 + ,125839 + ,49 + ,91 + ,41622 + ,164078 + ,46 + ,77 + ,40715 + ,158931 + ,51 + ,104 + ,65897 + ,190382 + ,90 + ,100 + ,76542 + ,155226 + ,45 + ,94 + ,37477 + ,146159 + ,28 + ,60 + ,53216 + ,62641 + ,26 + ,46 + ,40911 + ,258585 + ,54 + ,135 + ,57021 + ,199841 + ,96 + ,99 + ,73116 + ,19349 + ,13 + ,2 + ,3895 + ,247280 + ,43 + ,96 + ,46609 + ,164984 + ,42 + ,109 + ,29351 + ,72128 + ,30 + ,15 + ,2325 + ,104253 + ,59 + ,68 + ,31747 + ,151090 + ,73 + ,102 + ,32665 + ,147990 + ,40 + ,93 + ,19249 + ,87448 + ,36 + ,46 + ,15292 + ,27676 + ,2 + ,59 + ,5842 + ,170326 + ,103 + ,116 + ,33994 + ,132148 + ,30 + ,29 + ,13018 + ,0 + ,0 + ,0 + ,0 + ,133868 + ,78 + ,91 + ,98177 + ,109001 + ,25 + ,76 + ,37941 + ,158833 + ,59 + ,86 + ,31032 + ,150013 + ,60 + ,84 + ,32683 + ,89887 + ,36 + ,65 + ,34545 + ,3616 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,216479 + ,51 + ,89 + ,27525 + ,177323 + ,79 + ,114 + ,66856 + ,177948 + ,30 + ,132 + ,28549 + ,140106 + ,43 + ,100 + ,38610 + ,43410 + ,7 + ,3 + ,2781 + ,206059 + ,92 + ,109 + ,41211 + ,109873 + ,32 + ,81 + ,22698 + ,157084 + ,84 + ,125 + ,41194 + ,60493 + ,3 + ,48 + ,32689 + ,19764 + ,10 + ,8 + ,5752 + ,177559 + ,47 + ,80 + ,26757 + ,154169 + ,44 + ,107 + ,22527 + ,164249 + ,54 + ,140 + ,44810 + ,11796 + ,1 + ,8 + ,0 + ,10674 + ,0 + ,0 + ,0 + ,151322 + ,46 + ,56 + ,100674 + ,6836 + ,0 + ,4 + ,0 + ,174712 + ,51 + ,70 + ,57786 + ,5118 + ,5 + ,0 + ,0 + ,40248 + ,8 + ,14 + ,5444 + ,0 + ,0 + ,0 + ,0 + ,127628 + ,38 + ,104 + ,28470 + ,88837 + ,21 + ,89 + ,61849 + ,7131 + ,0 + ,0 + ,0 + ,9056 + ,0 + ,12 + ,2179 + ,97191 + ,26 + ,60 + ,8019 + ,157478 + ,53 + ,95 + ,39644 + ,125583 + ,31 + ,88 + ,23494) + ,dim=c(4 + ,144) + ,dimnames=list(c('time' + ,'bloggedcomputations' + ,'feedbackpr' + ,'characters') + ,1:144)) > y <- array(NA,dim=c(4,144),dimnames=list(c('time','bloggedcomputations','feedbackpr','characters'),1:144)) > 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/1gt051324605868.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/2hovp1324605868.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 = 14.3488, df = 142, p-value < 2.2e-16 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.6929205 0.8286051 sample estimates: cor 0.7693 > 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/3ay6o1324605868.tab") > > try(system("convert tmp/1gt051324605868.ps tmp/1gt051324605868.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.793 0.118 0.900