x <- array(list(1418
,210907
,56
,79
,30
,3
,869
,120982
,56
,58
,28
,4
,1530
,176508
,54
,60
,38
,12
,2172
,179321
,89
,108
,30
,2
,901
,123185
,40
,49
,22
,1
,463
,52746
,25
,0
,26
,3
,3201
,385534
,92
,121
,25
,0
,371
,33170
,18
,1
,18
,0
,1192
,101645
,63
,20
,11
,0
,1583
,149061
,44
,43
,26
,5
,1439
,165446
,33
,69
,25
,0
,1764
,237213
,84
,78
,38
,0
,1495
,173326
,88
,86
,44
,7
,1373
,133131
,55
,44
,30
,7
,2187
,258873
,60
,104
,40
,3
,1491
,180083
,66
,63
,34
,9
,4041
,324799
,154
,158
,47
,0
,1706
,230964
,53
,102
,30
,4
,2152
,236785
,119
,77
,31
,3
,1036
,135473
,41
,82
,23
,0
,1882
,202925
,61
,115
,36
,7
,1929
,215147
,58
,101
,36
,0
,2242
,344297
,75
,80
,30
,1
,1220
,153935
,33
,50
,25
,5
,1289
,132943
,40
,83
,39
,7
,2515
,174724
,92
,123
,34
,0
,2147
,174415
,100
,73
,31
,0
,2352
,225548
,112
,81
,31
,5
,1638
,223632
,73
,105
,33
,0
,1222
,124817
,40
,47
,25
,0
,1812
,221698
,45
,105
,33
,0
,1677
,210767
,60
,94
,35
,3
,1579
,170266
,62
,44
,42
,4
,1731
,260561
,75
,114
,43
,1
,807
,84853
,31
,38
,30
,4
,2452
,294424
,77
,107
,33
,2
,829
,101011
,34
,30
,13
,0
,1940
,215641
,46
,71
,32
,0
,2662
,325107
,99
,84
,36
,0
,186
,7176
,17
,0
,0
,0
,1499
,167542
,66
,59
,28
,2
,865
,106408
,30
,33
,14
,1
,1793
,96560
,76
,42
,17
,0
,2527
,265769
,146
,96
,32
,2
,2747
,269651
,67
,106
,30
,10
,1324
,149112
,56
,56
,35
,6
,2702
,175824
,107
,57
,20
,0
,1383
,152871
,58
,59
,28
,5
,1179
,111665
,34
,39
,28
,4
,2099
,116408
,61
,34
,39
,1
,4308
,362301
,119
,76
,34
,2
,918
,78800
,42
,20
,26
,2
,1831
,183167
,66
,91
,39
,0
,3373
,277965
,89
,115
,39
,8
,1713
,150629
,44
,85
,33
,3
,1438
,168809
,66
,76
,28
,0
,496
,24188
,24
,8
,4
,0
,2253
,329267
,259
,79
,39
,8
,744
,65029
,17
,21
,18
,5
,1161
,101097
,64
,30
,14
,3
,2352
,218946
,41
,76
,29
,1
,2144
,244052
,68
,101
,44
,5
,4691
,341570
,168
,94
,21
,1
,1112
,103597
,43
,27
,16
,1
,2694
,233328
,132
,92
,28
,5
,1973
,256462
,105
,123
,35
,0
,1769
,206161
,71
,75
,28
,12
,3148
,311473
,112
,128
,38
,8
,2474
,235800
,94
,105
,23
,8
,2084
,177939
,82
,55
,36
,8
,1954
,207176
,70
,56
,32
,8
,1226
,196553
,57
,41
,29
,2
,1389
,174184
,53
,72
,25
,0
,1496
,143246
,103
,67
,27
,5
,2269
,187559
,121
,75
,36
,8
,1833
,187681
,62
,114
,28
,2
,1268
,119016
,52
,118
,23
,5
,1943
,182192
,52
,77
,40
,12
,893
,73566
,32
,22
,23
,6
,1762
,194979
,62
,66
,40
,7
,1403
,167488
,45
,69
,28
,2
,1425
,143756
,46
,105
,34
,0
,1857
,275541
,63
,116
,33
,4
,1840
,243199
,75
,88
,28
,3
,1502
,182999
,88
,73
,34
,6
,1441
,135649
,46
,99
,30
,2
,1420
,152299
,53
,62
,33
,0
,1416
,120221
,37
,53
,22
,1
,2970
,346485
,90
,118
,38
,0
,1317
,145790
,63
,30
,26
,5
,1644
,193339
,78
,100
,35
,2
,870
,80953
,25
,49
,8
,0
,1654
,122774
,45
,24
,24
,0
,1054
,130585
,46
,67
,29
,5
,937
,112611
,41
,46
,20
,0
,3004
,286468
,144
,57
,29
,1
,2008
,241066
,82
,75
,45
,0
,2547
,148446
,91
,135
,37
,1
,1885
,204713
,71
,68
,33
,1
,1626
,182079
,63
,124
,33
,2
,1468
,140344
,53
,33
,25
,6
,2445
,220516
,62
,98
,32
,1
,1964
,243060
,63
,58
,29
,4
,1381
,162765
,32
,68
,28
,2
,1369
,182613
,39
,81
,28
,3
,1659
,232138
,62
,131
,31
,0
,2888
,265318
,117
,110
,52
,10
,1290
,85574
,34
,37
,21
,0
,2845
,310839
,92
,130
,24
,9
,1982
,225060
,93
,93
,41
,7
,1904
,232317
,54
,118
,33
,0
,1391
,144966
,144
,39
,32
,0
,602
,43287
,14
,13
,19
,4
,1743
,155754
,61
,74
,20
,4
,1559
,164709
,109
,81
,31
,0
,2014
,201940
,38
,109
,31
,0
,2143
,235454
,73
,151
,32
,0
,2146
,220801
,75
,51
,18
,1
,874
,99466
,50
,28
,23
,0
,1590
,92661
,61
,40
,17
,1
,1590
,133328
,55
,56
,20
,0
,1210
,61361
,77
,27
,12
,0
,2072
,125930
,75
,37
,17
,4
,1281
,100750
,72
,83
,30
,0
,1401
,224549
,50
,54
,31
,4
,834
,82316
,32
,27
,10
,4
,1105
,102010
,53
,28
,13
,3
,1272
,101523
,42
,59
,22
,0
,1944
,243511
,71
,133
,42
,0
,391
,22938
,10
,12
,1
,0
,761
,41566
,35
,0
,9
,5
,1605
,152474
,65
,106
,32
,0
,530
,61857
,25
,23
,11
,4
,1988
,99923
,66
,44
,25
,0
,1386
,132487
,41
,71
,36
,0
,2395
,317394
,86
,116
,31
,1
,387
,21054
,16
,4
,0
,0
,1742
,209641
,42
,62
,24
,5
,620
,22648
,19
,12
,13
,0
,449
,31414
,19
,18
,8
,0
,800
,46698
,45
,14
,13
,0
,1684
,131698
,65
,60
,19
,0
,1050
,91735
,35
,7
,18
,0
,2699
,244749
,95
,98
,33
,2
,1606
,184510
,49
,64
,40
,7
,1502
,79863
,37
,29
,22
,1
,1204
,128423
,64
,32
,38
,8
,1138
,97839
,38
,25
,24
,2
,568
,38214
,34
,16
,8
,0
,1459
,151101
,32
,48
,35
,2
,2158
,272458
,65
,100
,43
,0
,1111
,172494
,52
,46
,43
,0
,1421
,108043
,62
,45
,14
,1
,2833
,328107
,65
,129
,41
,3
,1955
,250579
,83
,130
,38
,0
,2922
,351067
,95
,136
,45
,3
,1002
,158015
,29
,59
,31
,0
,1060
,98866
,18
,25
,13
,0
,956
,85439
,33
,32
,28
,0
,2186
,229242
,247
,63
,31
,4
,3604
,351619
,139
,95
,40
,4
,1035
,84207
,29
,14
,30
,11
,1417
,120445
,118
,36
,16
,0
,3261
,324598
,110
,113
,37
,0
,1587
,131069
,67
,47
,30
,4
,1424
,204271
,42
,92
,35
,0
,1701
,165543
,65
,70
,32
,1
,1249
,141722
,94
,19
,27
,0
,946
,116048
,64
,50
,20
,0
,1926
,250047
,81
,41
,18
,0
,3352
,299775
,95
,91
,31
,9
,1641
,195838
,67
,111
,31
,1
,2035
,173260
,63
,41
,21
,3
,2312
,254488
,83
,120
,39
,10
,1369
,104389
,45
,135
,41
,5
,1577
,136084
,30
,27
,13
,0
,2201
,199476
,70
,87
,32
,2
,961
,92499
,32
,25
,18
,0
,1900
,224330
,83
,131
,39
,1
,1254
,135781
,31
,45
,14
,2
,1335
,74408
,67
,29
,7
,4
,1597
,81240
,66
,58
,17
,0
,207
,14688
,10
,4
,0
,0
,1645
,181633
,70
,47
,30
,2
,2429
,271856
,103
,109
,37
,1
,151
,7199
,5
,7
,0
,0
,474
,46660
,20
,12
,5
,0
,141
,17547
,5
,0
,1
,0
,1639
,133368
,36
,37
,16
,1
,872
,95227
,34
,37
,32
,0
,1318
,152601
,48
,46
,24
,2
,1018
,98146
,40
,15
,17
,0
,1383
,79619
,43
,42
,11
,3
,1314
,59194
,31
,7
,24
,6
,1335
,139942
,42
,54
,22
,0
,1403
,118612
,46
,54
,12
,2
,910
,72880
,33
,14
,19
,0
,616
,65475
,18
,16
,13
,2
,1407
,99643
,55
,33
,17
,1
,771
,71965
,35
,32
,15
,1
,766
,77272
,59
,21
,16
,2
,473
,49289
,19
,15
,24
,1
,1376
,135131
,66
,38
,15
,0
,1232
,108446
,60
,22
,17
,1
,1521
,89746
,36
,28
,18
,3
,572
,44296
,25
,10
,20
,0
,1059
,77648
,47
,31
,16
,0
,1544
,181528
,54
,32
,16
,0
,1230
,134019
,53
,32
,18
,0
,1206
,124064
,40
,43
,22
,1
,1205
,92630
,40
,27
,8
,4
,1255
,121848
,39
,37
,17
,0
,613
,52915
,14
,20
,18
,0
,721
,81872
,45
,32
,16
,0
,1109
,58981
,36
,0
,23
,7
,740
,53515
,28
,5
,22
,2
,1126
,60812
,44
,26
,13
,0
,728
,56375
,30
,10
,13
,7
,689
,65490
,22
,27
,16
,3
,592
,80949
,17
,11
,16
,0
,995
,76302
,31
,29
,20
,0
,1613
,104011
,55
,25
,22
,6
,2048
,98104
,54
,55
,17
,2
,705
,67989
,21
,23
,18
,0
,301
,30989
,14
,5
,17
,0
,1803
,135458
,81
,43
,12
,3
,799
,73504
,35
,23
,7
,0
,861
,63123
,43
,34
,17
,1
,1186
,61254
,46
,36
,14
,1
,1451
,74914
,30
,35
,23
,0
,628
,31774
,23
,0
,17
,1
,1161
,81437
,38
,37
,14
,0
,1463
,87186
,54
,28
,15
,0
,742
,50090
,20
,16
,17
,0
,979
,65745
,53
,26
,21
,0
,675
,56653
,45
,38
,18
,0
,1241
,158399
,39
,23
,18
,0
,676
,46455
,20
,22
,17
,0
,1049
,73624
,24
,30
,17
,0
,620
,38395
,31
,16
,16
,0
,1081
,91899
,35
,18
,15
,0
,1688
,139526
,151
,28
,21
,0
,736
,52164
,52
,32
,16
,0
,617
,51567
,30
,21
,14
,2
,812
,70551
,31
,23
,15
,0
,1051
,84856
,29
,29
,17
,1
,1656
,102538
,57
,50
,15
,1
,705
,86678
,40
,12
,15
,0
,945
,85709
,44
,21
,10
,0
,554
,34662
,25
,18
,6
,0
,1597
,150580
,77
,27
,22
,0
,982
,99611
,35
,41
,21
,0
,222
,19349
,11
,13
,1
,0
,1212
,99373
,63
,12
,18
,1
,1143
,86230
,44
,21
,17
,0
,435
,30837
,19
,8
,4
,0
,532
,31706
,13
,26
,10
,0
,882
,89806
,42
,27
,16
,0
,608
,62088
,38
,13
,16
,1
,459
,40151
,29
,16
,9
,0
,578
,27634
,20
,2
,16
,0
,826
,76990
,27
,42
,17
,0
,509
,37460
,20
,5
,7
,0
,717
,54157
,19
,37
,15
,0
,637
,49862
,37
,17
,14
,0
,857
,84337
,26
,38
,14
,0
,830
,64175
,42
,37
,18
,0
,652
,59382
,49
,29
,12
,0
,707
,119308
,30
,32
,16
,0
,954
,76702
,49
,35
,21
,0
,1461
,103425
,67
,17
,19
,1
,672
,70344
,28
,20
,16
,0
,778
,43410
,19
,7
,1
,0
,1141
,104838
,49
,46
,16
,1
,680
,62215
,27
,24
,10
,0
,1090
,69304
,30
,40
,19
,6
,616
,53117
,22
,3
,12
,3
,285
,19764
,12
,10
,2
,1
,1145
,86680
,31
,37
,14
,2
,733
,84105
,20
,17
,17
,0
,888
,77945
,20
,28
,19
,0
,849
,89113
,39
,19
,14
,0
,1182
,91005
,29
,29
,11
,3
,528
,40248
,16
,8
,4
,1
,642
,64187
,27
,10
,16
,0
,947
,50857
,21
,15
,20
,0
,819
,56613
,19
,15
,12
,1
,757
,62792
,35
,28
,15
,0
,894
,72535
,14
,17
,16
,0)
,dim=c(6
,289)
,dimnames=list(c('Pageviews'
,'time_in_rfc'
,'Logins'
,'Blogged_computations'
,'Compendiums_reviewed'
,'Shared_compendiums')
,1:289))
 y <- array(NA,dim=c(6,289),dimnames=list(c('Pageviews','time_in_rfc','Logins','Blogged_computations','Compendiums_reviewed','Shared_compendiums'),1:289))
 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/www/rcomp/tmp/15c101323766044.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()

#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
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/2qyvl1323766044.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)
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)
}
}
a<-table.end(a)
table.save(a,file="/var/www/rcomp/tmp/3sbo01323766044.tab") 

try(system("convert tmp/15c101323766044.ps tmp/15c101323766044.png",intern=TRUE))

