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(0 + ,129988 + ,81 + ,20 + ,18 + ,0 + ,130358 + ,46 + ,38 + ,17 + ,0 + ,7215 + ,18 + ,0 + ,0 + ,1 + ,112914 + ,86 + ,49 + ,22 + ,1 + ,219904 + ,126 + ,76 + ,30 + ,1 + ,402036 + ,218 + ,104 + ,31 + ,1 + ,117604 + ,50 + ,37 + ,19 + ,0 + ,131822 + ,50 + ,57 + ,25 + ,1 + ,99729 + ,38 + ,42 + ,30 + ,1 + ,256310 + ,86 + ,62 + ,26 + ,1 + ,113066 + ,69 + ,50 + ,20 + ,1 + ,165392 + ,62 + ,66 + ,30 + ,0 + ,78240 + ,90 + ,38 + ,15 + ,0 + ,152673 + ,84 + ,48 + ,22 + ,0 + ,134368 + ,47 + ,42 + ,17 + ,0 + ,125769 + ,67 + ,47 + ,19 + ,0 + ,123467 + ,50 + ,71 + ,28 + ,1 + ,56232 + ,47 + ,0 + ,12 + ,1 + ,108458 + ,79 + ,50 + ,28 + ,0 + ,22762 + ,21 + ,12 + ,13 + ,0 + ,48633 + ,50 + ,16 + ,14 + ,0 + ,182081 + ,83 + ,77 + ,27 + ,1 + ,140857 + ,59 + ,29 + ,25 + ,0 + ,93773 + ,46 + ,38 + ,30 + ,0 + ,133398 + ,78 + ,50 + ,21 + ,0 + ,113933 + ,23 + ,33 + ,17 + ,0 + ,153851 + ,139 + ,49 + ,22 + ,1 + ,140711 + ,75 + ,59 + ,28 + ,0 + ,303844 + ,105 + ,55 + ,26 + ,1 + ,163810 + ,38 + ,42 + ,17 + ,1 + ,123344 + ,40 + ,40 + ,23 + ,0 + ,157640 + ,39 + ,51 + ,20 + ,1 + ,103274 + ,90 + ,45 + ,16 + ,0 + ,193500 + ,105 + ,73 + ,20 + ,0 + ,178768 + ,43 + ,51 + ,21 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1 + ,181412 + ,55 + ,46 + ,27 + ,1 + ,92342 + ,47 + ,44 + ,14 + ,1 + ,100023 + ,41 + ,31 + ,29 + ,1 + ,178277 + ,50 + ,71 + ,31 + ,1 + ,145067 + ,58 + ,61 + ,19 + ,1 + ,114146 + ,50 + ,28 + ,30 + ,0 + ,86039 + ,25 + ,21 + ,23 + ,1 + ,125481 + ,66 + ,42 + ,21 + ,1 + ,95535 + ,42 + ,44 + ,22 + ,1 + ,129221 + ,78 + ,40 + ,21 + ,0 + ,61554 + ,26 + ,15 + ,32 + ,0 + ,168048 + ,82 + ,46 + ,20 + ,1 + ,159121 + ,75 + ,43 + ,26 + ,0 + ,129362 + ,51 + ,47 + ,25 + ,1 + ,48188 + ,28 + ,12 + ,22 + ,0 + ,95461 + ,56 + ,46 + ,19 + ,0 + ,229864 + ,64 + ,56 + ,24 + ,0 + ,191094 + ,68 + ,47 + ,26 + ,1 + ,161082 + ,51 + ,50 + ,27 + ,0 + ,111388 + ,47 + ,35 + ,10 + ,1 + ,172614 + ,58 + ,45 + ,26 + ,1 + ,63205 + ,18 + ,25 + ,23 + ,1 + ,109102 + ,56 + ,47 + ,21 + ,1 + ,137303 + ,74 + ,28 + ,34 + ,1 + ,125304 + ,50 + ,48 + ,29 + ,1 + ,88620 + ,65 + ,32 + ,19 + ,0 + ,95808 + ,48 + ,28 + ,19 + ,1 + ,83419 + ,29 + ,31 + ,23 + ,0 + ,101723 + ,25 + ,13 + ,22 + ,0 + ,94982 + ,37 + ,38 + ,29 + ,0 + ,143566 + ,61 + ,48 + ,31 + ,1 + ,113325 + ,63 + ,68 + ,21 + ,0 + ,81518 + ,32 + ,32 + ,21 + ,1 + ,31970 + ,15 + ,5 + ,21 + ,1 + ,192268 + ,102 + ,53 + ,15 + ,1 + ,91261 + ,55 + ,33 + ,9 + ,0 + ,80820 + ,56 + ,54 + ,23 + ,1 + ,85829 + ,59 + ,37 + ,18 + ,1 + ,116322 + ,53 + ,52 + ,31 + ,1 + ,56544 + ,32 + ,0 + ,25 + ,0 + ,118838 + ,52 + ,52 + ,25 + ,1 + ,118781 + ,80 + ,51 + ,22 + ,1 + ,60138 + ,23 + ,16 + ,21 + ,0 + ,73422 + ,66 + ,33 + ,26 + ,0 + ,67751 + ,58 + ,48 + ,22 + ,1 + ,225857 + ,54 + ,35 + ,26 + ,1 + ,51185 + ,24 + ,24 + ,20 + ,0 + ,97181 + ,32 + ,37 + ,25 + ,0 + ,45100 + ,39 + ,17 + ,19 + ,1 + ,115801 + ,43 + ,32 + ,22 + ,1 + ,186310 + ,190 + ,55 + ,25 + ,0 + ,71960 + ,86 + ,39 + ,22 + ,0 + ,80105 + ,48 + ,31 + ,21 + ,0 + ,107728 + ,42 + ,26 + ,21 + ,1 + ,98707 + ,33 + ,37 + ,23 + ,1 + ,136234 + ,67 + ,66 + ,22 + ,0 + ,136781 + ,52 + ,35 + ,21 + ,1 + ,105863 + ,52 + ,24 + ,12 + ,1 + ,49164 + ,33 + ,22 + ,13 + ,0 + ,189493 + ,93 + ,42 + ,32 + ,0 + ,169406 + ,50 + ,86 + ,24 + ,0 + ,19349 + ,12 + ,13 + ,1 + ,1 + ,160819 + ,87 + ,21 + ,24 + ,0 + ,109510 + ,53 + ,32 + ,25 + ,0 + ,43803 + ,25 + ,8 + ,4 + ,1 + ,47062 + ,19 + ,38 + ,15 + ,1 + ,110845 + ,44 + ,45 + ,21 + ,0 + ,92517 + ,52 + ,24 + ,23 + ,1 + ,58660 + ,36 + ,23 + ,12 + ,1 + ,27676 + ,22 + ,2 + ,16 + ,1 + ,98550 + ,32 + ,52 + ,24 + ,0 + ,43646 + ,24 + ,5 + ,9 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,75566 + ,28 + ,43 + ,25 + ,0 + ,57359 + ,48 + ,18 + ,17 + ,1 + ,104330 + ,36 + ,44 + ,18 + ,1 + ,70369 + ,47 + ,45 + ,21 + ,0 + ,65494 + ,56 + ,29 + ,17 + ,0 + ,3616 + ,5 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1 + ,143931 + ,37 + ,32 + ,20 + ,1 + ,117946 + ,66 + ,65 + ,26 + ,0 + ,137332 + ,85 + ,26 + ,27 + ,0 + ,84336 + ,33 + ,24 + ,20 + ,1 + ,43410 + ,19 + ,7 + ,1 + ,0 + ,137585 + ,60 + ,62 + ,25 + ,1 + ,79015 + ,34 + ,30 + ,14 + ,1 + ,101354 + ,46 + ,49 + ,27 + ,1 + ,57586 + ,38 + ,3 + ,12 + ,1 + ,19764 + ,12 + ,10 + ,2 + ,1 + ,105757 + ,42 + ,42 + ,16 + ,0 + ,103651 + ,25 + ,23 + ,23 + ,0 + ,113402 + ,35 + ,40 + ,28 + ,0 + ,11796 + ,9 + ,1 + ,2 + ,0 + ,7627 + ,9 + ,0 + ,0 + ,1 + ,121085 + ,49 + ,29 + ,17 + ,1 + ,6836 + ,3 + ,0 + ,1 + ,0 + ,139563 + ,46 + ,46 + ,17 + ,0 + ,5118 + ,3 + ,5 + ,0 + ,1 + ,40248 + ,16 + ,8 + ,4 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,95079 + ,42 + ,21 + ,25 + ,0 + ,80763 + ,32 + ,21 + ,26 + ,1 + ,7131 + ,4 + ,0 + ,0 + ,1 + ,4194 + ,11 + ,0 + ,0 + ,0 + ,60378 + ,20 + ,15 + ,15 + ,1 + ,109173 + ,44 + ,47 + ,20 + ,1 + ,83484 + ,16 + ,17 + ,19) + ,dim=c(5 + ,144) + ,dimnames=list(c('Geslacht' + ,'Time_in_RFC' + ,'Logins' + ,'Blogged_computations' + ,'Reviewed_compendiums') + ,1:144)) > y <- array(NA,dim=c(5,144),dimnames=list(c('Geslacht','Time_in_RFC','Logins','Blogged_computations','Reviewed_compendiums'),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/13d971323975140.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/286j51323975140.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 = 0.8547, df = 142, p-value = 0.3941 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: -0.09312241 0.23239951 sample estimates: cor 0.07154331 > 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/3ktc51323975140.tab") > > try(system("convert tmp/13d971323975140.ps tmp/13d971323975140.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.933 0.114 1.035