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 + ,30 + ,94 + ,112285 + ,146283 + ,26 + ,58 + ,28 + ,103 + ,84786 + ,98364 + ,51 + ,60 + ,38 + ,93 + ,83123 + ,86146 + ,57 + ,121 + ,25 + ,91 + ,119182 + ,195663 + ,56 + ,43 + ,26 + ,93 + ,116174 + ,95757 + ,37 + ,69 + ,25 + ,60 + ,57635 + ,85584 + ,60 + ,78 + ,38 + ,123 + ,66198 + ,143983 + ,67 + ,44 + ,30 + ,90 + ,57793 + ,59238 + ,43 + ,158 + ,47 + ,168 + ,97668 + ,151511 + ,52 + ,102 + ,30 + ,115 + ,133824 + ,136368 + ,52 + ,77 + ,31 + ,71 + ,101481 + ,112642 + ,43 + ,82 + ,23 + ,66 + ,99645 + ,94728 + ,57 + ,101 + ,36 + ,117 + ,99052 + ,121527 + ,55 + ,80 + ,30 + ,108 + ,67654 + ,127766 + ,84 + ,50 + ,25 + ,84 + ,65553 + ,98958 + ,57 + ,123 + ,34 + ,120 + ,69112 + ,85646 + ,67 + ,73 + ,31 + ,114 + ,82753 + ,98579 + ,49 + ,105 + ,33 + ,120 + ,72654 + ,131741 + ,70 + ,47 + ,25 + ,81 + ,30727 + ,53907 + ,52 + ,94 + ,35 + ,133 + ,117478 + ,146761 + ,44 + ,44 + ,42 + ,122 + ,74007 + ,82036 + ,54 + ,107 + ,33 + ,124 + ,101494 + ,171975 + ,58 + ,33 + ,14 + ,37 + ,31081 + ,58391 + ,68 + ,96 + ,32 + ,120 + ,83122 + ,136815 + ,43 + ,56 + ,35 + ,95 + ,60578 + ,69107 + ,56 + ,59 + ,28 + ,90 + ,79892 + ,108016 + ,74 + ,39 + ,28 + ,80 + ,49810 + ,46341 + ,65 + ,76 + ,34 + ,110 + ,100708 + ,79336 + ,63 + ,91 + ,39 + ,138 + ,82875 + ,93176 + ,58 + ,76 + ,28 + ,100 + ,72260 + ,127969 + ,54 + ,8 + ,4 + ,7 + ,5950 + ,15049 + ,56 + ,79 + ,39 + ,140 + ,115762 + ,155135 + ,57 + ,76 + ,29 + ,96 + ,80670 + ,102996 + ,63 + ,101 + ,44 + ,164 + ,143558 + ,160604 + ,53 + ,123 + ,35 + ,124 + ,105195 + ,174141 + ,63 + ,105 + ,23 + ,62 + ,149193 + ,184301 + ,43 + ,41 + ,29 + ,99 + ,95260 + ,129847 + ,64 + ,72 + ,25 + ,70 + ,55183 + ,117286 + ,60 + ,67 + ,27 + ,104 + ,106671 + ,71180 + ,53 + ,75 + ,36 + ,116 + ,73511 + ,109377 + ,58 + ,114 + ,28 + ,91 + ,92945 + ,85298 + ,49 + ,22 + ,23 + ,67 + ,22618 + ,23824 + ,48 + ,69 + ,28 + ,72 + ,83737 + ,82981 + ,29 + ,105 + ,34 + ,120 + ,69094 + ,73815 + ,54 + ,88 + ,28 + ,105 + ,95536 + ,132190 + ,73 + ,73 + ,34 + ,104 + ,225920 + ,128754 + ,51 + ,62 + ,33 + ,98 + ,61370 + ,67808 + ,58 + ,118 + ,38 + ,111 + ,106117 + ,131722 + ,43 + ,100 + ,35 + ,71 + ,84651 + ,106175 + ,51 + ,24 + ,24 + ,69 + ,15986 + ,25157 + ,53 + ,67 + ,29 + ,107 + ,95364 + ,76669 + ,54 + ,57 + ,29 + ,107 + ,89691 + ,105805 + ,61 + ,135 + ,37 + ,129 + ,126846 + ,72413 + ,48 + ,124 + ,33 + ,118 + ,102860 + ,96971 + ,47 + ,33 + ,25 + ,73 + ,51715 + ,71299 + ,39 + ,98 + ,32 + ,119 + ,55801 + ,77494 + ,48 + ,58 + ,29 + ,104 + ,111813 + ,120336 + ,50 + ,131 + ,31 + ,90 + ,161647 + ,181248 + ,39 + ,110 + ,52 + ,197 + ,115929 + ,146123 + ,44 + ,130 + ,24 + ,85 + ,162901 + ,186646 + ,65 + ,118 + ,33 + ,106 + ,129838 + ,168237 + ,58 + ,39 + ,32 + ,50 + ,37510 + ,64219 + ,42 + ,81 + ,31 + ,63 + ,87771 + ,115338 + ,49 + ,28 + ,23 + ,69 + ,192565 + ,153197 + ,67 + ,83 + ,30 + ,93 + ,140867 + ,68370 + ,43 + ,133 + ,42 + ,110 + ,101338 + ,103950 + ,62 + ,12 + ,1 + ,0 + ,1168 + ,5841 + ,64 + ,106 + ,32 + ,83 + ,65567 + ,84396 + ,57 + ,71 + ,36 + ,98 + ,40735 + ,55515 + ,54 + ,4 + ,0 + ,0 + ,855 + ,6622 + ,48 + ,62 + ,24 + ,60 + ,97068 + ,115814 + ,49 + ,18 + ,8 + ,9 + ,14116 + ,13155 + ,46 + ,98 + ,33 + ,115 + ,76643 + ,142775 + ,61 + ,32 + ,38 + ,120 + ,92696 + ,20112 + ,56 + ,25 + ,24 + ,66 + ,94785 + ,61023 + ,41 + ,100 + ,43 + ,152 + ,93815 + ,132432 + ,43 + ,46 + ,43 + ,139 + ,86687 + ,112494 + ,53 + ,129 + ,41 + ,144 + ,105547 + ,170875 + ,66 + ,136 + ,45 + ,160 + ,213688 + ,214921 + ,58 + ,59 + ,31 + ,114 + ,71220 + ,100226 + ,53 + ,63 + ,31 + ,119 + ,91721 + ,78876 + ,46 + ,14 + ,30 + ,101 + ,111194 + ,6940 + ,52 + ,113 + ,37 + ,133 + ,135777 + ,122037 + ,51 + ,47 + ,30 + ,83 + ,51513 + ,53782 + ,51 + ,92 + ,35 + ,116 + ,74163 + ,127748 + ,45 + ,91 + ,31 + ,97 + ,98952 + ,103300 + ,45 + ,111 + ,31 + ,98 + ,102372 + ,112283 + ,37 + ,41 + ,21 + ,78 + ,37238 + ,10901 + ,59 + ,120 + ,39 + ,117 + ,103772 + ,120691 + ,42 + ,131 + ,39 + ,132 + ,130115 + ,139296 + ,66 + ,47 + ,30 + ,73 + ,64466 + ,89455 + ,53 + ,109 + ,37 + ,86 + ,54990 + ,147866 + ,69 + ,37 + ,32 + ,48 + ,34777 + ,14336 + ,56) + ,dim=c(6 + ,93) + ,dimnames=list(c('blogged_computations' + ,'compendiums_reviewed' + ,'feedback_messages_p120' + ,'totsize' + ,'totseconds' + ,'Int.Mot.') + ,1:93)) > y <- array(NA,dim=c(6,93),dimnames=list(c('blogged_computations','compendiums_reviewed','feedback_messages_p120','totsize','totseconds','Int.Mot.'),1:93)) > 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/1ntn71324173181.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] 6 > 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/2jdnz1324173181.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 = 5.8428, p-value = 5.132e-09 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.4207028 > 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) + } + } There were 14 warnings (use warnings() to see them) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/3pl5m1324173182.tab") > > try(system("convert tmp/1ntn71324173181.ps tmp/1ntn71324173181.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.051 0.090 1.152