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(6654000 + ,5712000 + ,-999.0 + ,-999.0 + ,3.3 + ,38.6 + ,645.0 + ,3 + ,5 + ,3 + ,1000 + ,6600 + ,6.3 + ,2.0 + ,8.3 + ,4.5 + ,42.0 + ,3 + ,1 + ,3 + ,3385 + ,44500 + ,-999.0 + ,-999.0 + ,12.5 + ,14.0 + ,60.0 + ,1 + ,1 + ,1 + ,.920 + ,5700 + ,-999.0 + ,-999.0 + ,16.5 + ,-999.0 + ,25.0 + ,5 + ,2 + ,3 + ,2547000 + ,4603000 + ,2.1 + ,1.8 + ,3.9 + ,69.0 + ,624.0 + ,3 + ,5 + ,4 + ,10550 + ,179500 + ,9.1 + ,.7 + ,9.8 + ,27.0 + ,180.0 + ,4 + ,4 + ,4 + ,.023 + ,.300 + ,15.8 + ,3.9 + ,19.7 + ,19.0 + ,35.0 + ,1 + ,1 + ,1 + ,160000 + ,169000 + ,5.2 + ,1.0 + ,6.2 + ,30.4 + ,392.0 + ,4 + ,5 + ,4 + ,3300 + ,25600 + ,10.9 + ,3.6 + ,14.5 + ,28.0 + ,63.0 + ,1 + ,2 + ,1 + ,52160 + ,440000 + ,8.3 + ,1.4 + ,9.7 + ,50.0 + ,230.0 + ,1 + ,1 + ,1 + ,.425 + ,6400 + ,11.0 + ,1.5 + ,12.5 + ,7.0 + ,112.0 + ,5 + ,4 + ,4 + ,465000 + ,423000 + ,3.2 + ,.7 + ,3.9 + ,30.0 + ,281.0 + ,5 + ,5 + ,5 + ,.550 + ,2400 + ,7.6 + ,2.7 + ,10.3 + ,-999.0 + ,-999.0 + ,2 + ,1 + ,2 + ,187100 + ,419000 + ,-999.0 + ,-999.0 + ,3.1 + ,40.0 + ,365.0 + ,5 + ,5 + ,5 + ,.075 + ,1200 + ,6.3 + ,2.1 + ,8.4 + ,3.5 + ,42.0 + ,1 + ,1 + ,1 + ,3000 + ,25000 + ,8.6 + ,.0 + ,8.6 + ,50.0 + ,28.0 + ,2 + ,2 + ,2 + ,.785 + ,3500 + ,6.6 + ,4.1 + ,10.7 + ,6.0 + ,42.0 + ,2 + ,2 + ,2 + ,.200 + ,5000 + ,9.5 + ,1.2 + ,10.7 + ,10.4 + ,120.0 + ,2 + ,2 + ,2 + ,1410 + ,17500 + ,4.8 + ,1.3 + ,6.1 + ,34.0 + ,-999.0 + ,1 + ,2 + ,1 + ,60000 + ,81000 + ,12.0 + ,6.1 + ,18.1 + ,7.0 + ,-999.0 + ,1 + ,1 + ,1 + ,529000 + ,680000 + ,-999.0 + ,.3 + ,-999.0 + ,28.0 + ,400.0 + ,5 + ,5 + ,5 + ,27660 + ,115000 + ,3.3 + ,.5 + ,3.8 + ,20.0 + ,148.0 + ,5 + ,5 + ,5 + ,.120 + ,1000 + ,11.0 + ,3.4 + ,14.4 + ,3.9 + ,16.0 + ,3 + ,1 + ,2 + ,207000 + ,406000 + ,-999.0 + ,-999.0 + ,12.0 + ,39.3 + ,252.0 + ,1 + ,4 + ,1 + ,85000 + ,325000 + ,4.7 + ,1.5 + ,6.2 + ,41.0 + ,310.0 + ,1 + ,3 + ,1 + ,36330 + ,119500 + ,-999.0 + ,-999.0 + ,13.0 + ,16.2 + ,63.0 + ,1 + ,1 + ,1 + ,.101 + ,4000 + ,10.4 + ,3.4 + ,13.8 + ,9.0 + ,28.0 + ,5 + ,1 + ,3 + ,1040 + ,5500 + ,7.4 + ,.8 + ,8.2 + ,7.6 + ,68.0 + ,5 + ,3 + ,4 + ,521000 + ,655000 + ,2.1 + ,.8 + ,2.9 + ,46.0 + ,336.0 + ,5 + ,5 + ,5 + ,100000 + ,157000 + ,-999.0 + ,-999.0 + ,10.8 + ,22.4 + ,100.0 + ,1 + ,1 + ,1 + ,35000 + ,56000 + ,-999.0 + ,-999.0 + ,-999.0 + ,16.3 + ,33.0 + ,3 + ,5 + ,4 + ,.005 + ,.140 + ,7.7 + ,1.4 + ,9.1 + ,2.6 + ,21.5 + ,5 + ,2 + ,4 + ,.010 + ,.250 + ,17.9 + ,2.0 + ,19.9 + ,24.0 + ,50.0 + ,1 + ,1 + ,1 + ,62000 + ,1320000 + ,6.1 + ,1.9 + ,8.0 + ,100.0 + ,267.0 + ,1 + ,1 + ,1 + ,.122 + ,3000 + ,8.2 + ,2.4 + ,10.6 + ,-999.0 + ,30.0 + ,2 + ,1 + ,1 + ,1350 + ,8100 + ,8.4 + ,2.8 + ,11.2 + ,-999.0 + ,45.0 + ,3 + ,1 + ,3 + ,.023 + ,.400 + ,11.9 + ,1.3 + ,13.2 + ,3.2 + ,19.0 + ,4 + ,1 + ,3 + ,.048 + ,.330 + ,10.8 + ,2.0 + ,12.8 + ,2.0 + ,30.0 + ,4 + ,1 + ,3 + ,1700 + ,6300 + ,13.8 + ,5.6 + ,19.4 + ,5.0 + ,12.0 + ,2 + ,1 + ,1 + ,3500 + ,10800 + ,14.3 + ,3.1 + ,17.4 + ,6.5 + ,120.0 + ,2 + ,1 + ,1 + ,250000 + ,490000 + ,-999.0 + ,1.0 + ,-999.0 + ,23.6 + ,440.0 + ,5 + ,5 + ,5 + ,.480 + ,15500 + ,15.2 + ,1.8 + ,17.0 + ,12.0 + ,140.0 + ,2 + ,2 + ,2 + ,10000 + ,115000 + ,10.0 + ,.9 + ,10.9 + ,20.2 + ,170.0 + ,4 + ,4 + ,4 + ,1620 + ,11400 + ,11.9 + ,1.8 + ,13.7 + ,13.0 + ,17.0 + ,2 + ,1 + ,2 + ,192000 + ,180000 + ,6.5 + ,1.9 + ,8.4 + ,27.0 + ,115.0 + ,4 + ,4 + ,4 + ,2500 + ,12100 + ,7.5 + ,.9 + ,8.4 + ,18.0 + ,31.0 + ,5 + ,5 + ,5 + ,4288 + ,39200 + ,-999.0 + ,-999.0 + ,12.5 + ,13.7 + ,63.0 + ,2 + ,2 + ,2 + ,.280 + ,1900 + ,10.6 + ,2.6 + ,13.2 + ,4.7 + ,21.0 + ,3 + ,1 + ,3 + ,4235 + ,50400 + ,7.4 + ,2.4 + ,9.8 + ,9.8 + ,52.0 + ,1 + ,1 + ,1 + ,6800 + ,179000 + ,8.4 + ,1.2 + ,9.6 + ,29.0 + ,164.0 + ,2 + ,3 + ,2 + ,.750 + ,12300 + ,5.7 + ,.9 + ,6.6 + ,7.0 + ,225.0 + ,2 + ,2 + ,2 + ,3600 + ,21000 + ,4.9 + ,.5 + ,5.4 + ,6.0 + ,225.0 + ,3 + ,2 + ,3 + ,14830 + ,98200 + ,-999.0 + ,-999.0 + ,2.6 + ,17.0 + ,150.0 + ,5 + ,5 + ,5 + ,55500 + ,175000 + ,3.2 + ,.6 + ,3.8 + ,20.0 + ,151.0 + ,5 + ,5 + ,5 + ,1400 + ,12500 + ,-999.0 + ,-999.0 + ,11.0 + ,12.7 + ,90.0 + ,2 + ,2 + ,2 + ,.060 + ,1000 + ,8.1 + ,2.2 + ,10.3 + ,3.5 + ,-999.0 + ,3 + ,1 + ,2 + ,.900 + ,2600 + ,11.0 + ,2.3 + ,13.3 + ,4.5 + ,60.0 + ,2 + ,1 + ,2 + ,2000 + ,12300 + ,4.9 + ,.5 + ,5.4 + ,7.5 + ,200.0 + ,3 + ,1 + ,3 + ,.104 + ,2500 + ,13.2 + ,2.6 + ,15.8 + ,2.3 + ,46.0 + ,3 + ,2 + ,2 + ,4190 + ,58000 + ,9.7 + ,.6 + ,10.3 + ,24.0 + ,210.0 + ,4 + ,3 + ,4 + ,3500 + ,3900 + ,12.8 + ,6.6 + ,19.4 + ,3.0 + ,14.0 + ,2 + ,1 + ,1 + ,4050 + ,17000 + ,-999.0 + ,-999.0 + ,-999.0 + ,13.0 + ,38.0 + ,3 + ,1 + ,1) + ,dim=c(10 + ,62) + ,dimnames=list(c('bowgth' + ,'brwght' + ,'SWS' + ,'PS' + ,'TS' + ,'LIFESPAN' + ,'DRAAGTIJD' + ,'PRED' + ,'Exposure' + ,'Overalldanger ') + ,1:62)) > y <- array(NA,dim=c(10,62),dimnames=list(c('bowgth','brwght','SWS','PS','TS','LIFESPAN','DRAAGTIJD','PRED','Exposure','Overalldanger '),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 = 'kendall' > 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/1qgi41292350911.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] 10 > 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/24qyd1292350911.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) Kendall's rank correlation tau data: y[1, ] and y[2, ] z = 9.5615, p-value < 2.2e-16 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.8334657 > 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 45 warnings (use warnings() to see them) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3p9ej1292350911.tab") > > try(system("convert tmp/1qgi41292350911.ps tmp/1qgi41292350911.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.450 0.470 3.079