R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(299775 + ,41 + ,38 + ,7 + ,53 + ,145 + ,56 + ,1641 + ,195838 + ,39 + ,32 + ,5 + ,86 + ,101 + ,56 + ,2035 + ,173260 + ,30 + ,35 + ,5 + ,66 + ,98 + ,54 + ,2312 + ,254488 + ,31 + ,33 + ,5 + ,67 + ,132 + ,89 + ,1369 + ,104389 + ,34 + ,37 + ,8 + ,76 + ,60 + ,40 + ,1577 + ,136084 + ,35 + ,29 + ,6 + ,78 + ,38 + ,25 + ,2201 + ,199476 + ,39 + ,31 + ,5 + ,53 + ,144 + ,92 + ,961 + ,92499 + ,34 + ,36 + ,6 + ,80 + ,5 + ,18 + ,1900 + ,224330 + ,36 + ,35 + ,5 + ,74 + ,28 + ,63 + ,1254 + ,135781 + ,37 + ,38 + ,4 + ,76 + ,84 + ,44 + ,1335 + ,74408 + ,38 + ,31 + ,6 + ,79 + ,79 + ,33 + ,1597 + ,81240 + ,36 + ,34 + ,5 + ,54 + ,127 + ,84 + ,207 + ,14688 + ,38 + ,35 + ,5 + ,67 + ,78 + ,88 + ,1645 + ,181633 + ,39 + ,38 + ,6 + ,54 + ,60 + ,55 + ,2429 + ,271856 + ,33 + ,37 + ,7 + ,87 + ,131 + ,60 + ,151 + ,7199 + ,32 + ,33 + ,6 + ,58 + ,84 + ,66 + ,474 + ,46660 + ,36 + ,32 + ,7 + ,75 + ,133 + ,154 + ,141 + ,17547 + ,38 + ,38 + ,6 + ,88 + ,150 + ,53 + ,1639 + ,133368 + ,39 + ,38 + ,8 + ,64 + ,91 + ,119 + ,872 + ,95227 + ,32 + ,32 + ,7 + ,57 + ,132 + ,41 + ,1318 + ,152601 + ,32 + ,33 + ,5 + ,66 + ,136 + ,61 + ,1018 + ,98146 + ,31 + ,31 + ,5 + ,68 + ,124 + ,58 + ,1383 + ,79619 + ,39 + ,38 + ,7 + ,54 + ,118 + ,75 + ,1314 + ,59194 + ,37 + ,39 + ,7 + ,56 + ,70 + ,33 + ,1335 + ,139942 + ,39 + ,32 + ,5 + ,86 + ,107 + ,40 + ,1403 + ,118612 + ,41 + ,32 + ,4 + ,80 + ,119 + ,92 + ,910 + ,72880 + ,36 + ,35 + ,10 + ,76 + ,89 + ,100 + ,616 + ,65475 + ,33 + ,37 + ,6 + ,69 + ,112 + ,112 + ,1407 + ,99643 + ,33 + ,33 + ,5 + ,78 + ,108 + ,73 + ,771 + ,71965 + ,34 + ,33 + ,5 + ,67 + ,52 + ,40 + ,766 + ,77272 + ,31 + ,28 + ,5 + ,80 + ,112 + ,45 + ,473 + ,49289 + ,27 + ,32 + ,5 + ,54 + ,116 + ,60 + ,1376 + ,135131 + ,37 + ,31 + ,6 + ,71 + ,123 + ,62 + ,1232 + ,108446 + ,34 + ,37 + ,5 + ,84 + ,125 + ,75 + ,1521 + ,89746 + ,34 + ,30 + ,5 + ,74 + ,27 + ,31 + ,572 + ,44296 + ,32 + ,33 + ,5 + ,71 + ,162 + ,77 + ,1059 + ,77648 + ,29 + ,31 + ,5 + ,63 + ,32 + ,34 + ,1544 + ,181528 + ,36 + ,33 + ,5 + ,71 + ,64 + ,46 + ,1230 + ,134019 + ,29 + ,31 + ,5 + ,76 + ,92 + ,99 + ,1206 + ,124064 + ,35 + ,33 + ,5 + ,69 + ,0 + ,17 + ,1205 + ,92630 + ,37 + ,32 + ,5 + ,74 + ,83 + ,66 + ,1255 + ,121848 + ,34 + ,33 + ,7 + ,75 + ,41 + ,30 + ,613 + ,52915 + ,38 + ,32 + ,5 + ,54 + ,47 + ,76 + ,721 + ,81872 + ,35 + ,33 + ,6 + ,52 + ,120 + ,146 + ,1109 + ,58981 + ,38 + ,28 + ,7 + ,69 + ,105 + ,67 + ,740 + ,53515 + ,37 + ,35 + ,7 + ,68 + ,79 + ,56 + ,1126 + ,60812 + ,38 + ,39 + ,5 + ,65 + ,65 + ,107 + ,728 + ,56375 + ,33 + ,34 + ,5 + ,75 + ,70 + ,58 + ,689 + ,65490 + ,36 + ,38 + ,4 + ,74 + ,55 + ,34 + ,592 + ,80949 + ,38 + ,32 + ,5 + ,75 + ,39 + ,61 + ,995 + ,76302 + ,32 + ,38 + ,4 + ,72 + ,67 + ,119 + ,1613 + ,104011 + ,32 + ,30 + ,5 + ,67 + ,21 + ,42 + ,2048 + ,98104 + ,32 + ,33 + ,5 + ,63 + ,127 + ,66 + ,705 + ,67989 + ,34 + ,38 + ,7 + ,62 + ,152 + ,89 + ,301 + ,30989 + ,32 + ,32 + ,5 + ,63 + ,113 + ,44 + ,1803 + ,135458 + ,37 + ,32 + ,5 + ,76 + ,99 + ,66 + ,799 + ,73504 + ,39 + ,34 + ,6 + ,74 + ,7 + ,24 + ,861 + ,63123 + ,29 + ,34 + ,4 + ,67 + ,141 + ,259 + ,1186 + ,61254 + ,37 + ,36 + ,6 + ,73 + ,21 + ,17 + ,1451 + ,74914 + ,35 + ,34 + ,6 + ,70 + ,35 + ,64 + ,628 + ,31774 + ,30 + ,28 + ,5 + ,53 + ,109 + ,41 + ,1161 + ,81437 + ,38 + ,34 + ,7 + ,77 + ,133 + ,68 + ,1463 + ,87186 + ,34 + ,35 + ,6 + ,77 + ,123 + ,168 + ,742 + ,50090 + ,31 + ,35 + ,8 + ,52 + ,26 + ,43 + ,979 + ,65745 + ,34 + ,31 + ,7 + ,54 + ,230 + ,132 + ,675 + ,56653 + ,35 + ,37 + ,5 + ,80 + ,166 + ,105 + ,1241 + ,158399 + ,36 + ,35 + ,6 + ,66 + ,68 + ,71 + ,676 + ,46455 + ,30 + ,27 + ,6 + ,73 + ,147 + ,112 + ,1049 + ,73624 + ,39 + ,40 + ,5 + ,63 + ,179 + ,94 + ,620 + ,38395 + ,35 + ,37 + ,5 + ,69 + ,61 + ,82 + ,1081 + ,91899 + ,38 + ,36 + ,5 + ,67 + ,101 + ,70 + ,1688 + ,139526 + ,31 + ,38 + ,5 + ,54 + ,108 + ,57 + ,736 + ,52164 + ,34 + ,39 + ,4 + ,81 + ,90 + ,53 + ,617 + ,51567 + ,38 + ,41 + ,6 + ,69 + ,114 + ,103 + ,812 + ,70551 + ,34 + ,27 + ,6 + ,84 + ,103 + ,121 + ,1051 + ,84856 + ,39 + ,30 + ,6 + ,80 + ,142 + ,62 + ,1656 + ,102538 + ,37 + ,37 + ,6 + ,70 + ,79 + ,52 + ,705 + ,86678 + ,34 + ,31 + ,7 + ,69 + ,88 + ,52 + ,945 + ,85709 + ,28 + ,31 + ,5 + ,77 + ,25 + ,32 + ,554 + ,34662 + ,37 + ,27 + ,7 + ,54 + ,83 + ,62 + ,1597 + ,150580 + ,33 + ,36 + ,6 + ,79 + ,113 + ,45 + ,982 + ,99611 + ,37 + ,38 + ,5 + ,30 + ,118 + ,46 + ,222 + ,19349 + ,35 + ,37 + ,5 + ,71 + ,110 + ,63 + ,1212 + ,99373 + ,37 + ,33 + ,4 + ,73 + ,129 + ,75 + ,1143 + ,86230 + ,32 + ,34 + ,8 + ,72 + ,51 + ,88 + ,435 + ,30837 + ,33 + ,31 + ,8 + ,77 + ,93 + ,46 + ,532 + ,31706 + ,38 + ,39 + ,5 + ,75 + ,76 + ,53 + ,882 + ,89806 + ,33 + ,34 + ,5 + ,69 + ,49 + ,37 + ,608 + ,62088 + ,29 + ,32 + ,6 + ,54 + ,118 + ,90 + ,459 + ,40151 + ,33 + ,33 + ,4 + ,70 + ,38 + ,63 + ,578 + ,27634 + ,31 + ,36 + ,5 + ,73 + ,141 + ,78 + ,826 + ,76990 + ,36 + ,32 + ,5 + ,54 + ,58 + ,25 + ,509 + ,37460 + ,35 + ,41 + ,5 + ,77 + ,27 + ,45 + ,717 + ,54157 + ,32 + ,28 + ,5 + ,82 + ,91 + ,46 + ,637 + ,49862 + ,29 + ,30 + ,6 + ,80 + ,48 + ,41 + ,857 + ,84337 + ,39 + ,36 + ,6 + ,80 + ,63 + ,144 + ,830 + ,64175 + ,37 + ,35 + ,5 + ,69 + ,56 + ,82 + ,652 + ,59382 + ,35 + ,31 + ,6 + ,78 + ,144 + ,91 + ,707 + ,119308 + ,37 + ,34 + ,5 + ,81 + ,73 + ,71 + ,954 + ,76702 + ,32 + ,36 + ,7 + ,76 + ,168 + ,63 + ,1461 + ,103425 + ,38 + ,36 + ,5 + ,76 + ,64 + ,53 + ,672 + ,70344 + ,37 + ,35 + ,6 + ,73 + ,97 + ,62 + ,778 + ,43410 + ,36 + ,37 + ,6 + ,85 + ,117 + ,63 + ,1141 + ,104838 + ,32 + ,28 + ,6 + ,66 + ,100 + ,32 + ,680 + ,62215 + ,33 + ,39 + ,4 + ,79 + ,149 + ,39 + ,1090 + ,69304 + ,40 + ,32 + ,5 + ,68 + ,187 + ,62 + ,616 + ,53117 + ,38 + ,35 + ,5 + ,76 + ,127 + ,117 + ,285 + ,19764 + ,41 + ,39 + ,7 + ,71 + ,37 + ,34 + ,1145 + ,86680 + ,36 + ,35 + ,6 + ,54 + ,245 + ,92 + ,733 + ,84105 + ,43 + ,42 + ,9 + ,46 + ,87 + ,93 + ,888) + ,dim=c(8 + ,110) + ,dimnames=list(c('Time_in_RFC' + ,'Connected' + ,'Separate' + ,'age' + ,'beloning' + ,'totblogs' + ,'Login' + ,'pagviews') + ,1:110)) > y <- array(NA,dim=c(8,110),dimnames=list(c('Time_in_RFC','Connected','Separate','age','beloning','totblogs','Login','pagviews'),1:110)) > 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/194ke1354796881.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] 8 > 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/2qs0y1354796881.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 = 1.1189, df = 108, p-value = 0.2657 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: -0.08183476 0.28850573 sample estimates: cor 0.107047 > 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 28 warnings (use warnings() to see them) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/3nbc11354796881.tab") > > try(system("convert tmp/194ke1354796881.ps tmp/194ke1354796881.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.985 0.191 2.140