x <- array(list(-999.00
,-999.00
,38.60
,6654.00
,5712.00
,645.00
,3.00
,5.00
,3.00
,6.30
,2.00
,4.50
,1.00
,6600.00
,42.00
,3.00
,1.00
,3.00
,-999.00
,-999.00
,14.00
,3.39
,44.50
,60.00
,1.00
,1.00
,1.00
,-999.00
,-999.00
,-999.00
,0.92
,5.70
,25.00
,5.00
,2.00
,3.00
,2.10
,1.80
,69.00
,2547.00
,4603.00
,624.00
,3.00
,5.00
,4.00
,9.10
,0.70
,27.00
,10.55
,179.50
,180.00
,4.00
,4.00
,4.00
,15.80
,3.90
,19.00
,0.02
,0.30
,35.00
,1.00
,1.00
,1.00
,5.20
,1.00
,30.40
,160.00
,169.00
,392.00
,4.00
,5.00
,4.00
,10.90
,3.60
,28.00
,3.30
,25.60
,63.00
,1.00
,2.00
,1.00
,8.30
,1.40
,50.00
,52.16
,440.00
,230.00
,1.00
,1.00
,1.00
,11.00
,1.50
,7.00
,0.43
,6.40
,112.00
,5.00
,4.00
,4.00
,3.20
,0.70
,30.00
,465.00
,423.00
,281.00
,5.00
,5.00
,5.00
,7.60
,2.70
,-999.00
,0.55
,2.40
,-999.00
,2.00
,1.00
,2.00
,-999.00
,-999.00
,40.00
,187.10
,419.00
,365.00
,5.00
,5.00
,5.00
,6.30
,2.10
,3.50
,0.08
,1.20
,42.00
,1.00
,1.00
,1.00
,8.60
,0.00
,50.00
,3.00
,25.00
,28.00
,2.00
,2.00
,2.00
,6.60
,4.10
,6.00
,0.79
,3500.00
,42.00
,2.00
,2.00
,2.00
,9.50
,1.20
,10.40
,0.20
,5.00
,120.00
,2.00
,2.00
,2.00
,4.80
,1.30
,34.00
,1.41
,17.50
,-999.00
,1.00
,2.00
,1.00
,12.00
,6.10
,7.00
,60.00
,81.00
,-999.00
,1.00
,1.00
,1.00
,-999.00
,0.30
,28.00
,529.00
,680.00
,400.00
,5.00
,5.00
,5.00
,3.30
,0.50
,20.00
,27.66
,115.00
,148.00
,5.00
,5.00
,5.00
,11.00
,3.40
,3.90
,0.12
,1.00
,16.00
,3.00
,1.00
,2.00
,-999.00
,-999.00
,39.30
,207.00
,406.00
,252.00
,1.00
,4.00
,1.00
,4.70
,1.50
,41.00
,85.00
,325.00
,310.00
,1.00
,3.00
,1.00
,-999.00
,-999.00
,16.20
,36.33
,119.50
,63.00
,1.00
,1.00
,1.00
,10.40
,3.40
,9.00
,0.10
,4.00
,28.00
,5.00
,1.00
,3.00
,7.40
,0.80
,7.60
,1.04
,5.50
,68.00
,5.00
,3.00
,4.00
,2.10
,0.80
,46.00
,521.00
,655.00
,336.00
,5.00
,5.00
,5.00
,-999.00
,-999.00
,22.40
,100.00
,157.00
,100.00
,1.00
,1.00
,1.00
,-999.00
,-999.00
,16.30
,35.00
,56.00
,33.00
,3.00
,5.00
,4.00
,7.70
,1.40
,2.60
,0.01
,0.14
,21.50
,5.00
,2.00
,4.00
,17.90
,2.00
,24.00
,0.01
,0.25
,50.00
,1.00
,1.00
,1.00
,6.10
,1.90
,100.00
,62.00
,1320.00
,267.00
,1.00
,1.00
,1.00
,8.20
,2.40
,-999.00
,0.12
,3.00
,30.00
,2.00
,1.00
,1.00
,8.40
,2.80
,-999.00
,1.35
,8.10
,45.00
,3.00
,1.00
,3.00
,11.90
,1.30
,3.20
,0.02
,0.40
,19.00
,4.00
,1.00
,3.00
,10.80
,2.00
,2.00
,0.05
,0.33
,30.00
,4.00
,1.00
,3.00
,13.80
,5.60
,5.00
,1.70
,6.30
,12.00
,2.00
,1.00
,1.00
,14.30
,3.10
,6.50
,3.50
,10.80
,120.00
,2.00
,1.00
,1.00
,-999.00
,1.00
,23.60
,250.00
,490.00
,440.00
,5.00
,5.00
,5.00
,15.20
,1.80
,12.00
,0.48
,15.50
,140.00
,2.00
,2.00
,2.00
,10.00
,0.90
,20.20
,10.00
,115.00
,170.00
,4.00
,4.00
,4.00
,11.90
,1.80
,13.00
,1.62
,11.40
,17.00
,2.00
,1.00
,2.00
,6.50
,1.90
,27.00
,192.00
,180.00
,115.00
,4.00
,4.00
,4.00
,7.50
,0.90
,18.00
,2.50
,12.10
,31.00
,5.00
,5.00
,5.00
,-999.00
,-999.00
,13.70
,4.29
,39.20
,63.00
,2.00
,2.00
,2.00
,10.60
,2.60
,4.70
,0.28
,1.90
,21.00
,3.00
,1.00
,3.00
,7.40
,2.40
,9.80
,4.24
,50.40
,52.00
,1.00
,1.00
,1.00
,8.40
,1.20
,29.00
,6.80
,179.00
,164.00
,2.00
,3.00
,2.00
,5.70
,0.90
,7.00
,0.75
,12.30
,225.00
,2.00
,2.00
,2.00
,4.90
,0.50
,6.00
,3.60
,21.00
,225.00
,3.00
,2.00
,3.00
,-999.00
,-999.00
,17.00
,14.83
,98.20
,150.00
,5.00
,5.00
,5.00
,3.20
,0.60
,20.00
,55.50
,175.00
,151.00
,5.00
,5.00
,5.00
,-999.00
,-999.00
,12.70
,1.40
,12.50
,90.00
,2.00
,2.00
,2.00
,8.10
,2.20
,3.50
,0.06
,1.00
,-999.00
,3.00
,1.00
,2.00
,11.00
,2.30
,4.50
,0.90
,2.60
,60.00
,2.00
,1.00
,2.00
,4.90
,0.50
,7.50
,2.00
,12.30
,200.00
,3.00
,1.00
,3.00
,13.20
,2.60
,2.30
,0.10
,2.50
,46.00
,3.00
,2.00
,2.00
,9.70
,0.60
,24.00
,4.19
,58.00
,210.00
,4.00
,3.00
,4.00
,12.80
,6.60
,3.00
,3.50
,3.90
,14.00
,2.00
,1.00
,1.00
,-999.00
,-999.00
,13.00
,4.05
,17.00
,38.00
,3.00
,1.00
,1.00)
,dim=c(9
,62)
,dimnames=list(c('SWS'
,'PS'
,'L'
,'Wb'
,'Wbr'
,'Tg'
,'P'
,'S'
,'D')
,1:62))
 y <- array(NA,dim=c(9,62),dimnames=list(c('SWS','PS','L','Wb','Wbr','Tg','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/1x8uc1292931994.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()

#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
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/2b0sl1292931994.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)
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)
}
}
a<-table.end(a)
table.save(a,file="/var/www/html/rcomp/tmp/3e19r1292931994.tab") 

try(system("convert tmp/1x8uc1292931994.ps tmp/1x8uc1292931994.png",intern=TRUE))

