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(96.8 + ,9.3 + ,142.7 + ,610.763 + ,114.1 + ,9.3 + ,141.7 + ,612.613 + ,110.3 + ,8.7 + ,153.4 + ,611.324 + ,103.9 + ,8.2 + ,145 + ,594.167 + ,101.6 + ,8.3 + ,137.7 + ,595.454 + ,94.6 + ,8.5 + ,148.3 + ,590.865 + ,95.9 + ,8.6 + ,152.2 + ,589.379 + ,104.7 + ,8.5 + ,169.4 + ,584.428 + ,102.8 + ,8.2 + ,168.6 + ,573.1 + ,98.1 + ,8.1 + ,161.1 + ,567.456 + ,113.9 + ,7.9 + ,174.1 + ,569.028 + ,80.9 + ,8.6 + ,179 + ,620.735 + ,95.7 + ,8.7 + ,190.6 + ,628.884 + ,113.2 + ,8.7 + ,190 + ,628.232 + ,105.9 + ,8.5 + ,181.6 + ,612.117 + ,108.8 + ,8.4 + ,174.8 + ,595.404 + ,102.3 + ,8.5 + ,180.5 + ,597.141 + ,99.0 + ,8.7 + ,196.8 + ,593.408 + ,100.7 + ,8.7 + ,193.8 + ,590.072 + ,115.5 + ,8.6 + ,197 + ,579.799 + ,100.7 + ,8.5 + ,216.3 + ,574.205 + ,109.9 + ,8.3 + ,221.4 + ,572.775 + ,114.6 + ,8.0 + ,217.9 + ,572.942 + ,85.4 + ,8.2 + ,229.7 + ,619.567 + ,100.5 + ,8.1 + ,227.4 + ,625.809 + ,114.8 + ,8.1 + ,204.2 + ,619.916 + ,116.5 + ,8.0 + ,196.6 + ,587.625 + ,112.9 + ,7.9 + ,198.8 + ,565.742 + ,102.0 + ,7.9 + ,207.5 + ,557.274 + ,106.0 + ,8.0 + ,190.7 + ,560.576 + ,105.3 + ,8.0 + ,201.6 + ,548.854 + ,118.8 + ,7.9 + ,210.5 + ,531.673 + ,106.1 + ,8.0 + ,223.5 + ,525.919 + ,109.3 + ,7.7 + ,223.8 + ,511.038 + ,117.2 + ,7.2 + ,231.2 + ,498.662 + ,92.5 + ,7.5 + ,244 + ,555.362 + ,104.2 + ,7.3 + ,234.7 + ,564.591 + ,112.5 + ,7.0 + ,250.2 + ,541.657 + ,122.4 + ,7.0 + ,265.7 + ,527.07 + ,113.3 + ,7.0 + ,287.6 + ,509.846 + ,100.0 + ,7.2 + ,283.3 + ,514.258 + ,110.7 + ,7.3 + ,295.4 + ,516.922 + ,112.8 + ,7.1 + ,312.3 + ,507.561 + ,109.8 + ,6.8 + ,333.8 + ,492.622 + ,117.3 + ,6.4 + ,347.7 + ,490.243 + ,109.1 + ,6.1 + ,383.2 + ,469.357 + ,115.9 + ,6.5 + ,407.1 + ,477.58 + ,96.0 + ,7.7 + ,413.6 + ,528.379 + ,99.8 + ,7.9 + ,362.7 + ,533.59 + ,116.8 + ,7.5 + ,321.9 + ,517.945 + ,115.7 + ,6.9 + ,239.4 + ,506.174 + ,99.4 + ,6.6 + ,191 + ,501.866 + ,94.3 + ,6.9 + ,159.7 + ,516.141 + ,91.0 + ,7.7 + ,163.4 + ,528.222 + ,93.2 + ,8.0 + ,157.6 + ,532.638 + ,103.1 + ,8.0 + ,166.2 + ,536.322 + ,94.1 + ,7.7 + ,176.7 + ,536.535 + ,91.8 + ,7.3 + ,198.3 + ,523.597 + ,102.7 + ,7.4 + ,226.2 + ,536.214 + ,82.6 + ,8.1 + ,216.2 + ,586.57 + ,89.1 + ,8.3 + ,235.9 + ,596.594) + ,dim=c(4 + ,61) + ,dimnames=list(c('1' + ,'2' + ,'3' + ,'4 ') + ,1:61)) > y <- array(NA,dim=c(4,61),dimnames=list(c('1','2','3','4 '),1:61)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > main = 'Kendall tau Correlation Plot' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), 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: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > 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='kendall') + 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/1zh2v1258116241.ps",horizontal=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") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Kendall tau rank correlations for all pairs of data series',3,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'pair',1,TRUE) > a<-table.element(a,'tau',1,TRUE) > a<-table.element(a,'p-value',1,TRUE) > a<-table.row.end(a) > n <- length(y[,1]) > n [1] 4 > cor.test(y[1,],y[2,],method='kendall') Kendall's rank correlation tau data: y[1, ] and y[2, ] z = -2.0777, p-value = 0.03774 alternative hypothesis: true tau is not equal to 0 sample estimates: tau -0.1862373 > for (i in 1:(n-1)) + { + for (j in (i+1):n) + { + a<-table.row.start(a) + dum <- paste('tau(',dimnames(t(x))[[2]][i]) + dum <- paste(dum,',') + dum <- paste(dum,dimnames(t(x))[[2]][j]) + dum <- paste(dum,')') + a<-table.element(a,dum,header=TRUE) + r <- cor.test(y[i,],y[j,],method='kendall') + a<-table.element(a,r$estimate) + a<-table.element(a,r$p.value) + a<-table.row.end(a) + } + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/2v00y1258116241.tab") > > system("convert tmp/1zh2v1258116241.ps tmp/1zh2v1258116241.png") > > > proc.time() user system elapsed 0.497 0.210 0.565