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(104.37 + ,1 + ,1 + ,167.16 + ,101.56 + ,100.93 + ,104.89 + ,2 + ,2 + ,179.84 + ,102.13 + ,101.18 + ,105.15 + ,3 + ,3 + ,174.44 + ,102.39 + ,101.11 + ,105.72 + ,4 + ,4 + ,180.35 + ,102.42 + ,102.42 + ,106.38 + ,5 + ,5 + ,193.17 + ,103.87 + ,102.37 + ,106.40 + ,6 + ,6 + ,195.16 + ,104.44 + ,101.95 + ,106.47 + ,7 + ,7 + ,202.43 + ,104.97 + ,102.20 + ,106.59 + ,8 + ,8 + ,189.91 + ,105.17 + ,103.35 + ,106.76 + ,9 + ,9 + ,195.98 + ,105.35 + ,103.65 + ,107.35 + ,10 + ,10 + ,212.09 + ,104.65 + ,102.06 + ,107.81 + ,11 + ,11 + ,205.81 + ,106.62 + ,102.66 + ,108.03 + ,12 + ,12 + ,204.31 + ,107.05 + ,102.32 + ,109.08 + ,1 + ,13 + ,196.07 + ,112.30 + ,102.21 + ,109.86 + ,2 + ,14 + ,199.98 + ,114.70 + ,102.33 + ,110.29 + ,3 + ,15 + ,199.1 + ,115.40 + ,104.41 + ,110.34 + ,4 + ,16 + ,198.31 + ,115.64 + ,104.33 + ,110.59 + ,5 + ,17 + ,195.72 + ,115.66 + ,105.27 + ,110.64 + ,6 + ,18 + ,223.04 + ,114.50 + ,105.34 + ,110.83 + ,7 + ,19 + ,238.41 + ,115.14 + ,104.88 + ,111.51 + ,8 + ,20 + ,259.73 + ,115.41 + ,105.49 + ,113.32 + ,9 + ,21 + ,326.54 + ,119.32 + ,105.90 + ,115.89 + ,10 + ,22 + ,335.15 + ,124.77 + ,105.39 + ,116.51 + ,11 + ,23 + ,321.81 + ,130.96 + ,104.40 + ,117.44 + ,12 + ,24 + ,368.62 + ,141.02 + ,106.19 + ,118.25 + ,1 + ,25 + ,369.59 + ,150.60 + ,106.54 + ,118.65 + ,2 + ,26 + ,425 + ,151.10 + ,108.26 + ,118.52 + ,3 + ,27 + ,439.72 + ,157.19 + ,106.95 + ,119.07 + ,4 + ,28 + ,362.23 + ,157.28 + ,108.32 + ,119.12 + ,5 + ,29 + ,328.76 + ,156.54 + ,108.35 + ,119.28 + ,6 + ,30 + ,348.55 + ,159.62 + ,109.29 + ,119.30 + ,7 + ,31 + ,328.18 + ,163.77 + ,109.46 + ,119.44 + ,8 + ,32 + ,329.34 + ,165.08 + ,109.50 + ,119.57 + ,9 + ,33 + ,295.55 + ,164.75 + ,109.84 + ,119.93 + ,10 + ,34 + ,237.38 + ,163.93 + ,108.73 + ,120.03 + ,11 + ,35 + ,226.85 + ,157.51 + ,109.38 + ,119.66 + ,12 + ,36 + ,220.14 + ,153.36 + ,109.97 + ,119.46 + ,1 + ,37 + ,239.36 + ,156.83 + ,111.10 + ,119.48 + ,2 + ,38 + ,224.69 + ,154.98 + ,110.53 + ,119.56 + ,3 + ,39 + ,230.98 + ,155.02 + ,110.23 + ,119.43 + ,4 + ,40 + ,233.47 + ,153.34 + ,109.41 + ,119.57 + ,5 + ,41 + ,256.7 + ,153.19 + ,108.94 + ,119.59 + ,6 + ,42 + ,253.41 + ,152.80 + ,109.81 + ,119.50 + ,7 + ,43 + ,224.95 + ,152.97 + ,109.20 + ,119.54 + ,8 + ,44 + ,210.37 + ,152.96 + ,109.45 + ,119.56 + ,9 + ,45 + ,191.09 + ,152.35 + ,110.61 + ,119.61 + ,10 + ,46 + ,198.85 + ,151.88 + ,109.44 + ,119.64 + ,11 + ,47 + ,211.04 + ,150.27 + ,109.77 + ,119.60 + ,12 + ,48 + ,206.25 + ,148.80 + ,108.04 + ,119.71 + ,1 + ,49 + ,201.19 + ,149.28 + ,109.65 + ,119.72 + ,2 + ,50 + ,194.37 + ,148.64 + ,111.69 + ,119.66 + ,3 + ,51 + ,191.08 + ,150.36 + ,111.65 + ,119.76 + ,4 + ,52 + ,192.87 + ,149.69 + ,112.04 + ,119.80 + ,5 + ,53 + ,181.61 + ,152.94 + ,111.42 + ,119.88 + ,6 + ,54 + ,157.67 + ,155.18 + ,112.25 + ,119.78 + ,7 + ,55 + ,196.14 + ,156.32 + ,111.46 + ,120.08 + ,8 + ,56 + ,246.35 + ,156.25 + ,111.62 + ,120.22 + ,9 + ,57 + ,271.9 + ,155.52 + ,111.77) + ,dim=c(6 + ,57) + ,dimnames=list(c('Brood' + ,'Maand' + ,'Trend' + ,'Tarwe' + ,'Meel' + ,'Water') + ,1:57)) > y <- array(NA,dim=c(6,57),dimnames=list(c('Brood','Maand','Trend','Tarwe','Meel','Water'),1:57)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = '' > par2 = '' > par1 = 'kendall' > ylab = '' > xlab = '' > main = '' > #'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/14dio1292695321.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() 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] 6 > 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/2pwhu1292695321.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 = 1.7214, p-value = 0.08518 alternative hypothesis: true tau is not equal to 0 sample estimates: tau 0.1617298 > 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) + } + } Warning messages: 1: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 2: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 3: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 4: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 5: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 6: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 7: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 8: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties 9: In cor.test.default(y[i, ], y[j, ], method = "spearman") : Cannot compute exact p-values with ties > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/34oxl1292695321.tab") > > try(system("convert tmp/14dio1292695321.ps tmp/14dio1292695321.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.734 0.302 2.002