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(95 + ,3 + ,96 + ,42 + ,130 + ,186099 + ,68 + ,4 + ,75 + ,38 + ,143 + ,113854 + ,64 + ,16 + ,70 + ,46 + ,118 + ,99776 + ,139 + ,2 + ,134 + ,42 + ,146 + ,106194 + ,51 + ,1 + ,83 + ,30 + ,73 + ,100792 + ,46 + ,3 + ,8 + ,35 + ,89 + ,47552 + ,118 + ,0 + ,173 + ,40 + ,146 + ,250931 + ,46 + ,0 + ,1 + ,18 + ,22 + ,6853 + ,79 + ,7 + ,88 + ,38 + ,132 + ,115466 + ,76 + ,0 + ,104 + ,37 + ,92 + ,110896 + ,82 + ,0 + ,114 + ,46 + ,147 + ,169351 + ,66 + ,7 + ,125 + ,60 + ,203 + ,94853 + ,60 + ,10 + ,57 + ,37 + ,113 + ,72591 + ,117 + ,4 + ,139 + ,55 + ,171 + ,101345 + ,50 + ,10 + ,87 + ,44 + ,87 + ,113713 + ,133 + ,0 + ,176 + ,63 + ,208 + ,165354 + ,63 + ,8 + ,114 + ,40 + ,153 + ,164263 + ,100 + ,4 + ,121 + ,43 + ,97 + ,135213 + ,44 + ,3 + ,103 + ,32 + ,95 + ,111669 + ,65 + ,8 + ,135 + ,52 + ,197 + ,134163 + ,103 + ,0 + ,123 + ,49 + ,160 + ,140303 + ,103 + ,1 + ,99 + ,41 + ,148 + ,150773 + ,62 + ,5 + ,77 + ,25 + ,84 + ,111848 + ,70 + ,9 + ,103 + ,57 + ,227 + ,102509 + ,159 + ,1 + ,158 + ,45 + ,154 + ,96785 + ,78 + ,0 + ,116 + ,42 + ,151 + ,116136 + ,101 + ,5 + ,114 + ,45 + ,142 + ,158376 + ,73 + ,0 + ,150 + ,43 + ,148 + ,153990 + ,58 + ,0 + ,64 + ,36 + ,110 + ,64057 + ,147 + ,0 + ,150 + ,45 + ,149 + ,230054 + ,54 + ,3 + ,143 + ,50 + ,179 + ,184531 + ,84 + ,6 + ,50 + ,50 + ,149 + ,114198 + ,56 + ,1 + ,145 + ,51 + ,187 + ,198299 + ,45 + ,4 + ,56 + ,42 + ,153 + ,33750 + ,87 + ,4 + ,141 + ,44 + ,163 + ,189723 + ,87 + ,0 + ,83 + ,42 + ,127 + ,100826 + ,77 + ,0 + ,112 + ,44 + ,151 + ,188355 + ,72 + ,2 + ,79 + ,40 + ,100 + ,104470 + ,36 + ,1 + ,33 + ,17 + ,46 + ,58391 + ,51 + ,2 + ,152 + ,43 + ,156 + ,164808 + ,44 + ,10 + ,126 + ,41 + ,128 + ,134097 + ,75 + ,10 + ,97 + ,41 + ,111 + ,80238 + ,87 + ,5 + ,84 + ,40 + ,119 + ,133252 + ,97 + ,6 + ,68 + ,49 + ,148 + ,54518 + ,90 + ,1 + ,50 + ,52 + ,65 + ,121850 + ,860 + ,2 + ,101 + ,42 + ,134 + ,79367 + ,57 + ,2 + ,20 + ,26 + ,66 + ,56968 + ,99 + ,1 + ,107 + ,59 + ,201 + ,106314 + ,120 + ,10 + ,150 + ,50 + ,177 + ,191889 + ,76 + ,3 + ,129 + ,50 + ,156 + ,104864 + ,56 + ,0 + ,99 + ,47 + ,158 + ,160792 + ,20 + ,0 + ,8 + ,4 + ,7 + ,15049 + ,94 + ,8 + ,88 + ,51 + ,175 + ,191179 + ,21 + ,5 + ,21 + ,18 + ,61 + ,25109 + ,70 + ,3 + ,30 + ,14 + ,41 + ,45824 + ,133 + ,1 + ,102 + ,41 + ,133 + ,129711 + ,86 + ,5 + ,166 + ,61 + ,228 + ,210012 + ,224 + ,6 + ,132 + ,40 + ,140 + ,194679 + ,65 + ,0 + ,161 + ,44 + ,155 + ,197680 + ,86 + ,12 + ,90 + ,40 + ,141 + ,81180 + ,70 + ,10 + ,160 + ,51 + ,181 + ,197765 + ,148 + ,12 + ,139 + ,29 + ,75 + ,214738 + ,72 + ,11 + ,104 + ,43 + ,97 + ,96252 + ,59 + ,8 + ,103 + ,42 + ,142 + ,124527 + ,67 + ,3 + ,66 + ,41 + ,136 + ,153242 + ,58 + ,0 + ,163 + ,30 + ,87 + ,145707 + ,60 + ,6 + ,93 + ,39 + ,140 + ,113963 + ,105 + ,10 + ,85 + ,51 + ,169 + ,134904 + ,84 + ,2 + ,154 + ,40 + ,129 + ,114268 + ,63 + ,5 + ,143 + ,29 + ,92 + ,94333 + ,67 + ,13 + ,107 + ,47 + ,160 + ,102204 + ,39 + ,6 + ,22 + ,23 + ,67 + ,23824 + ,60 + ,7 + ,85 + ,48 + ,179 + ,111563 + ,94 + ,2 + ,101 + ,38 + ,90 + ,91313 + ,67 + ,5 + ,131 + ,42 + ,144 + ,89770 + ,96 + ,4 + ,140 + ,46 + ,144 + ,100125 + ,54 + ,3 + ,156 + ,40 + ,144 + ,165278 + ,54 + ,6 + ,81 + ,45 + ,134 + ,181712 + ,62 + ,2 + ,137 + ,42 + ,146 + ,80906 + ,71 + ,0 + ,102 + ,41 + ,121 + ,75881 + ,50 + ,1 + ,74 + ,37 + ,112 + ,83963 + ,117 + ,1 + ,161 + ,47 + ,145 + ,175721 + ,45 + ,5 + ,30 + ,26 + ,99 + ,68580 + ,61 + ,2 + ,120 + ,48 + ,96 + ,136323 + ,31 + ,0 + ,49 + ,8 + ,27 + ,55792 + ,175 + ,0 + ,121 + ,27 + ,77 + ,25157 + ,70 + ,6 + ,76 + ,38 + ,137 + ,100922 + ,284 + ,1 + ,85 + ,41 + ,151 + ,118845 + ,95 + ,4 + ,151 + ,61 + ,126 + ,170492 + ,72 + ,1 + ,165 + ,45 + ,159 + ,81716 + ,63 + ,1 + ,89 + ,41 + ,101 + ,115750 + ,75 + ,3 + ,168 + ,42 + ,144 + ,105590 + ,90 + ,10 + ,48 + ,35 + ,102 + ,92795 + ,89 + ,1 + ,149 + ,36 + ,135 + ,82390 + ,138 + ,4 + ,75 + ,40 + ,147 + ,135599 + ,68 + ,5 + ,107 + ,40 + ,155 + ,127667 + ,80 + ,7 + ,116 + ,38 + ,138 + ,163073 + ,65 + ,0 + ,181 + ,43 + ,113 + ,211381 + ,130 + ,12 + ,155 + ,65 + ,248 + ,189944 + ,85 + ,13 + ,165 + ,33 + ,116 + ,226168 + ,83 + ,9 + ,121 + ,51 + ,176 + ,117495 + ,89 + ,0 + ,176 + ,45 + ,140 + ,195894 + ,116 + ,0 + ,86 + ,36 + ,59 + ,80684 + ,43 + ,4 + ,13 + ,19 + ,64 + ,19630 + ,87 + ,4 + ,120 + ,25 + ,40 + ,88634 + ,80 + ,0 + ,117 + ,44 + ,98 + ,139292 + ,132 + ,0 + ,133 + ,45 + ,139 + ,128602 + ,59 + ,0 + ,169 + ,44 + ,135 + ,135848 + ,50 + ,0 + ,39 + ,35 + ,97 + ,178377 + ,87 + ,0 + ,125 + ,46 + ,142 + ,106330 + ,62 + ,5 + ,82 + ,44 + ,155 + ,178303 + ,70 + ,1 + ,148 + ,45 + ,115 + ,116938 + ,9 + ,0 + ,12 + ,1 + ,0 + ,5841 + ,54 + ,0 + ,146 + ,40 + ,103 + ,106020 + ,25 + ,4 + ,23 + ,11 + ,30 + ,24610 + ,113 + ,0 + ,87 + ,51 + ,130 + ,74151 + ,63 + ,1 + ,164 + ,38 + ,102 + ,232241 + ,2 + ,0 + ,4 + ,0 + ,0 + ,6622 + ,67 + ,5 + ,81 + ,30 + ,77 + ,127097 + ,22 + ,0 + ,18 + ,8 + ,9 + ,13155 + ,157 + ,3 + ,118 + ,43 + ,150 + ,160501 + ,79 + ,7 + ,76 + ,48 + ,163 + ,91502 + ,113 + ,14 + ,55 + ,49 + ,148 + ,24469 + ,50 + ,3 + ,62 + ,32 + ,94 + ,88229 + ,52 + ,0 + ,16 + ,8 + ,21 + ,13983 + ,113 + ,3 + ,98 + ,43 + ,151 + ,80716 + ,115 + ,0 + ,137 + ,52 + ,187 + ,157384 + ,78 + ,0 + ,50 + ,53 + ,171 + ,122975 + ,135 + ,4 + ,152 + ,49 + ,170 + ,191469 + ,120 + ,0 + ,163 + ,48 + ,145 + ,231257 + ,122 + ,3 + ,142 + ,56 + ,198 + ,258287 + ,54 + ,0 + ,80 + ,45 + ,152 + ,122531 + ,63 + ,0 + ,59 + ,40 + ,112 + ,61394 + ,162 + ,4 + ,94 + ,48 + ,173 + ,86480 + ,162 + ,5 + ,128 + ,50 + ,177 + ,195791 + ,107 + ,16 + ,63 + ,43 + ,153 + ,18284 + ,146 + ,6 + ,127 + ,46 + ,161 + ,147581 + ,77 + ,5 + ,60 + ,40 + ,115 + ,72558 + ,87 + ,2 + ,118 + ,45 + ,147 + ,147341 + ,192 + ,1 + ,110 + ,46 + ,124 + ,114651 + ,75 + ,2 + ,46 + ,37 + ,57 + ,100187 + ,131 + ,9 + ,96 + ,45 + ,144 + ,130332 + ,67 + ,1 + ,128 + ,39 + ,126 + ,134218 + ,37 + ,3 + ,41 + ,21 + ,78 + ,10901 + ,61 + ,11 + ,146 + ,50 + ,153 + ,145758 + ,127 + ,5 + ,147 + ,55 + ,196 + ,75767 + ,58 + ,2 + ,121 + ,40 + ,130 + ,134969 + ,71 + ,1 + ,185 + ,48 + ,159 + ,169216 + ,0 + ,9 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,0 + ,0 + ,7953 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,72 + ,2 + ,85 + ,46 + ,94 + ,105406 + ,123 + ,3 + ,164 + ,52 + ,129 + ,174586 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,7 + ,0 + ,0 + ,4245 + ,7 + ,0 + ,12 + ,5 + ,13 + ,21509 + ,3 + ,0 + ,0 + ,1 + ,4 + ,7670 + ,106 + ,0 + ,37 + ,48 + ,89 + ,15673 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,53 + ,2 + ,62 + ,34 + ,71 + ,75882) + ,dim=c(6 + ,164) + ,dimnames=list(c('#CompViews(PR)' + ,'#SharedComp' + ,'#BloggedComputations' + ,'#LongPR' + ,'#Reviews' + ,'#SecinComp') + ,1:164)) > y <- array(NA,dim=c(6,164),dimnames=list(c('#CompViews(PR)','#SharedComp','#BloggedComputations','#LongPR','#Reviews','#SecinComp'),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 = '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/1mapj1324659654.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/2w4g81324659654.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.6456, df = 162, p-value = 0.5195 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: -0.1033977 0.2023340 sample estimates: cor 0.05065484 > 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 15 warnings (use warnings() to see them) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/3kc7l1324659654.tab") > > try(system("convert tmp/1mapj1324659654.ps tmp/1mapj1324659654.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.222 0.102 1.312