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(NA + ,NA + ,3.65 + ,15.71 + ,15.56 + ,6.47 + ,3.00 + ,5.00 + ,3.00 + ,6.30 + ,0.69 + ,1.50 + ,6.91 + ,8.79 + ,3.74 + ,3.00 + ,1.00 + ,3.00 + ,NA + ,NA + ,2.64 + ,8.13 + ,10.70 + ,4.09 + ,1.00 + ,1.00 + ,1.00 + ,NA + ,NA + ,NA + ,-0.08 + ,8.65 + ,3.22 + ,5.00 + ,2.00 + ,3.00 + ,2.10 + ,0.59 + ,4.23 + ,14.75 + ,15.34 + ,6.44 + ,3.00 + ,5.00 + ,4.00 + ,9.10 + ,-0.36 + ,3.30 + ,9.26 + ,12.10 + ,5.19 + ,4.00 + ,4.00 + ,4.00 + ,15.80 + ,1.36 + ,2.94 + ,-3.77 + ,-1.20 + ,3.56 + ,1.00 + ,1.00 + ,1.00 + ,5.20 + ,0.00 + ,3.41 + ,11.98 + ,12.04 + ,5.97 + ,4.00 + ,5.00 + ,4.00 + ,10.90 + ,1.28 + ,3.33 + ,8.10 + ,10.15 + ,4.14 + ,1.00 + ,2.00 + ,1.00 + ,8.30 + ,0.34 + ,3.91 + ,10.86 + ,12.99 + ,5.44 + ,1.00 + ,1.00 + ,1.00 + ,11.00 + ,0.41 + ,1.95 + ,-0.86 + ,8.76 + ,4.72 + ,5.00 + ,4.00 + ,4.00 + ,3.20 + ,-0.36 + ,3.40 + ,13.05 + ,12.96 + ,5.64 + ,5.00 + ,5.00 + ,5.00 + ,7.60 + ,0.99 + ,NA + ,-0.60 + ,7.78 + ,NA + ,2.00 + ,1.00 + ,2.00 + ,NA + ,NA + ,3.69 + ,12.14 + ,12.95 + ,5.90 + ,5.00 + ,5.00 + ,5.00 + ,6.30 + ,0.74 + ,1.25 + ,-2.59 + ,7.09 + ,3.74 + ,1.00 + ,1.00 + ,1.00 + ,8.60 + ,NA + ,3.91 + ,8.01 + ,10.13 + ,3.33 + ,2.00 + ,2.00 + ,2.00 + ,6.60 + ,1.41 + ,1.79 + ,-0.24 + ,8.16 + ,3.74 + ,2.00 + ,2.00 + ,2.00 + ,9.50 + ,0.18 + ,2.34 + ,-1.61 + ,8.52 + ,4.79 + ,2.00 + ,2.00 + ,2.00 + ,4.80 + ,0.26 + ,3.53 + ,7.25 + ,9.77 + ,NA + ,1.00 + ,2.00 + ,1.00 + ,12.00 + ,1.81 + ,1.95 + ,11.00 + ,11.30 + ,NA + ,1.00 + ,1.00 + ,1.00 + ,NA + ,-1.20 + ,3.33 + ,13.18 + ,13.43 + ,5.99 + ,5.00 + ,5.00 + ,5.00 + ,3.30 + ,-0.69 + ,3.00 + ,10.23 + ,11.65 + ,5.00 + ,5.00 + ,5.00 + ,5.00 + ,11.00 + ,1.22 + ,1.36 + ,-2.12 + ,6.91 + ,2.77 + ,3.00 + ,1.00 + ,2.00 + ,NA + ,NA + ,3.67 + ,12.24 + ,12.91 + ,5.53 + ,1.00 + ,4.00 + ,1.00 + ,4.70 + ,0.41 + ,3.71 + ,11.35 + ,12.69 + ,5.74 + ,1.00 + ,3.00 + ,1.00 + ,NA + ,NA + ,2.79 + ,10.50 + ,11.69 + ,4.14 + ,1.00 + ,1.00 + ,1.00 + ,10.40 + ,1.22 + ,2.20 + ,-2.29 + ,8.29 + ,3.33 + ,5.00 + ,1.00 + ,3.00 + ,7.40 + ,-0.22 + ,2.03 + ,6.95 + ,8.61 + ,4.22 + ,5.00 + ,3.00 + ,4.00 + ,2.10 + ,-0.22 + ,3.83 + ,13.16 + ,13.39 + ,5.82 + ,5.00 + ,5.00 + ,5.00 + ,NA + ,NA + ,3.11 + ,11.51 + ,11.96 + ,4.61 + ,1.00 + ,1.00 + ,1.00 + ,NA + ,NA + ,2.79 + ,10.46 + ,10.93 + ,3.50 + ,3.00 + ,5.00 + ,4.00 + ,7.70 + ,0.34 + ,0.96 + ,-5.30 + ,-1.97 + ,3.07 + ,5.00 + ,2.00 + ,4.00 + ,17.90 + ,0.69 + ,3.18 + ,-4.61 + ,-1.39 + ,3.91 + ,1.00 + ,1.00 + ,1.00 + ,6.10 + ,0.64 + ,4.61 + ,11.03 + ,14.09 + ,5.59 + ,1.00 + ,1.00 + ,1.00 + ,8.20 + ,0.88 + ,NA + ,-2.10 + ,8.01 + ,3.40 + ,2.00 + ,1.00 + ,1.00 + ,8.40 + ,1.03 + ,NA + ,7.21 + ,9.00 + ,3.81 + ,3.00 + ,1.00 + ,3.00 + ,11.90 + ,0.26 + ,1.16 + ,-3.77 + ,-0.92 + ,2.94 + ,4.00 + ,1.00 + ,3.00 + ,10.80 + ,0.69 + ,0.69 + ,-3.04 + ,-1.11 + ,3.40 + ,4.00 + ,1.00 + ,3.00 + ,13.80 + ,1.72 + ,1.61 + ,7.44 + ,8.75 + ,2.48 + ,2.00 + ,1.00 + ,1.00 + ,14.30 + ,1.13 + ,1.87 + ,8.16 + ,9.29 + ,4.79 + ,2.00 + ,1.00 + ,1.00 + ,NA + ,0.00 + ,3.16 + ,12.43 + ,13.10 + ,6.09 + ,5.00 + ,5.00 + ,5.00 + ,15.20 + ,0.59 + ,2.48 + ,-0.73 + ,9.65 + ,4.94 + ,2.00 + ,2.00 + ,2.00 + ,10.00 + ,-0.11 + ,3.01 + ,9.21 + ,11.65 + ,5.14 + ,4.00 + ,4.00 + ,4.00 + ,11.90 + ,0.59 + ,2.56 + ,7.39 + ,9.34 + ,2.83 + ,2.00 + ,1.00 + ,2.00 + ,6.50 + ,0.64 + ,3.30 + ,12.17 + ,12.10 + ,4.74 + ,4.00 + ,4.00 + ,4.00 + ,7.50 + ,-0.11 + ,2.89 + ,7.82 + ,9.40 + ,3.43 + ,5.00 + ,5.00 + ,5.00 + ,NA + ,NA + ,2.62 + ,8.36 + ,10.58 + ,4.14 + ,2.00 + ,2.00 + ,2.00 + ,10.60 + ,0.96 + ,1.55 + ,-1.27 + ,7.55 + ,3.04 + ,3.00 + ,1.00 + ,3.00 + ,7.40 + ,0.88 + ,2.28 + ,8.35 + ,10.83 + ,3.95 + ,1.00 + ,1.00 + ,1.00 + ,8.40 + ,0.18 + ,3.37 + ,8.82 + ,12.10 + ,5.10 + ,2.00 + ,3.00 + ,2.00 + ,5.70 + ,-0.11 + ,1.95 + ,-0.29 + ,9.42 + ,5.42 + ,2.00 + ,2.00 + ,2.00 + ,4.90 + ,-0.69 + ,1.79 + ,8.19 + ,9.95 + ,5.42 + ,3.00 + ,2.00 + ,3.00 + ,NA + ,NA + ,2.83 + ,9.60 + ,11.49 + ,5.01 + ,5.00 + ,5.00 + ,5.00 + ,3.20 + ,-0.51 + ,3.00 + ,10.92 + ,12.07 + ,5.02 + ,5.00 + ,5.00 + ,5.00 + ,NA + ,NA + ,2.54 + ,7.24 + ,9.43 + ,4.50 + ,2.00 + ,2.00 + ,2.00 + ,8.10 + ,0.79 + ,1.25 + ,-2.81 + ,6.91 + ,NA + ,3.00 + ,1.00 + ,2.00 + ,11.00 + ,0.83 + ,1.50 + ,-0.11 + ,7.86 + ,4.09 + ,2.00 + ,1.00 + ,2.00 + ,4.90 + ,-0.69 + ,2.01 + ,7.60 + ,9.42 + ,5.30 + ,3.00 + ,1.00 + ,3.00 + ,13.20 + ,0.96 + ,0.83 + ,-2.26 + ,7.82 + ,3.83 + ,3.00 + ,2.00 + ,2.00 + ,9.70 + ,-0.51 + ,3.18 + ,8.34 + ,10.97 + ,5.35 + ,4.00 + ,3.00 + ,4.00 + ,12.80 + ,1.89 + ,1.10 + ,8.16 + ,8.27 + ,2.64 + ,2.00 + ,1.00 + ,1.00 + ,NA + ,NA + ,2.56 + ,8.31 + ,9.74 + ,3.64 + ,3.00 + ,1.00 + ,1.00) + ,dim=c(9 + ,62) + ,dimnames=list(c('SWS' + ,'PSln' + ,'Lln' + ,'wbln' + ,'wbrln' + ,'tgln' + ,'P' + ,'S' + ,'D ') + ,1:62)) > y <- array(NA,dim=c(9,62),dimnames=list(c('SWS','PSln','Lln','wbln','wbrln','tgln','P','S','D '),1:62)) > 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/1v4eh1292889955.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) Warning messages: 1: In strwidth(labels, "user") : font width unknown for character 0xd 2: In text.default(x, y, txt, cex = cex, font = font) : font width unknown for character 0xd 3: In text.default(x, y, txt, cex = cex, font = font) : font metrics unknown for character 0xd > 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/2hncm1292889955.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.6383, df = 45, p-value = 3.035e-05 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.3365188 0.7357331 sample estimates: cor 0.5687256 > 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/3dxbd1292889955.tab") > > try(system("convert tmp/1v4eh1292889955.ps tmp/1v4eh1292889955.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.019 0.361 2.101