R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) 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(3 + ,315.71 + ,4 + ,317.45 + ,5 + ,317.5 + ,6 + ,317.12 + ,7 + ,315.86 + ,8 + ,314.93 + ,9 + ,313.2 + ,10 + ,312.6 + ,11 + ,313.33 + ,12 + ,314.67 + ,1 + ,315.62 + ,2 + ,316.38 + ,3 + ,316.71 + ,4 + ,317.72 + ,5 + ,318.29 + ,6 + ,318.16 + ,7 + ,316.55 + ,8 + ,314.8 + ,9 + ,313.84 + ,10 + ,313.26 + ,11 + ,314.8 + ,12 + ,315.59 + ,1 + ,316.43 + ,2 + ,316.97 + ,3 + ,317.58 + ,4 + ,319.02 + ,5 + ,320.02 + ,6 + ,319.59 + ,7 + ,318.18 + ,8 + ,315.91 + ,9 + ,314.16 + ,10 + ,313.83 + ,11 + ,315 + ,12 + ,316.19 + ,1 + ,316.93 + ,2 + ,317.7 + ,3 + ,318.54 + ,4 + ,319.48 + ,5 + ,320.58 + ,6 + ,319.77 + ,7 + ,318.58 + ,8 + ,316.79 + ,9 + ,314.8 + ,10 + ,315.38 + ,11 + ,316.1 + ,12 + ,317.01 + ,1 + ,317.94 + ,2 + ,318.55 + ,3 + ,319.68 + ,4 + ,320.63 + ,5 + ,321.01 + ,6 + ,320.55 + ,7 + ,319.58 + ,8 + ,317.4 + ,9 + ,316.26 + ,10 + ,315.42 + ,11 + ,316.69 + ,12 + ,317.7 + ,1 + ,318.74 + ,2 + ,319.08 + ,3 + ,319.86 + ,4 + ,321.39 + ,5 + ,322.24 + ,6 + ,321.47 + ,7 + ,319.74 + ,8 + ,317.77 + ,9 + ,316.21 + ,10 + ,315.99 + ,11 + ,317.12 + ,12 + ,318.31 + ,1 + ,319.57 + ,2 + ,320.08 + ,3 + ,320.75 + ,4 + ,321.8 + ,5 + ,322.24 + ,6 + ,321.89 + ,7 + ,320.44 + ,8 + ,318.7 + ,9 + ,316.7 + ,10 + ,316.79 + ,11 + ,317.79 + ,12 + ,318.71 + ,1 + ,319.44 + ,2 + ,320.44 + ,3 + ,320.89 + ,4 + ,322.13 + ,5 + ,322.16 + ,6 + ,321.87 + ,7 + ,321.39 + ,8 + ,318.8 + ,9 + ,317.81 + ,10 + ,317.3 + ,11 + ,318.87 + ,12 + ,319.42 + ,1 + ,320.62 + ,2 + ,321.59 + ,3 + ,322.39 + ,4 + ,323.87 + ,5 + ,324.01 + ,6 + ,323.75 + ,7 + ,322.4 + ,8 + ,320.37 + ,9 + ,318.64 + ,10 + ,318.1 + ,11 + ,319.78 + ,12 + ,321.08 + ,1 + ,322.06 + ,2 + ,322.5 + ,3 + ,323.04 + ,4 + ,324.42 + ,5 + ,325 + ,6 + ,324.09 + ,7 + ,322.55 + ,8 + ,320.92 + ,9 + ,319.31 + ,10 + ,319.31 + ,11 + ,320.72 + ,12 + ,321.96 + ,1 + ,322.57 + ,2 + ,323.15 + ,3 + ,323.89 + ,4 + ,325.02 + ,5 + ,325.57 + ,6 + ,325.36 + ,7 + ,324.14 + ,8 + ,322.03 + ,9 + ,320.41 + ,10 + ,320.25 + ,11 + ,321.31 + ,12 + ,322.84 + ,1 + ,324 + ,2 + ,324.42 + ,3 + ,325.64 + ,4 + ,326.66 + ,5 + ,327.34 + ,6 + ,326.76 + ,7 + ,325.88 + ,8 + ,323.67 + ,9 + ,322.38 + ,10 + ,321.78 + ,11 + ,322.85 + ,12 + ,324.12 + ,1 + ,325.03 + ,2 + ,325.99 + ,3 + ,326.87 + ,4 + ,328.14 + ,5 + ,328.07 + ,6 + ,327.66 + ,7 + ,326.35 + ,8 + ,324.69 + ,9 + ,323.1 + ,10 + ,323.16 + ,11 + ,323.98 + ,12 + ,325.13 + ,1 + ,326.17 + ,2 + ,326.68 + ,3 + ,327.18 + ,4 + ,327.78 + ,5 + ,328.92 + ,6 + ,328.57 + ,7 + ,327.34 + ,8 + ,325.46 + ,9 + ,323.36 + ,10 + ,323.56 + ,11 + ,324.8 + ,12 + ,326.01 + ,1 + ,326.77 + ,2 + ,327.63 + ,3 + ,327.75 + ,4 + ,329.72 + ,5 + ,330.07 + ,6 + ,329.09 + ,7 + ,328.05 + ,8 + ,326.32 + ,9 + ,324.93 + ,10 + ,325.06 + ,11 + ,326.5 + ,12 + ,327.55 + ,1 + ,328.55 + ,2 + ,329.56 + ,3 + ,330.3 + ,4 + ,331.5 + ,5 + ,332.48 + ,6 + ,332.07 + ,7 + ,330.87 + ,8 + ,329.31 + ,9 + ,327.51 + ,10 + ,327.18 + ,11 + ,328.16 + ,12 + ,328.64 + ,1 + ,329.35 + ,2 + ,330.71 + ,3 + ,331.48 + ,4 + ,332.65 + ,5 + ,333.15 + ,6 + ,332.13 + ,7 + ,330.99 + ,8 + ,329.17 + ,9 + ,327.41 + ,10 + ,327.21 + ,11 + ,328.34 + ,12 + ,329.5 + ,1 + ,330.68 + ,2 + ,331.41 + ,3 + ,331.85 + ,4 + ,333.29 + ,5 + ,333.91 + ,6 + ,333.4 + ,7 + ,331.74 + ,8 + ,329.88 + ,9 + ,328.57 + ,10 + ,328.35 + ,11 + ,329.33 + ,12 + ,330.58 + ,1 + ,331.66 + ,2 + ,332.75 + ,3 + ,333.46 + ,4 + ,334.78 + ,5 + ,334.79 + ,6 + ,334.05 + ,7 + ,332.95 + ,8 + ,330.64 + ,9 + ,328.96 + ,10 + ,328.77 + ,11 + ,330.18 + ,12 + ,331.65 + ,1 + ,332.69 + ,2 + ,333.23 + ,3 + ,334.97 + ,4 + ,336.03 + ,5 + ,336.82 + ,6 + ,336.1 + ,7 + ,334.79 + ,8 + ,332.53 + ,9 + ,331.19 + ,10 + ,331.21 + ,11 + ,332.35 + ,12 + ,333.47 + ,1 + ,335.09 + ,2 + ,335.26 + ,3 + ,336.62 + ,4 + ,337.77 + ,5 + ,338 + ,6 + ,337.98 + ,7 + ,336.48 + ,8 + ,334.37 + ,9 + ,332.33 + ,10 + ,332.4 + ,11 + ,333.76 + ,12 + ,334.83 + ,1 + ,336.21 + ,2 + ,336.64 + ,3 + ,338.13 + ,4 + ,338.96 + ,5 + ,339.02 + ,6 + ,339.2 + ,7 + ,337.6 + ,8 + ,335.56 + ,9 + ,333.93 + ,10 + ,334.12 + ,11 + ,335.26 + ,12 + ,336.77 + ,1 + ,337.8 + ,2 + ,338.28 + ,3 + ,340.04 + ,4 + ,340.86 + ,5 + ,341.47 + ,6 + ,341.26 + ,7 + ,339.34 + ,8 + ,337.45 + ,9 + ,336.1 + ,10 + ,336.05 + ,11 + ,337.21 + ,12 + ,338.29 + ,1 + ,339.36 + ,2 + ,340.51 + ,3 + ,341.57 + ,4 + ,342.56 + ,5 + ,343.01 + ,6 + ,342.52 + ,7 + ,340.71 + ,8 + ,338.51 + ,9 + ,336.96 + ,10 + ,337.13 + ,11 + ,338.58 + ,12 + ,339.91 + ,1 + ,340.92 + ,2 + ,341.69 + ,3 + ,342.87 + ,4 + ,343.83 + ,5 + ,344.3 + ,6 + ,343.42 + ,7 + ,341.85 + ,8 + ,339.82 + ,9 + ,337.98 + ,10 + ,338.09 + ,11 + ,339.24 + ,12 + ,340.67 + ,1 + ,341.42 + ,2 + ,342.67 + ,3 + ,343.45 + ,4 + ,345.08 + ,5 + ,345.76 + ,6 + ,345.32 + ,7 + ,343.93 + ,8 + ,342.08 + ,9 + ,340 + ,10 + ,340.12 + ,11 + ,341.35 + ,12 + ,342.89 + ,1 + ,343.87 + ,2 + ,344.59 + ,3 + ,345.29 + ,4 + ,346.59 + ,5 + ,347.36 + ,6 + ,346.8 + ,7 + ,345.37 + ,8 + ,343.06 + ,9 + ,341.24 + ,10 + ,341.54 + ,11 + ,342.9 + ,12 + ,344.36 + ,1 + ,345.08 + ,2 + ,345.89 + ,3 + ,347.49 + ,4 + ,348.02 + ,5 + ,348.75 + ,6 + ,348.19 + ,7 + ,346.49 + ,8 + ,344.7 + ,9 + ,343.04 + ,10 + ,342.92 + ,11 + ,344.22 + ,12 + ,345.61 + ,1 + ,346.42 + ,2 + ,346.95 + ,3 + ,347.88 + ,4 + ,349.57 + ,5 + ,350.35 + ,6 + ,349.7 + ,7 + ,347.78 + ,8 + ,345.89 + ,9 + ,344.88 + ,10 + ,344.34 + ,11 + ,345.67 + ,12 + ,346.89 + ,1 + ,348.2 + ,2 + ,348.55 + ,3 + ,349.56 + ,4 + ,351.12 + ,5 + ,351.84 + ,6 + ,351.45 + ,7 + ,349.77 + ,8 + ,347.62 + ,9 + ,346.37 + ,10 + ,346.48 + ,11 + ,347.8 + ,12 + ,349.03 + ,1 + ,350.23 + ,2 + ,351.58 + ,3 + ,352.22 + ,4 + ,353.53 + ,5 + ,354.14 + ,6 + ,353.64 + ,7 + ,352.53 + ,8 + ,350.42 + ,9 + ,348.84 + ,10 + ,348.94 + ,11 + ,349.99 + ,12 + ,351.29 + ,1 + ,352.72 + ,2 + ,353.1 + ,3 + ,353.64 + ,4 + ,355.43 + ,5 + ,355.7 + ,6 + ,355.11 + ,7 + ,353.79 + ,8 + ,351.42 + ,9 + ,349.83 + ,10 + ,350.1 + ,11 + ,351.26 + ,12 + ,352.66 + ,1 + ,353.63 + ,2 + ,354.72 + ,3 + ,355.49 + ,4 + ,356.1 + ,5 + ,357.08 + ,6 + ,356.11 + ,7 + ,354.67 + ,8 + ,352.67 + ,9 + ,351.05 + ,10 + ,351.36 + ,11 + ,352.81 + ,12 + ,354.21 + ,1 + ,354.87 + ,2 + ,355.67 + ,3 + ,357 + ,4 + ,358.4 + ,5 + ,359 + ,6 + ,357.99 + ,7 + ,355.96 + ,8 + ,353.78 + ,9 + ,352.2 + ,10 + ,352.22 + ,11 + ,353.7 + ,12 + ,354.98 + ,1 + ,356.08 + ,2 + ,356.84 + ,3 + ,357.73 + ,4 + ,358.91 + ,5 + ,359.45 + ,6 + ,359.19 + ,7 + ,356.72 + ,8 + ,354.77 + ,9 + ,352.8 + ,10 + ,353.21 + ,11 + ,354.15 + ,12 + ,355.39 + ,1 + ,356.76 + ,2 + ,357.17 + ,3 + ,358.26 + ,4 + ,359.17 + ,5 + ,360.07 + ,6 + ,359.41 + ,7 + ,357.36 + ,8 + ,355.29 + ,9 + ,353.96 + ,10 + ,354.03 + ,11 + ,355.27 + ,12 + ,356.7 + ,1 + ,358.05 + ,2 + ,358.8 + ,3 + ,359.67 + ,4 + ,361.13 + ,5 + ,361.48 + ,6 + ,360.6 + ,7 + ,359.2 + ,8 + ,357.23 + ,9 + ,355.42 + ,10 + ,355.89 + ,11 + ,357.41 + ,12 + ,358.74 + ,1 + ,359.73 + ,2 + ,360.61 + ,3 + ,361.6 + ,4 + ,363.05 + ,5 + ,363.62 + ,6 + ,363.03 + ,7 + ,361.55 + ,8 + ,358.94 + ,9 + ,357.93 + ,10 + ,357.8 + ,11 + ,359.22 + ,12 + ,360.42 + ,1 + ,361.83 + ,2 + ,362.94 + ,3 + ,363.91 + ,4 + ,364.28 + ,5 + ,364.93 + ,6 + ,364.7 + ,7 + ,363.31 + ,8 + ,361.15 + ,9 + ,359.41 + ,10 + ,359.34 + ,11 + ,360.62 + ,12 + ,361.96 + ,1 + ,362.81 + ,2 + ,363.87 + ,3 + ,364.25 + ,4 + ,366.02 + ,5 + ,366.47 + ,6 + ,365.37 + ,7 + ,364.1 + ,8 + ,361.89 + ,9 + ,360.05 + ,10 + ,360.49 + ,11 + ,362.21 + ,12 + ,364.12 + ,1 + ,365 + ,2 + ,365.82 + ,3 + ,366.95 + ,4 + ,368.42 + ,5 + ,369.33 + ,6 + ,368.78 + ,7 + ,367.59 + ,8 + ,365.81 + ,9 + ,363.83 + ,10 + ,364.18 + ,11 + ,365.36 + ,12 + ,366.88 + ,1 + ,367.97 + ,2 + ,368.83 + ,3 + ,369.46 + ,4 + ,370.77 + ,5 + ,370.66 + ,6 + ,370.1 + ,7 + ,369.1 + ,8 + ,366.7 + ,9 + ,364.61 + ,10 + ,365.17 + ,11 + ,366.51 + ,12 + ,367.86 + ,1 + ,369.07 + ,2 + ,369.32 + ,3 + ,370.38 + ,4 + ,371.63 + ,5 + ,371.32 + ,6 + ,371.51 + ,7 + ,369.69 + ,8 + ,368.18 + ,9 + ,366.87 + ,10 + ,366.94 + ,11 + ,368.27 + ,12 + ,369.62 + ,1 + ,370.47 + ,2 + ,371.44 + ,3 + ,372.39 + ,4 + ,373.32 + ,5 + ,373.77 + ,6 + ,373.13) + ,dim=c(2 + ,520) + ,dimnames=list(c('maand' + ,'co2') + ,1:520)) > y <- array(NA,dim=c(2,520),dimnames=list(c('maand','co2'),1:520)) > 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' > 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/fisher/rcomp/tmp/11o0x1355961088.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/rcomp/createtable") > > n <- length(y[,1]) > n [1] 2 > 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/fisher/rcomp/tmp/2rx1c1355961088.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) Pearson's product-moment correlation data: y[1, ] and y[2, ] t = -1.8905, df = 518, p-value = 0.05924 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: -0.167573678 0.003229034 sample estimates: cor -0.08278021 > 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 message: 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/fisher/rcomp/tmp/3p2ab1355961088.tab") > > try(system("convert tmp/11o0x1355961088.ps tmp/11o0x1355961088.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.312 0.285 1.582