R version 2.12.0 (2010-10-15) Copyright (C) 2010 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(1536 + ,78 + ,20 + ,17 + ,66 + ,30 + ,1134 + ,46 + ,38 + ,17 + ,68 + ,42 + ,192 + ,18 + ,0 + ,0 + ,0 + ,0 + ,2032 + ,84 + ,49 + ,22 + ,68 + ,54 + ,3230 + ,124 + ,74 + ,30 + ,120 + ,86 + ,5723 + ,214 + ,104 + ,29 + ,112 + ,157 + ,1321 + ,49 + ,37 + ,19 + ,72 + ,36 + ,1077 + ,46 + ,49 + ,25 + ,96 + ,48 + ,1462 + ,37 + ,42 + ,30 + ,109 + ,45 + ,2568 + ,86 + ,62 + ,26 + ,104 + ,77 + ,1810 + ,69 + ,50 + ,20 + ,54 + ,49 + ,1788 + ,58 + ,65 + ,25 + ,98 + ,77 + ,1334 + ,85 + ,28 + ,15 + ,49 + ,28 + ,2415 + ,84 + ,48 + ,22 + ,88 + ,84 + ,1155 + ,43 + ,42 + ,12 + ,45 + ,31 + ,1374 + ,67 + ,47 + ,19 + ,74 + ,28 + ,1503 + ,49 + ,71 + ,28 + ,112 + ,99 + ,999 + ,47 + ,0 + ,12 + ,45 + ,2 + ,2189 + ,76 + ,50 + ,28 + ,110 + ,41 + ,633 + ,20 + ,12 + ,13 + ,39 + ,25 + ,837 + ,48 + ,16 + ,14 + ,55 + ,16 + ,2167 + ,81 + ,76 + ,27 + ,102 + ,96 + ,1451 + ,57 + ,29 + ,25 + ,96 + ,23 + ,1790 + ,45 + ,38 + ,30 + ,86 + ,33 + ,1645 + ,72 + ,50 + ,18 + ,67 + ,46 + ,1179 + ,22 + ,33 + ,17 + ,64 + ,59 + ,1688 + ,138 + ,45 + ,22 + ,82 + ,72 + ,1100 + ,74 + ,59 + ,28 + ,100 + ,72 + ,2258 + ,101 + ,49 + ,25 + ,95 + ,62 + ,1767 + ,35 + ,40 + ,16 + ,63 + ,55 + ,1300 + ,39 + ,40 + ,23 + ,87 + ,27 + ,1432 + ,38 + ,51 + ,20 + ,65 + ,41 + ,1780 + ,87 + ,41 + ,11 + ,43 + ,51 + ,2475 + ,102 + ,73 + ,20 + ,80 + ,26 + ,1930 + ,42 + ,43 + ,21 + ,84 + ,65 + ,1 + ,1 + ,0 + ,0 + ,0 + ,0 + ,1782 + ,54 + ,46 + ,27 + ,105 + ,28 + ,1505 + ,46 + ,44 + ,14 + ,51 + ,44 + ,1820 + ,41 + ,31 + ,29 + ,98 + ,36 + ,1648 + ,49 + ,71 + ,31 + ,124 + ,100 + ,1668 + ,56 + ,61 + ,19 + ,75 + ,104 + ,1366 + ,47 + ,28 + ,30 + ,120 + ,35 + ,864 + ,25 + ,21 + ,23 + ,84 + ,69 + ,1602 + ,62 + ,42 + ,20 + ,78 + ,73 + ,1023 + ,41 + ,44 + ,22 + ,87 + ,106 + ,962 + ,72 + ,34 + ,19 + ,70 + ,53 + ,629 + ,26 + ,15 + ,32 + ,97 + ,43 + ,1568 + ,77 + ,46 + ,18 + ,72 + ,49 + ,1715 + ,75 + ,43 + ,26 + ,104 + ,38 + ,2093 + ,51 + ,47 + ,25 + ,93 + ,51 + ,658 + ,28 + ,12 + ,22 + ,82 + ,14 + ,1198 + ,53 + ,42 + ,19 + ,73 + ,40 + ,2059 + ,64 + ,56 + ,24 + ,87 + ,79 + ,1574 + ,65 + ,41 + ,26 + ,95 + ,52 + ,1447 + ,48 + ,48 + ,27 + ,105 + ,44 + ,1342 + ,44 + ,30 + ,10 + ,37 + ,34 + ,1526 + ,54 + ,44 + ,26 + ,96 + ,47 + ,669 + ,16 + ,25 + ,21 + ,80 + ,32 + ,859 + ,55 + ,42 + ,21 + ,83 + ,31 + ,2315 + ,71 + ,28 + ,34 + ,124 + ,40 + ,1326 + ,47 + ,33 + ,29 + ,116 + ,42 + ,1567 + ,62 + ,32 + ,18 + ,72 + ,34 + ,1080 + ,44 + ,28 + ,16 + ,55 + ,40 + ,896 + ,28 + ,31 + ,23 + ,86 + ,35 + ,855 + ,25 + ,13 + ,22 + ,85 + ,11 + ,1229 + ,37 + ,38 + ,29 + ,107 + ,43 + ,1939 + ,60 + ,39 + ,31 + ,124 + ,53 + ,2293 + ,57 + ,68 + ,21 + ,78 + ,82 + ,818 + ,30 + ,32 + ,21 + ,83 + ,41) + ,dim=c(6 + ,69) + ,dimnames=list(c('Pageviews' + ,'#Logins' + ,'Blogged_Computations' + ,'Reviewed_Compendiums' + ,'Feedback_in_PR' + ,'Included_Hyperlinks') + ,1:69)) > y <- array(NA,dim=c(6,69),dimnames=list(c('Pageviews','#Logins','Blogged_Computations','Reviewed_Compendiums','Feedback_in_PR','Included_Hyperlinks'),1:69)) > 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' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: > #Technical description: > 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/www/rcomp/tmp/1xued1323859410.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/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/www/rcomp/tmp/2s43y1323859410.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 = 12.5653, df = 67, p-value < 2.2e-16 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.7499397 0.8967412 sample estimates: cor 0.8378969 > 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/www/rcomp/tmp/3vtq61323859410.tab") > > try(system("convert tmp/1xued1323859410.ps tmp/1xued1323859410.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.190 0.090 1.249