R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(6.3 + ,0.301029995663981 + ,0.653212513775344 + ,0.00000000000000 + ,0.819543935541869 + ,1.623249290397900 + ,3 + ,1 + ,3 + ,2.1 + ,0.255272505103306 + ,1.838849090737260 + ,3.40602894496361 + ,3.663040974893970 + ,2.795184589682420 + ,3 + ,5 + ,4 + ,9.1 + ,-0.154901959985743 + ,1.431363764158990 + ,1.02325245963371 + ,2.254064452914340 + ,2.255272505103310 + ,4 + ,4 + ,4 + ,15.8 + ,0.591064607026499 + ,1.278753600952830 + ,-1.63827216398241 + ,-0.522878745280338 + ,1.544068044350280 + ,1 + ,1 + ,1 + ,5.2 + ,0.000000000000000 + ,1.482873583608750 + ,2.20411998265592 + ,2.227886704613670 + ,2.593286067020460 + ,4 + ,5 + ,4 + ,10.9 + ,0.556302500767287 + ,1.447158031342220 + ,0.51851393987789 + ,1.408239965311850 + ,1.799340549453580 + ,1 + ,2 + ,1 + ,8.3 + ,0.146128035678238 + ,1.698970004336020 + ,1.71733758272386 + ,2.643452676486190 + ,2.361727836017590 + ,1 + ,1 + ,1 + ,11 + ,0.176091259055681 + ,0.845098040014257 + ,-0.37161106994969 + ,0.806179973983887 + ,2.049218022670180 + ,5 + ,4 + ,4 + ,3.2 + ,-0.154901959985743 + ,1.477121254719660 + ,2.66745295288995 + ,2.626340367375040 + ,2.448706319905080 + ,5 + ,5 + ,5 + ,6.3 + ,0.322219294733919 + ,0.544068044350276 + ,-1.12493873660830 + ,0.079181246047625 + ,1.623249290397900 + ,1 + ,1 + ,1 + ,6.6 + ,0.612783856719735 + ,0.778151250383644 + ,-0.10513034325475 + ,0.544068044350276 + ,1.623249290397900 + ,2 + ,2 + ,2 + ,9.5 + ,0.079181246047625 + ,1.017033339298780 + ,-0.69897000433602 + ,0.698970004336019 + ,2.079181246047620 + ,2 + ,2 + ,2 + ,3.3 + ,-0.301029995663981 + ,1.301029995663980 + ,1.44185217577329 + ,2.060697840353610 + ,2.170261715394960 + ,5 + ,5 + ,5 + ,11 + ,0.531478917042255 + ,0.591064607026499 + ,-0.92081875395238 + ,0.000000000000000 + ,1.204119982655920 + ,3 + ,1 + ,2 + ,4.7 + ,0.176091259055681 + ,1.612783856719740 + ,1.92941892571429 + ,2.511883360978870 + ,2.491361693834270 + ,1 + ,3 + ,1 + ,10.4 + ,0.531478917042255 + ,0.954242509439325 + ,-0.99567862621736 + ,0.602059991327962 + ,1.447158031342220 + ,5 + ,1 + ,3 + ,7.4 + ,-0.096910013008056 + ,0.880813592280791 + ,0.01703333929878 + ,0.740362689494244 + ,1.832508912706240 + ,5 + ,3 + ,4 + ,2.1 + ,-0.096910013008056 + ,1.662757831681570 + ,2.71683772329952 + ,2.816241299991780 + ,2.526339277389840 + ,5 + ,5 + ,5 + ,17.9 + ,0.301029995663981 + ,1.380211241711610 + ,-2.00000000000000 + ,-0.602059991327962 + ,1.698970004336020 + ,1 + ,1 + ,1 + ,6.1 + ,0.278753600952829 + ,2.000000000000000 + ,1.79239168949825 + ,3.120573931205850 + ,2.426511261364580 + ,1 + ,1 + ,1 + ,11.9 + ,0.113943352306837 + ,0.505149978319906 + ,-1.63827216398241 + ,-0.397940008672038 + ,1.278753600952830 + ,4 + ,1 + ,3 + ,13.8 + ,0.748188027006200 + ,0.698970004336019 + ,0.23044892137827 + ,0.799340549453582 + ,1.079181246047620 + ,2 + ,1 + ,1 + ,14.3 + ,0.491361693834273 + ,0.812913356642856 + ,0.54406804435028 + ,1.033423755486950 + ,2.079181246047620 + ,2 + ,1 + ,1 + ,15.2 + ,0.255272505103306 + ,1.079181246047620 + ,-0.31875876262441 + ,1.190331698170290 + ,2.146128035678240 + ,2 + ,2 + ,2 + ,10 + ,-0.045757490560675 + ,1.305351369446620 + ,1.00000000000000 + ,2.060697840353610 + ,2.230448921378270 + ,4 + ,4 + ,4 + ,11.9 + ,0.255272505103306 + ,1.113943352306840 + ,0.20951501454263 + ,1.056904851336470 + ,1.230448921378270 + ,2 + ,1 + ,2 + ,6.5 + ,0.278753600952829 + ,1.431363764158990 + ,2.28330122870355 + ,2.255272505103310 + ,2.060697840353610 + ,4 + ,4 + ,4 + ,7.5 + ,-0.045757490560675 + ,1.255272505103310 + ,0.39794000867204 + ,1.082785370316450 + ,1.491361693834270 + ,5 + ,5 + ,5 + ,10.6 + ,0.414973347970818 + ,0.672097857935718 + ,-0.55284196865778 + ,0.278753600952829 + ,1.322219294733920 + ,3 + ,1 + ,3 + ,7.4 + ,0.380211241711606 + ,0.991226075692495 + ,0.62685341466673 + ,1.702430536445530 + ,1.716003343634800 + ,1 + ,1 + ,1 + ,8.4 + ,0.079181246047625 + ,1.462397997898960 + ,0.83250891270624 + ,2.252853030979890 + ,2.214843848047700 + ,2 + ,3 + ,2 + ,5.7 + ,-0.045757490560675 + ,0.845098040014257 + ,-0.12493873660830 + ,1.089905111439400 + ,2.352182518111360 + ,2 + ,2 + ,2 + ,4.9 + ,-0.301029995663981 + ,0.778151250383644 + ,0.55630250076729 + ,1.322219294733920 + ,2.352182518111360 + ,3 + ,2 + ,3 + ,3.2 + ,-0.221848749616356 + ,1.301029995663980 + ,1.74429298312268 + ,2.243038048686290 + ,2.178976947293170 + ,5 + ,5 + ,5 + ,11 + ,0.361727836017593 + ,0.653212513775344 + ,-0.04575749056068 + ,0.414973347970818 + ,1.778151250383640 + ,2 + ,1 + ,2 + ,4.9 + ,-0.301029995663981 + ,0.875061263391700 + ,0.30102999566398 + ,1.089905111439400 + ,2.301029995663980 + ,3 + ,1 + ,3 + ,13.2 + ,0.414973347970818 + ,0.361727836017593 + ,-0.98296666070122 + ,0.397940008672038 + ,1.662757831681570 + ,3 + ,2 + ,2 + ,9.7 + ,-0.221848749616356 + ,1.380211241711610 + ,0.62221402296630 + ,1.763427993562940 + ,2.322219294733920 + ,4 + ,3 + ,4 + ,12.8 + ,0.819543935541869 + ,0.477121254719662 + ,0.54406804435028 + ,0.591064607026499 + ,1.146128035678240 + ,2 + ,1 + ,1) + ,dim=c(9 + ,39) + ,dimnames=list(c('SWS' + ,'PS' + ,'L' + ,'Wb' + ,'Wbr' + ,'tg' + ,'P' + ,'S' + ,'D') + ,1:39)) > y <- array(NA,dim=c(9,39),dimnames=list(c('SWS','PS','L','Wb','Wbr','tg','P','S','D'),1:39)) > 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/html/rcomp/tmp/1h3g31292369546.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/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > n <- length(y[,1]) > n [1] 9 > 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/html/rcomp/tmp/2klx91292369546.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 = 4.3485, df = 37, p-value = 0.0001033 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.3258349 0.7579938 sample estimates: cor 0.5815635 > 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 50 or more warnings (use warnings() to see the first 50) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3yvu01292369546.tab") > > try(system("convert tmp/1h3g31292369546.ps tmp/1h3g31292369546.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.955 0.323 2.007