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(210907 + ,56 + ,79 + ,94 + ,0 + ,2 + ,179321 + ,89 + ,108 + ,103 + ,0 + ,4 + ,149061 + ,44 + ,43 + ,93 + ,0 + ,0 + ,237213 + ,84 + ,78 + ,123 + ,0 + ,0 + ,173326 + ,88 + ,86 + ,148 + ,0 + ,-4 + ,133131 + ,55 + ,44 + ,90 + ,0 + ,4 + ,258873 + ,60 + ,104 + ,124 + ,0 + ,4 + ,324799 + ,154 + ,158 + ,168 + ,0 + ,0 + ,230964 + ,53 + ,102 + ,115 + ,0 + ,-1 + ,236785 + ,119 + ,77 + ,71 + ,0 + ,0 + ,344297 + ,75 + ,80 + ,108 + ,0 + ,1 + ,174724 + ,92 + ,123 + ,120 + ,0 + ,0 + ,174415 + ,100 + ,73 + ,114 + ,0 + ,3 + ,223632 + ,73 + ,105 + ,120 + ,0 + ,-1 + ,294424 + ,77 + ,107 + ,124 + ,0 + ,4 + ,325107 + ,99 + ,84 + ,126 + ,0 + ,3 + ,106408 + ,30 + ,33 + ,37 + ,0 + ,1 + ,96560 + ,76 + ,42 + ,38 + ,1 + ,0 + ,265769 + ,146 + ,96 + ,120 + ,0 + ,-2 + ,269651 + ,67 + ,106 + ,93 + ,0 + ,-3 + ,149112 + ,56 + ,56 + ,95 + ,0 + ,-4 + ,152871 + ,58 + ,59 + ,90 + ,0 + ,2 + ,362301 + ,119 + ,76 + ,110 + ,0 + ,2 + ,183167 + ,66 + ,91 + ,138 + ,0 + ,-4 + ,277965 + ,89 + ,115 + ,133 + ,0 + ,3 + ,218946 + ,41 + ,76 + ,96 + ,0 + ,2 + ,244052 + ,68 + ,101 + ,164 + ,0 + ,2 + ,341570 + ,168 + ,94 + ,78 + ,1 + ,0 + ,233328 + ,132 + ,92 + ,102 + ,0 + ,5 + ,206161 + ,71 + ,75 + ,99 + ,0 + ,-2 + ,311473 + ,112 + ,128 + ,129 + ,0 + ,0 + ,207176 + ,70 + ,56 + ,114 + ,0 + ,-2 + ,196553 + ,57 + ,41 + ,99 + ,0 + ,-3 + ,143246 + ,103 + ,67 + ,104 + ,0 + ,2 + ,182192 + ,52 + ,77 + ,138 + ,0 + ,2 + ,194979 + ,62 + ,66 + ,151 + ,0 + ,2 + ,167488 + ,45 + ,69 + ,72 + ,0 + ,0 + ,143756 + ,46 + ,105 + ,120 + ,0 + ,4 + ,275541 + ,63 + ,116 + ,115 + ,0 + ,4 + ,152299 + ,53 + ,62 + ,98 + ,0 + ,2 + ,193339 + ,78 + ,100 + ,71 + ,0 + ,2 + ,130585 + ,46 + ,67 + ,107 + ,0 + ,-4 + ,112611 + ,41 + ,46 + ,73 + ,1 + ,3 + ,148446 + ,91 + ,135 + ,129 + ,0 + ,3 + ,182079 + ,63 + ,124 + ,118 + ,0 + ,2 + ,243060 + ,63 + ,58 + ,104 + ,0 + ,-1 + ,162765 + ,32 + ,68 + ,107 + ,0 + ,-3 + ,85574 + ,34 + ,37 + ,36 + ,1 + ,0 + ,225060 + ,93 + ,93 + ,139 + ,0 + ,1 + ,133328 + ,55 + ,56 + ,56 + ,1 + ,-3 + ,100750 + ,72 + ,83 + ,93 + ,0 + ,3 + ,101523 + ,42 + ,59 + ,87 + ,1 + ,0 + ,243511 + ,71 + ,133 + ,110 + ,0 + ,0 + ,152474 + ,65 + ,106 + ,83 + ,0 + ,0 + ,132487 + ,41 + ,71 + ,98 + ,0 + ,3 + ,317394 + ,86 + ,116 + ,82 + ,0 + ,-3 + ,244749 + ,95 + ,98 + ,115 + ,0 + ,0 + ,184510 + ,49 + ,64 + ,140 + ,0 + ,-4 + ,128423 + ,64 + ,32 + ,120 + ,0 + ,2 + ,97839 + ,38 + ,25 + ,66 + ,0 + ,-1 + ,172494 + ,52 + ,46 + ,139 + ,0 + ,3 + ,229242 + ,247 + ,63 + ,119 + ,0 + ,2 + ,351619 + ,139 + ,95 + ,141 + ,0 + ,5 + ,324598 + ,110 + ,113 + ,133 + ,0 + ,2 + ,195838 + ,67 + ,111 + ,98 + ,0 + ,-2 + ,254488 + ,83 + ,120 + ,117 + ,0 + ,0 + ,199476 + ,70 + ,87 + ,105 + ,0 + ,3 + ,92499 + ,32 + ,25 + ,55 + ,1 + ,-2 + ,224330 + ,83 + ,131 + ,132 + ,0 + ,0 + ,181633 + ,70 + ,47 + ,73 + ,0 + ,6 + ,271856 + ,103 + ,109 + ,86 + ,0 + ,-3 + ,95227 + ,34 + ,37 + ,48 + ,0 + ,3 + ,98146 + ,40 + ,15 + ,48 + ,1 + ,0 + ,118612 + ,46 + ,54 + ,43 + ,1 + ,-2 + ,65475 + ,18 + ,16 + ,46 + ,1 + ,1 + ,108446 + ,60 + ,22 + ,65 + ,1 + ,0 + ,121848 + ,39 + ,37 + ,52 + ,1 + ,2 + ,76302 + ,31 + ,29 + ,68 + ,1 + ,2 + ,98104 + ,54 + ,55 + ,47 + ,1 + ,-3 + ,30989 + ,14 + ,5 + ,41 + ,1 + ,-2 + ,31774 + ,23 + ,0 + ,47 + ,1 + ,1 + ,150580 + ,77 + ,27 + ,71 + ,1 + ,-4 + ,54157 + ,19 + ,37 + ,30 + ,1 + ,0 + ,59382 + ,49 + ,29 + ,24 + ,1 + ,1 + ,84105 + ,20 + ,17 + ,63 + ,1 + ,0) + ,dim=c(6 + ,85) + ,dimnames=list(c('time' + ,'logins' + ,'BC' + ,'LFM' + ,'Course' + ,'Totaal') + ,1:85)) > y <- array(NA,dim=c(6,85),dimnames=list(c('time','logins','BC','LFM','Course','Totaal'),1:85)) > 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 = 'Pearson 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/wessaorg/rcomp/tmp/167ay1324637066.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/2czv81324637066.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 = 8.2739, df = 83, p-value = 1.851e-12 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.5359727 0.7744578 sample estimates: cor 0.6723008 > 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/3v9zy1324637066.tab") > > try(system("convert tmp/167ay1324637066.ps tmp/167ay1324637066.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.911 0.090 0.996