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(128.6 + ,150.85 + ,131.6 + ,126.51 + ,128.9 + ,147.79 + ,132.05 + ,131.02 + ,129.06 + ,141.96 + ,132.4 + ,136.51 + ,129.23 + ,148.39 + ,132.57 + ,138.04 + ,129.27 + ,147.71 + ,133.02 + ,132.92 + ,129.33 + ,150.6 + ,133.47 + ,129.61 + ,129.35 + ,151.18 + ,133.66 + ,122.96 + ,129.31 + ,152.24 + ,133.96 + ,124.04 + ,129.4 + ,157.19 + ,134.19 + ,121.29 + ,129.49 + ,154.62 + ,134.93 + ,124.56 + ,129.47 + ,157.22 + ,134.9 + ,118.53 + ,129.46 + ,159.7 + ,135.05 + ,113.14 + ,129.45 + ,160.55 + ,135.16 + ,114.15 + ,129.28 + ,149.66 + ,135.23 + ,122.17 + ,129.2 + ,151.69 + ,135.15 + ,129.23 + ,129.25 + ,154.13 + ,135.12 + ,131.19 + ,129.14 + ,151.48 + ,137.29 + ,129.12 + ,129.11 + ,153.34 + ,137.41 + ,128.28 + ,129.02 + ,155.8 + ,137.44 + ,126.83 + ,129.08 + ,158.87 + ,137.62 + ,138.13 + ,128.99 + ,156.09 + ,137.78 + ,140.52 + ,129.11 + ,156.3 + ,137.98 + ,146.83 + ,129.08 + ,156.4 + ,138.06 + ,135.14 + ,129.19 + ,154.09 + ,138.16 + ,131.84 + ,129.23 + ,161.32 + ,138.28 + ,125.7 + ,129.25 + ,160.12 + ,138.33 + ,128.98 + ,129.31 + ,155.17 + ,138.43 + ,133.25 + ,129.33 + ,154.51 + ,138.44 + ,136.76 + ,129.39 + ,151.38 + ,138.41 + ,133.24 + ,129.55 + ,152.59 + ,138.55 + ,128.54 + ,129.43 + ,153.98 + ,138.64 + ,121.08 + ,129.45 + ,154.91 + ,138.72 + ,120.23 + ,129.57 + ,153.01 + ,138.9 + ,119.08 + ,129.76 + ,155.09 + ,139.02 + ,125.75 + ,129.92 + ,155.53 + ,139.04 + ,126.89 + ,130.08 + ,161.86 + ,139.15 + ,126.6 + ,130.41 + ,166.03 + ,139.3 + ,121.89 + ,130.84 + ,164.54 + ,140.73 + ,123.44 + ,131.24 + ,164.33 + ,141.84 + ,126.46 + ,131.49 + ,163.21 + ,141.95 + ,129.49 + ,131.74 + ,159.95 + ,142.1 + ,127.78 + ,132.34 + ,164.18 + ,142.36 + ,125.29 + ,133.5 + ,167.13 + ,142.58 + ,119.02 + ,134.43 + ,166.8 + ,142.75 + ,119.96 + ,136.5 + ,166.29 + ,142.85 + ,122.86 + ,137.41 + ,168.07 + ,143.03 + ,131.89 + ,138.02 + ,167.1 + ,143.19 + ,132.73 + ,138.15 + ,163.53 + ,143.62 + ,135.01 + ,138.24 + ,168.28 + ,143.89 + ,136.71 + ,138.2 + ,169.07 + ,144.69 + ,142.73 + ,138.31 + ,165.84 + ,147.51 + ,144.43 + ,138.65 + ,163.88 + ,147.78 + ,144.93 + ,139.3 + ,157.33 + ,148.04 + ,138.75 + ,139.8 + ,161 + ,148.21 + ,130.22 + ,140.52 + ,163.54 + ,148.29 + ,122.19 + ,141.57 + ,161.21 + ,148.34 + ,128.4 + ,141.77 + ,158.92 + ,148.33 + ,140.43 + ,141.66 + ,160.18 + ,148.38 + ,153.5 + ,141.36 + ,159.9 + ,148.37 + ,149.33 + ,141.17 + ,164.46 + ,148.37 + ,142.97) + ,dim=c(4 + ,60) + ,dimnames=list(c('Vlees' + ,'Vis' + ,'Brood' + ,'groentenfruit ') + ,1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Vlees','Vis','Brood','groentenfruit '),1:60)) > 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/18f8n1260715858.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 = 5.4156, p-value = 6.107e-08 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.4806123 > 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/2tt3r1260715858.tab") > > try(system("convert tmp/18f8n1260715858.ps tmp/18f8n1260715858.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.498 0.206 0.555