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(1655 + ,264530 + ,64 + ,461 + ,85 + ,3 + ,954 + ,135248 + ,59 + ,331 + ,58 + ,4 + ,1740 + ,207253 + ,64 + ,639 + ,57 + ,14 + ,2405 + ,197987 + ,96 + ,1061 + ,132 + ,2 + ,1025 + ,143105 + ,46 + ,310 + ,44 + ,1 + ,577 + ,65295 + ,27 + ,164 + ,42 + ,3 + ,3916 + ,439387 + ,103 + ,1912 + ,94 + ,0 + ,381 + ,33186 + ,19 + ,111 + ,46 + ,0 + ,1817 + ,183696 + ,51 + ,703 + ,71 + ,5 + ,1607 + ,186657 + ,39 + ,556 + ,65 + ,0 + ,1941 + ,276819 + ,99 + ,726 + ,78 + ,0 + ,1752 + ,200779 + ,100 + ,536 + ,55 + ,7 + ,1463 + ,141987 + ,59 + ,560 + ,55 + ,7 + ,2489 + ,313944 + ,69 + ,1005 + ,103 + ,3 + ,1691 + ,196251 + ,76 + ,554 + ,41 + ,10 + ,4301 + ,342434 + ,166 + ,1515 + ,115 + ,0 + ,1917 + ,276692 + ,60 + ,690 + ,46 + ,4 + ,2352 + ,263451 + ,130 + ,940 + ,80 + ,3 + ,1283 + ,157448 + ,49 + ,460 + ,37 + ,3 + ,2108 + ,240201 + ,74 + ,631 + ,50 + ,7 + ,2197 + ,245847 + ,66 + ,719 + ,93 + ,0 + ,2524 + ,396701 + ,94 + ,1081 + ,93 + ,1 + ,1276 + ,157544 + ,37 + ,411 + ,61 + ,5 + ,1470 + ,156189 + ,47 + ,488 + ,57 + ,9 + ,2904 + ,196316 + ,108 + ,1116 + ,150 + ,0 + ,2304 + ,192167 + ,107 + ,847 + ,67 + ,0 + ,2653 + ,249893 + ,122 + ,994 + ,88 + ,5 + ,1709 + ,236812 + ,76 + ,530 + ,54 + ,0 + ,1385 + ,143182 + ,47 + ,524 + ,47 + ,0 + ,2225 + ,282946 + ,55 + ,838 + ,121 + ,0 + ,2007 + ,243048 + ,68 + ,780 + ,44 + ,3 + ,1623 + ,176062 + ,67 + ,551 + ,73 + ,4 + ,1944 + ,287382 + ,81 + ,722 + ,49 + ,1 + ,849 + ,87485 + ,33 + ,280 + ,36 + ,4 + ,2803 + ,343613 + ,88 + ,1108 + ,72 + ,2 + ,2236 + ,247082 + ,52 + ,950 + ,77 + ,0 + ,3308 + ,380797 + ,109 + ,1182 + ,71 + ,0 + ,1668 + ,191653 + ,75 + ,552 + ,63 + ,2 + ,917 + ,114673 + ,31 + ,275 + ,36 + ,1 + ,2951 + ,309038 + ,170 + ,1047 + ,45 + ,2 + ,2982 + ,292891 + ,73 + ,1370 + ,37 + ,10 + ,1422 + ,155568 + ,60 + ,568 + ,65 + ,6 + ,1536 + ,177306 + ,68 + ,571 + ,78 + ,5 + ,1487 + ,146175 + ,51 + ,416 + ,69 + ,5 + ,2369 + ,140319 + ,73 + ,985 + ,82 + ,1 + ,4908 + ,405267 + ,135 + ,1851 + ,780 + ,2 + ,918 + ,78800 + ,42 + ,330 + ,57 + ,2 + ,2085 + ,201970 + ,69 + ,611 + ,72 + ,0 + ,3679 + ,302833 + ,103 + ,1255 + ,112 + ,9 + ,1923 + ,164733 + ,50 + ,812 + ,61 + ,3 + ,1617 + ,194221 + ,69 + ,501 + ,39 + ,0 + ,496 + ,24188 + ,24 + ,218 + ,20 + ,0 + ,2343 + ,346142 + ,289 + ,787 + ,73 + ,8 + ,744 + ,65029 + ,17 + ,255 + ,21 + ,5 + ,1161 + ,101097 + ,64 + ,454 + ,70 + ,3 + ,2722 + ,255082 + ,51 + ,983 + ,124 + ,1 + ,2322 + ,283783 + ,78 + ,609 + ,75 + ,5 + ,3298 + ,295924 + ,164 + ,1006 + ,201 + ,5 + ,2184 + ,280943 + ,121 + ,884 + ,58 + ,0 + ,1863 + ,214872 + ,74 + ,690 + ,67 + ,12 + ,3609 + ,346520 + ,128 + ,1201 + ,65 + ,9 + ,2827 + ,273924 + ,109 + ,1032 + ,138 + ,11 + ,2280 + ,197035 + ,94 + ,919 + ,71 + ,10 + ,2188 + ,231904 + ,81 + ,783 + ,48 + ,8 + ,1303 + ,209798 + ,62 + ,521 + ,54 + ,2 + ,1540 + ,201345 + ,60 + ,409 + ,55 + ,0 + ,1777 + ,180403 + ,121 + ,547 + ,46 + ,6 + ,2418 + ,204441 + ,129 + ,757 + ,84 + ,8 + ,1961 + ,197813 + ,67 + ,736 + ,71 + ,2 + ,1419 + ,136421 + ,61 + ,515 + ,56 + ,5 + ,2293 + ,216092 + ,60 + ,789 + ,55 + ,13 + ,893 + ,73566 + ,32 + ,385 + ,39 + ,6 + ,1958 + ,214064 + ,70 + ,649 + ,52 + ,7 + ,1593 + ,181728 + ,50 + ,667 + ,94 + ,2 + ,1524 + ,150006 + ,53 + ,515 + ,57 + ,0 + ,2037 + ,308343 + ,72 + ,891 + ,83 + ,4 + ,1915 + ,251592 + ,80 + ,773 + ,42 + ,3 + ,1728 + ,202392 + ,103 + ,503 + ,45 + ,6 + ,2002 + ,173286 + ,57 + ,619 + ,52 + ,2 + ,1541 + ,162366 + ,58 + ,565 + ,67 + ,0 + ,1539 + ,132672 + ,42 + ,565 + ,38 + ,1 + ,3391 + ,390163 + ,102 + ,1104 + ,114 + ,0 + ,1356 + ,145905 + ,66 + ,649 + ,45 + ,5 + ,1965 + ,228657 + ,90 + ,551 + ,53 + ,2 + ,870 + ,80953 + ,25 + ,437 + ,31 + ,0 + ,1728 + ,132957 + ,49 + ,739 + ,169 + ,0 + ,1100 + ,135163 + ,50 + ,311 + ,60 + ,5 + ,3380 + ,333962 + ,169 + ,1332 + ,276 + ,1 + ,2241 + ,271806 + ,96 + ,783 + ,84 + ,0 + ,2973 + ,169483 + ,100 + ,1005 + ,67 + ,1 + ,2135 + ,234193 + ,81 + ,737 + ,58 + ,1 + ,1856 + ,207178 + ,69 + ,584 + ,71 + ,2 + ,1568 + ,157117 + ,58 + ,510 + ,80 + ,6 + ,2788 + ,242395 + ,68 + ,1009 + ,89 + ,1 + ,2119 + ,261601 + ,71 + ,838 + ,115 + ,4 + ,1521 + ,178489 + ,35 + ,523 + ,60 + ,3 + ,1505 + ,204221 + ,44 + ,513 + ,69 + ,3 + ,1910 + ,268066 + ,69 + ,706 + ,57 + ,0 + ,3518 + ,335002 + ,134 + ,1153 + ,121 + ,11 + ,3278 + ,361799 + ,102 + ,1281 + ,69 + ,12 + ,2261 + ,247804 + ,107 + ,746 + ,60 + ,8 + ,2128 + ,265849 + ,58 + ,787 + ,81 + ,0 + ,1885 + ,168501 + ,164 + ,597 + ,115 + ,0 + ,602 + ,43287 + ,14 + ,214 + ,43 + ,4 + ,1977 + ,172244 + ,69 + ,662 + ,72 + ,4 + ,1775 + ,189021 + ,121 + ,651 + ,61 + ,0 + ,2283 + ,227681 + ,44 + ,1015 + ,101 + ,0 + ,2402 + ,269329 + ,82 + ,922 + ,50 + ,0 + ,974 + ,106655 + ,57 + ,314 + ,32 + ,0 + ,1447 + ,117891 + ,78 + ,465 + ,78 + ,0 + ,1760 + ,290342 + ,61 + ,572 + ,58 + ,4 + ,2082 + ,266805 + ,78 + ,627 + ,65 + ,0 + ,398 + ,23623 + ,11 + ,156 + ,9 + ,0 + ,1821 + ,174970 + ,69 + ,648 + ,49 + ,0 + ,530 + ,61857 + ,25 + ,192 + ,25 + ,4 + ,1508 + ,144927 + ,44 + ,438 + ,102 + ,0 + ,2709 + ,355619 + ,105 + ,1083 + ,59 + ,1 + ,387 + ,21054 + ,16 + ,146 + ,2 + ,0 + ,1913 + ,230091 + ,46 + ,779 + ,56 + ,5 + ,449 + ,31414 + ,19 + ,200 + ,22 + ,0 + ,3076 + ,280685 + ,107 + ,1117 + ,148 + ,2 + ,1794 + ,209481 + ,58 + ,603 + ,70 + ,7 + ,1456 + ,161691 + ,76 + ,444 + ,91 + ,12 + ,1477 + ,132310 + ,49 + ,581 + ,46 + ,2 + ,568 + ,38214 + ,34 + ,276 + ,52 + ,0 + ,1594 + ,166026 + ,36 + ,546 + ,101 + ,2 + ,2433 + ,316370 + ,74 + ,916 + ,105 + ,0 + ,1223 + ,186273 + ,56 + ,427 + ,58 + ,0 + ,3187 + ,369581 + ,73 + ,1406 + ,130 + ,3 + ,2186 + ,275578 + ,91 + ,743 + ,120 + ,0 + ,3081 + ,368855 + ,109 + ,1075 + ,104 + ,3 + ,1127 + ,172464 + ,31 + ,431 + ,44 + ,0 + ,1045 + ,94381 + ,35 + ,380 + ,48 + ,0 + ,2477 + ,251253 + ,292 + ,806 + ,144 + ,4 + ,3842 + ,382499 + ,154 + ,1367 + ,146 + ,4 + ,1506 + ,118033 + ,43 + ,473 + ,94 + ,14 + ,3810 + ,365575 + ,123 + ,1610 + ,139 + ,0 + ,1730 + ,147989 + ,72 + ,651 + ,67 + ,4 + ,1627 + ,236370 + ,46 + ,528 + ,83 + ,0 + ,1929 + ,193220 + ,77 + ,672 + ,169 + ,1 + ,1595 + ,189020 + ,108 + ,523 + ,69 + ,0 + ,3627 + ,341992 + ,106 + ,1474 + ,99 + ,9 + ,1987 + ,222289 + ,80 + ,698 + ,61 + ,1 + ,2035 + ,173260 + ,63 + ,716 + ,37 + ,3 + ,2538 + ,275969 + ,92 + ,821 + ,54 + ,11 + ,1603 + ,130908 + ,52 + ,556 + ,121 + ,5 + ,2297 + ,208598 + ,77 + ,892 + ,51 + ,2 + ,2268 + ,262412 + ,94 + ,721 + ,52 + ,1 + ,2 + ,1 + ,0 + ,0 + ,0 + ,9 + ,207 + ,14688 + ,10 + ,85 + ,0 + ,0 + ,5 + ,98 + ,1 + ,0 + ,0 + ,0 + ,8 + ,455 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1785 + ,195812 + ,76 + ,610 + ,51 + ,2 + ,2946 + ,345447 + ,134 + ,973 + ,108 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,203 + ,4 + ,0 + ,0 + ,0 + ,151 + ,7199 + ,5 + ,74 + ,0 + ,0 + ,474 + ,46660 + ,20 + ,259 + ,7 + ,0 + ,141 + ,17547 + ,5 + ,69 + ,3 + ,0 + ,976 + ,107465 + ,38 + ,267 + ,80 + ,0 + ,29 + ,969 + ,2 + ,0 + ,0 + ,0 + ,1549 + ,179994 + ,58 + ,518 + ,43 + ,2) + ,dim=c(6 + ,164) + ,dimnames=list(c('pageviews' + ,'time_rfc' + ,'logins' + ,'comp_views' + ,'comp_view_pr' + ,'shared_comp') + ,1:164)) > y <- array(NA,dim=c(6,164),dimnames=list(c('pageviews','time_rfc','logins','comp_views','comp_view_pr','shared_comp'),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/1qzmr1323617412.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/2o2q51323617412.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 = 28.825, df = 162, p-value < 2.2e-16 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.8857074 0.9367189 sample estimates: cor 0.9147888 > 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/3ss7o1323617412.tab") > > try(system("convert tmp/1qzmr1323617412.ps tmp/1qzmr1323617412.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.256 0.081 1.333