R version 2.12.1 (2010-12-16) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(1516 + ,666 + ,856 + ,1228 + ,1015 + ,295 + ,1190 + ,932 + ,247 + ,474 + ,1385 + ,701 + ,809 + ,1134 + ,915 + ,295 + ,1035 + ,835 + ,201 + ,366 + ,1596 + ,714 + ,894 + ,1250 + ,1046 + ,312 + ,1222 + ,894 + ,234 + ,453 + ,1501 + ,687 + ,918 + ,1272 + ,1001 + ,355 + ,1145 + ,912 + ,242 + ,455 + ,1435 + ,624 + ,896 + ,1235 + ,898 + ,352 + ,1139 + ,898 + ,238 + ,443 + ,1466 + ,683 + ,870 + ,1212 + ,960 + ,340 + ,1186 + ,956 + ,248 + ,460 + ,1649 + ,719 + ,1009 + ,1227 + ,1057 + ,354 + ,1300 + ,1045 + ,262 + ,451 + ,1567 + ,688 + ,904 + ,1267 + ,1023 + ,301 + ,1297 + ,976 + ,278 + ,444 + ,1645 + ,668 + ,842 + ,1285 + ,1020 + ,356 + ,1305 + ,977 + ,289 + ,458 + ,1526 + ,643 + ,873 + ,1163 + ,949 + ,359 + ,1208 + ,971 + ,280 + ,455 + ,1341 + ,629 + ,809 + ,1149 + ,876 + ,274 + ,1166 + ,845 + ,252 + ,415 + ,1418 + ,576 + ,855 + ,1192 + ,893 + ,326 + ,1214 + ,968 + ,254 + ,471 + ,1436 + ,695 + ,823 + ,1190 + ,911 + ,315 + ,1180 + ,872 + ,249 + ,403 + ,1335 + ,649 + ,783 + ,1129 + ,923 + ,305 + ,1110 + ,902 + ,217 + ,387 + ,1594 + ,684 + ,963 + ,1218 + ,1025 + ,360 + ,1256 + ,1022 + ,250 + ,434 + ,1556 + ,671 + ,903 + ,1191 + ,955 + ,341 + ,1245 + ,939 + ,270 + ,425 + ,1473 + ,688 + ,929 + ,1250 + ,890 + ,319 + ,1151 + ,943 + ,255 + ,423 + ,1551 + ,664 + ,943 + ,1240 + ,950 + ,329 + ,1238 + ,955 + ,232 + ,419 + ,1596 + ,713 + ,955 + ,1276 + ,976 + ,352 + ,1209 + ,1011 + ,254 + ,473 + ,1521 + ,663 + ,900 + ,1188 + ,935 + ,325 + ,1246 + ,939 + ,266 + ,411 + ,1578 + ,677 + ,948 + ,1247 + ,938 + ,318 + ,1254 + ,987 + ,275 + ,469 + ,1457 + ,673 + ,841 + ,1124 + ,923 + ,296 + ,1214 + ,932 + ,248 + ,466 + ,1311 + ,607 + ,790 + ,1138 + ,895 + ,299 + ,1197 + ,891 + ,265 + ,409 + ,1378 + ,601 + ,908 + ,1167 + ,899 + ,329 + ,1257 + ,948 + ,238 + ,469 + ,1477 + ,712 + ,886 + ,1160 + ,984 + ,289 + ,1292 + ,982 + ,271 + ,477 + ,1450 + ,632 + ,817 + ,1134 + ,933 + ,284 + ,1285 + ,919 + ,257 + ,452 + ,1564 + ,670 + ,889 + ,1296 + ,1032 + ,339 + ,1252 + ,934 + ,259 + ,504 + ,1461 + ,632 + ,833 + ,1227 + ,909 + ,378 + ,1162 + ,928 + ,245 + ,423 + ,1614 + ,711 + ,971 + ,1319 + ,1009 + ,332 + ,1202 + ,977 + ,283 + ,454 + ,1474 + ,641 + ,845 + ,1171 + ,886 + ,330 + ,1199 + ,990 + ,249 + ,438 + ,1601 + ,659 + ,892 + ,1212 + ,987 + ,333 + ,1315 + ,1033 + ,291 + ,446 + ,1612 + ,722 + ,949 + ,1323 + ,956 + ,339 + ,1284 + ,979 + ,269 + ,474 + ,1482 + ,631 + ,910 + ,1235 + ,927 + ,321 + ,1187 + ,953 + ,253 + ,468 + ,1494 + ,660 + ,928 + ,1240 + ,979 + ,346 + ,1321 + ,984 + ,299 + ,421 + ,1408 + ,618 + ,836 + ,1167 + ,882 + ,310 + ,1201 + ,965 + ,251 + ,430 + ,1461 + ,622 + ,832 + ,1154 + ,853 + ,297 + ,1255 + ,894 + ,283 + ,482 + ,1522 + ,687 + ,832 + ,1222 + ,967 + ,347 + ,1279 + ,996 + ,270 + ,483 + ,1284 + ,599 + ,765 + ,1092 + ,864 + ,310 + ,1121 + ,868 + ,223 + ,408 + ,1555 + ,664 + ,917 + ,1256 + ,997 + ,324 + ,1242 + ,962 + ,247 + ,435 + ,1455 + ,667 + ,914 + ,1164 + ,951 + ,308 + ,1269 + ,956 + ,249 + ,427 + ,1549 + ,696 + ,930 + ,1215 + ,999 + ,356 + ,1289 + ,1030 + ,247 + ,447 + ,1499 + ,648 + ,855 + ,1251 + ,885 + ,343 + ,1181 + ,912 + ,233 + ,398 + ,1505 + ,728 + ,945 + ,1203 + ,993 + ,334 + ,1307 + ,1004 + ,300 + ,440 + ,1473 + ,680 + ,925 + ,1237 + ,928 + ,338 + ,1305 + ,1033 + ,259 + ,470 + ,1374 + ,627 + ,904 + ,1150 + ,890 + ,314 + ,1184 + ,936 + ,256 + ,401 + ,1487 + ,647 + ,900 + ,1193 + ,934 + ,340 + ,1269 + ,1023 + ,255 + ,458 + ,1432 + ,623 + ,756 + ,1151 + ,831 + ,311 + ,1239 + ,910 + ,246 + ,438 + ,1389 + ,604 + ,837 + ,1130 + ,764 + ,309 + ,1236 + ,992 + ,242 + ,427 + ,1506 + ,675 + ,844 + ,1229 + ,946 + ,344 + ,1220 + ,892 + ,276 + ,453 + ,1395 + ,611 + ,825 + ,1094 + ,847 + ,281 + ,1161 + ,872 + ,249 + ,429 + ,1541 + ,661 + ,826 + ,1185 + ,979 + ,361 + ,1226 + ,968 + ,275 + ,453 + ,1454 + ,648 + ,902 + ,1141 + ,877 + ,305 + ,1068 + ,925 + ,202 + ,370 + ,1509 + ,668 + ,932 + ,1110 + ,922 + ,315 + ,1151 + ,939 + ,266 + ,392 + ,1423 + ,675 + ,781 + ,1043 + ,826 + ,297 + ,1145 + ,861 + ,273 + ,409 + ,1563 + ,638 + ,947 + ,1230 + ,928 + ,358 + ,1305 + ,1030 + ,267 + ,427 + ,1559 + ,637 + ,896 + ,1202 + ,946 + ,334 + ,1185 + ,985 + ,263 + ,441 + ,1469 + ,630 + ,947 + ,1165 + ,845 + ,331 + ,1181 + ,926 + ,266 + ,428 + ,1432 + ,648 + ,925 + ,1202 + ,967 + ,329 + ,1251 + ,1021 + ,262 + ,435 + ,1335 + ,601 + ,785 + ,1098 + ,815 + ,291 + ,1140 + ,879 + ,238 + ,404 + ,1447 + ,590 + ,857 + ,1217 + ,867 + ,304 + ,1268 + ,950 + ,238 + ,422 + ,1471 + ,707 + ,853 + ,1188 + ,920 + ,310 + ,1237 + ,964 + ,264 + ,445 + ,1355 + ,551 + ,745 + ,1064 + ,852 + ,314 + ,1108 + ,883 + ,243 + ,376 + ,1455 + ,625 + ,873 + ,1145 + ,930 + ,312 + ,1135 + ,940 + ,235 + ,427 + ,1512 + ,641 + ,902 + ,1146 + ,900 + ,335 + ,1212 + ,942 + ,251 + ,444 + ,1542 + ,571 + ,839 + ,1149 + ,865 + ,302 + ,1111 + ,916 + ,249 + ,429 + ,1553 + ,606 + ,910 + ,1176 + ,830 + ,306 + ,1142 + ,923 + ,236 + ,414 + ,1661 + ,707 + ,949 + ,1234 + ,945 + ,362 + ,1253 + ,948 + ,271 + ,505 + ,1511 + ,673 + ,878 + ,1269 + ,869 + ,310 + ,1119 + ,857 + ,259 + ,451 + ,1578 + ,629 + ,905 + ,1202 + ,893 + ,308 + ,1230 + ,967 + ,280 + ,461 + ,1541 + ,643 + ,886 + ,1169 + ,860 + ,341 + ,1205 + ,944 + ,266 + ,403 + ,1403 + ,564 + ,845 + ,1065 + ,817 + ,296 + ,1130 + ,869 + ,250 + ,440 + ,1462 + ,611 + ,925 + ,1222 + ,911 + ,350 + ,1228 + ,969 + ,270 + ,425 + ,1493 + ,661 + ,913 + ,1223 + ,925 + ,363 + ,1228 + ,974 + ,227 + ,432 + ,1401 + ,633 + ,877 + ,1156 + ,857 + ,288 + ,1103 + ,861 + ,232 + ,428 + ,1578 + ,675 + ,934 + ,1266 + ,913 + ,316 + ,1139 + ,953 + ,274 + ,429 + ,1503 + ,644 + ,926 + ,1210 + ,877 + ,331 + ,1110 + ,902 + ,232 + ,417 + ,1502 + ,627 + ,874 + ,1202 + ,901 + ,321 + ,1044 + ,800 + ,241 + ,371 + ,1630 + ,642 + ,861 + ,1314 + ,957 + ,347 + ,1168 + ,957 + ,246 + ,451 + ,1665 + ,710 + ,950 + ,1341 + ,941 + ,326 + ,1316 + ,1004 + ,291 + ,454 + ,1593 + ,710 + ,914 + ,1272 + ,940 + ,372 + ,1226 + ,1003 + ,281 + ,478 + ,1609 + ,669 + ,913 + ,1255 + ,942 + ,324 + ,1256 + ,949 + ,279 + ,394 + ,1526 + ,669 + ,913 + ,1225 + ,865 + ,333 + ,1208 + ,935 + ,247 + ,447 + ,1463 + ,577 + ,854 + ,1216 + ,843 + ,338 + ,1214 + ,892 + ,232 + ,455 + ,1554 + ,652 + ,891 + ,1288 + ,900 + ,340 + ,1272 + ,1034 + ,273 + ,466 + ,1524 + ,663 + ,928 + ,1209 + ,1020 + ,314 + ,1226 + ,964 + ,247 + ,436 + ,1442 + ,575 + ,859 + ,1191 + ,855 + ,299 + ,1145 + ,886 + ,232 + ,383 + ,1697 + ,667 + ,956 + ,1264 + ,1034 + ,361 + ,1161 + ,1029 + ,268 + ,467 + ,1515 + ,651 + ,942 + ,1260 + ,897 + ,339 + ,1207 + ,962 + ,261 + ,423 + ,1591 + ,701 + ,918 + ,1231 + ,951 + ,357 + ,1185 + ,949 + ,225 + ,407 + ,1666 + ,676 + ,937 + ,1270 + ,903 + ,357 + ,1180 + ,988 + ,241 + ,412 + ,1592 + ,717 + ,880 + ,1307 + ,954 + ,318 + ,1194 + ,981 + ,272 + ,463 + ,1686 + ,743 + ,958 + ,1408 + ,981 + ,339 + ,1329 + ,997 + ,283 + ,431 + ,1582 + ,665 + ,973 + ,1287 + ,897 + ,314 + ,1284 + ,1006 + ,293 + ,436 + ,1617 + ,676 + ,948 + ,1278 + ,978 + ,349 + ,1256 + ,973 + ,259 + ,492 + ,1433 + ,627 + ,918 + ,1194 + ,872 + ,298 + ,1154 + ,934 + ,231 + ,449 + ,1639 + ,621 + ,900 + ,1271 + ,917 + ,328 + ,1188 + ,926 + ,264 + ,453 + ,1570 + ,672 + ,969 + ,1326 + ,1013 + ,328 + ,1177 + ,960 + ,253 + ,418 + ,1477 + ,623 + ,827 + ,1182 + ,881 + ,304 + ,1086 + ,857 + ,229 + ,380 + ,1689 + ,685 + ,966 + ,1402 + ,983 + ,365 + ,1250 + ,1029 + ,286 + ,440 + ,1583 + ,695 + ,907 + ,1180 + ,973 + ,337 + ,1149 + ,898 + ,233 + ,423 + ,1690 + ,689 + ,927 + ,1337 + ,988 + ,337 + ,1213 + ,1000 + ,276 + ,493 + ,1696 + ,729 + ,947 + ,1265 + ,934 + ,331 + ,1251 + ,943 + ,305 + ,452 + ,1680 + ,700 + ,999 + ,1350 + ,941 + ,386 + ,1231 + ,993 + ,239 + ,450 + ,1741 + ,706 + ,1024 + ,1360 + ,1015 + ,338 + ,1227 + ,1031 + ,250 + ,457 + ,1722 + ,682 + ,1043 + ,1374 + ,955 + ,354 + ,1269 + ,1077 + ,258 + ,470 + ,1638 + ,758 + ,988 + ,1390 + ,940 + ,388 + ,1341 + ,1065 + ,241 + ,488 + ,1522 + ,624 + ,890 + ,1246 + ,936 + ,315 + ,1244 + ,897 + ,281 + ,440 + ,1503 + ,626 + ,859 + ,1260 + ,860 + ,348 + ,1236 + ,1010 + ,240 + ,410 + ,1676 + ,760 + ,945 + ,1341 + ,1007 + ,315 + ,1260 + ,971 + ,277 + ,423 + ,1600 + ,647 + ,892 + ,1218 + ,896 + ,326 + ,1157 + ,852 + ,223 + ,401 + ,1724 + ,679 + ,972 + ,1327 + ,960 + ,344 + ,1235 + ,980 + ,279 + ,437 + ,1535 + ,718 + ,937 + ,1266 + ,926 + ,329 + ,1124 + ,881 + ,245 + ,412 + ,1723 + ,746 + ,1008 + ,1291 + ,1024 + ,331 + ,1218 + ,996 + ,255 + ,441 + ,1645 + ,692 + ,941 + ,1303 + ,945 + ,318 + ,1213 + ,942 + ,274 + ,420 + ,1713 + ,748 + ,1040 + ,1415 + ,1041 + ,332 + ,1302 + ,1022 + ,273 + ,506 + ,1837 + ,811 + ,973 + ,1402 + ,1015 + ,349 + ,1353 + ,1057 + ,270 + ,493 + ,1682 + ,718 + ,910 + ,1309 + ,992 + ,369 + ,1207 + ,991 + ,237 + ,457 + ,1673 + ,708 + ,967 + ,1371 + ,973 + ,390 + ,1363 + ,1049 + ,320 + ,502 + ,1578 + ,651 + ,912 + ,1200 + ,897 + ,304 + ,1220 + ,986 + ,241 + ,445 + ,1580 + ,673 + ,908 + ,1267 + ,923 + ,332 + ,1313 + ,988 + ,245 + ,456) + ,dim=c(10 + ,120) + ,dimnames=list(c('Antwerpen' + ,'Limburg' + ,'Vl-Brabant' + ,'Oost-Vl' + ,'West-Vl' + ,'Wl-Brabant' + ,'Henegouwen' + ,'Luik' + ,'Luxemburg' + ,'Namen ') + ,1:120)) > y <- array(NA,dim=c(10,120),dimnames=list(c('Antwerpen','Limburg','Vl-Brabant','Oost-Vl','West-Vl','Wl-Brabant','Henegouwen','Luik','Luxemburg','Namen '),1:120)) > 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' > #'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/rcomp/tmp/1rnla1323813566.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/2u58z1323813566.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 = 10.1066, df = 118, p-value < 2.2e-16 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.5717252 0.7667856 sample estimates: cor 0.6811631 > 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/rcomp/tmp/3op331323813566.tab") > > try(system("convert tmp/1rnla1323813566.ps tmp/1rnla1323813566.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.312 0.128 2.511