Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_cross.wasp
Title produced by softwareCross Correlation Function
Date of computationThu, 26 Oct 2023 19:57:37 +0200
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2023/Oct/26/t1698343593y2mb2prx0se02g6.htm/, Retrieved Thu, 13 Aug 2026 17:51:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=319976, Retrieved Thu, 13 Aug 2026 17:51:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact418
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Cross Correlation Function] [] [2023-10-26 17:57:37] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
0
0
1
0
3
0
0
1,
0,
2,
0,
0,
3,
0,
0,
1,
0,
0,
0,
0,
1,
0, 
1,
0,
0,
0,
0,
0, 
0 
0,
2,
0,
0,
0,
0,
0,
1,
0,
8,
7,
23,
19,
33, 
77,
53,
166,
116,
75,
188,
365,
439,
633,
759,
234,
1467,
1833,
2657,
4494,
6367,
5995,
8873,
11238,
10619,
12082,
17856,
18690,
19630,
18899,
22075,
26314,
32243,
32235,
32287,
32416,
29877,
31381,
30767,
31192,
35941,
34415,
29130,
27255,
26930,
28781,
25440,
30035,
33030,
27932,
26096,
29828,
25917,
28859,
33570,
32327,
30395,
26501,
23703,
24577,
26438,
29220,
34926,
27350,
24297,
24085,
24531,
24559,
27412,
26838,
25136,
18867,
19271,
22947,
20408,
26818,
24747,
24159,
18363,
22390,
21007,
22697,
25766,
23656,
21112,
20067,
18672,
19650,
18549,
22322,
24472,
23633,
18987,
17435,
21503,
19844,
21649,
25400,
21160,
17916,
17637,
18382,
21110,
23132,
24865,
25208,
18948,
19819,
23670,
27058,
28522,
31560,
32269,
25146,
32147,
37063,
35858,
40315,
45982,
41340,
40725,
41279,
46426
51809,
56627,
51357,
45679,
50769,
43072,
60642,
60110,
62487,
68039,
60015,
58450,
58889,
68012,
68107,
75809,

72249,
62537,
60471,
62082,
64487,
70561,
68428,
73301, 
64899,
54847,
56738,
66449,
71813,
67418,
68697,
56174,
45547,
45521,
58772,
54448,
59334,
59269, 
54111,
45748,
47620,
47955,
55983,
51277,
65322,
46902,
39189,
36654,
44998,
47347,
43788,
48706,
43045,
34261,
36600,
40116,
45290,
45185,
46953,
42676,
34396,
35475,
41667,
40940,
44085,
50415,
42982,
31299,
23468,
27435,
33754,
36120,
47649,
41077,
34266,
34377,
39427,

38835,
45190,
49146,
42122,
38300,
51914,
39662,
39008,
47029,
48184,
44618,
37516,
33203,
43217,
39334,
45586,
54820,
48559,
35742,
39423, 
45047,
50940,
58502,
56265,
54906,
45878,
41862,
52107,
59620,
64775,
69043,
56656,
49307,
67715,
61823,
63173,
76211,
81722,
82704,
62020,
67315,
76583,
79190,
90799,
98978,
89668,
104769,
85101,
126920,

104392,
129100,
127752,
127202,
115078,
120457,
140227,
146365,
164375,
180163,
167517,
136129,
162500,
163424,
172846,
191140,
197930,
179108,
146639,
173993, 
175103,
182676,
112141,
207934,
155266, 
140086,
160116,
187432,
201973,
222796,
232216,
215216,
180838,
194261,
223867,
221644,
230667,
238529,
216466,
187303,
193071,
209293,
245648,
239020,
251161,
191616,
187350,
198381,
197189,
228845,
193914,
97498,
226160,
155317,
173896,
198567,
232416,
234133,
153394,
299786,
208074,
183406,
233654,
253993,
277068,
292105,
262337,
213161,
214189,
225999,
229757,
234901,
240944,
201008,
177109,
143085,
175658,
182514,
192895,
189993,
170302,
130811,
151062,
146670,
152606,
168630,
166076,
142088,
111857,
134316,
114804 
121191,
123243,
133507,
103890,
89600,
89907,
95170,
94768,
105398,
99444,
86984,
64956,
53977, 
62470,
69829,
69266,
106355,
71510,
56495
56044
71436
74502
77291
76791
64287
51205
58810
55071

Dataseries Y:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
5
1
4
1
2
3
4
1
6
5
10
8
7
12
27
37
60
72
106
103
113
191
241
330
417
518
637
609
711
1092
1328
1512
1431
1565
1615
1775
2582
2156
2201
2218
2111
1877
2017
2440
2611
2160
2100
1986
1977
2237
2521
2455
2469
2195
1714
1397
1519
2235
2413
2199
1913
1735
1199
1382
2249
2313
1931
1759
1475
987
1047
1606
1742
1791
1675
1209
828
1231
1462
1503
1194
1230 
1086
640
593 
679
1460
1111
1138
955
614
779
984
1017
1012
894
647
459
510
918
874
836
832
735
344
400
817
740
696
632
564
316
413
753
752
535
629
507
321
385
561
709
745
642
310
327
375
1165
841
1018
813
729
473
446
928
975
956
933
873
468
563
1096 
1226
1089
1101
918
535
1124
1344
1431
1229
1220
1095
431
582
1342
1398
1239
1233
1076
563
593
1023
1505 
1066
1342
1006
612
492
1278
1306
1095
1089
980
498
475
1228
1188
1100
963
904
468
550
1049
1062
1035
949
782
445
299
454
1153
906
1172
726
428
437
1205
950
869
907
727
274
430
1034
1056
906
933
782
319
358
863
938
868
856
685
387
485
690
924
991
972
656
470
398
794
987
863
934
774
493
481
935
1152
890
963
954
462
536
975
1038
1004
1071
910
500
573
1579
1127
1154
1237
1079
577
782
1425
1443
1209
1203
1351
776
835
1723
1940
2043
1957
1628
1039
1107
2135
2267 
1395
1551
1367
1044
1349
2563
2823
2964
2676
2359
1356
1615
2633
3179
2996
3423
2470
1636
1667
3095
3722
3467
2942
2659
1713
1943
3398
3426
2905
1407
1876
1435
2005
3636
3738
3443
2139
2492
1434
2061
3657
3866
3901
4015
3262
1917
2020
4398
3959
3908
3816
3365
1799
1442
2673
4347
4128
3769
3292
1842
1922
3990
3914
3980
3574
2723
1800
2009
3438
3830
3718
3590
2558
1337
1576
3039
3292
3146
2877
2167
1099
913
1698
2373
2300
2686
1824
1252
1325
2345
3223
2411
2145
1537
1097
1565
1819




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time0 seconds
R ServerBig Analytics Cloud Computing Center
R Framework error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time0 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
R Framework error message & 
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.
\tabularnewline \hline \end{tabular} %Source: https://freestatistics.org/blog/index.php?pk=319976&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]0 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [ROW]R Framework error message[/C][C]
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.
[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=319976&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=319976&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time0 seconds
R ServerBig Analytics Cloud Computing Center
R Framework error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.







Cross Correlation Function
ParameterValue
Box-Cox transformation parameter (lambda) of X series1
Degree of non-seasonal differencing (d) of X series0
Degree of seasonal differencing (D) of X series0
Seasonal Period (s)1
Box-Cox transformation parameter (lambda) of Y series1
Degree of non-seasonal differencing (d) of Y series0
Degree of seasonal differencing (D) of Y series0
krho(Y[t],X[t+k])
-230.671787964159572
-220.679184707444795
-210.716089237750407
-200.750217664504006
-190.74734406403583
-180.726135797845854
-170.706019981885346
-160.690985495998584
-150.693537513953531
-140.729975913606778
-130.76361550876126
-120.760710779751736
-110.735219198837318
-100.705545148555029
-90.692670742882974
-80.692222283851699
-70.727096653359828
-60.759491453289002
-50.750978456840487
-40.722639267592746
-30.69040240341198
-20.66954733649681
-10.670430808936217
00.706161077983438
10.735923298906549
20.705840988168237
30.673158051398928
40.633646916115765
50.601944694315972
60.592352141296355
70.61395377222505
80.63364750538397
90.609277423385721
100.578239505968076
110.544350489982261
120.512787376529433
130.499954014299177
140.521152976468228
150.53608683918156
160.52350334858987
170.492231736409141
180.46061665405219
190.428150550689399
200.415436636641488
210.434989576298891
220.449745443257097
230.438879711290564

\begin{tabular}{lllllllll}
\hline
Cross Correlation Function \tabularnewline
Parameter & Value \tabularnewline
Box-Cox transformation parameter (lambda) of X series & 1 \tabularnewline
Degree of non-seasonal differencing (d) of X series & 0 \tabularnewline
Degree of seasonal differencing (D) of X series & 0 \tabularnewline
Seasonal Period (s) & 1 \tabularnewline
Box-Cox transformation parameter (lambda) of Y series & 1 \tabularnewline
Degree of non-seasonal differencing (d) of Y series & 0 \tabularnewline
Degree of seasonal differencing (D) of Y series & 0 \tabularnewline
k & rho(Y[t],X[t+k]) \tabularnewline
-23 & 0.671787964159572 \tabularnewline
-22 & 0.679184707444795 \tabularnewline
-21 & 0.716089237750407 \tabularnewline
-20 & 0.750217664504006 \tabularnewline
-19 & 0.74734406403583 \tabularnewline
-18 & 0.726135797845854 \tabularnewline
-17 & 0.706019981885346 \tabularnewline
-16 & 0.690985495998584 \tabularnewline
-15 & 0.693537513953531 \tabularnewline
-14 & 0.729975913606778 \tabularnewline
-13 & 0.76361550876126 \tabularnewline
-12 & 0.760710779751736 \tabularnewline
-11 & 0.735219198837318 \tabularnewline
-10 & 0.705545148555029 \tabularnewline
-9 & 0.692670742882974 \tabularnewline
-8 & 0.692222283851699 \tabularnewline
-7 & 0.727096653359828 \tabularnewline
-6 & 0.759491453289002 \tabularnewline
-5 & 0.750978456840487 \tabularnewline
-4 & 0.722639267592746 \tabularnewline
-3 & 0.69040240341198 \tabularnewline
-2 & 0.66954733649681 \tabularnewline
-1 & 0.670430808936217 \tabularnewline
0 & 0.706161077983438 \tabularnewline
1 & 0.735923298906549 \tabularnewline
2 & 0.705840988168237 \tabularnewline
3 & 0.673158051398928 \tabularnewline
4 & 0.633646916115765 \tabularnewline
5 & 0.601944694315972 \tabularnewline
6 & 0.592352141296355 \tabularnewline
7 & 0.61395377222505 \tabularnewline
8 & 0.63364750538397 \tabularnewline
9 & 0.609277423385721 \tabularnewline
10 & 0.578239505968076 \tabularnewline
11 & 0.544350489982261 \tabularnewline
12 & 0.512787376529433 \tabularnewline
13 & 0.499954014299177 \tabularnewline
14 & 0.521152976468228 \tabularnewline
15 & 0.53608683918156 \tabularnewline
16 & 0.52350334858987 \tabularnewline
17 & 0.492231736409141 \tabularnewline
18 & 0.46061665405219 \tabularnewline
19 & 0.428150550689399 \tabularnewline
20 & 0.415436636641488 \tabularnewline
21 & 0.434989576298891 \tabularnewline
22 & 0.449745443257097 \tabularnewline
23 & 0.438879711290564 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=319976&T=1

[TABLE]
[ROW][C]Cross Correlation Function[/C][/ROW]
[ROW][C]Parameter[/C][C]Value[/C][/ROW]
[ROW][C]Box-Cox transformation parameter (lambda) of X series[/C][C]1[/C][/ROW]
[ROW][C]Degree of non-seasonal differencing (d) of X series[/C][C]0[/C][/ROW]
[ROW][C]Degree of seasonal differencing (D) of X series[/C][C]0[/C][/ROW]
[ROW][C]Seasonal Period (s)[/C][C]1[/C][/ROW]
[ROW][C]Box-Cox transformation parameter (lambda) of Y series[/C][C]1[/C][/ROW]
[ROW][C]Degree of non-seasonal differencing (d) of Y series[/C][C]0[/C][/ROW]
[ROW][C]Degree of seasonal differencing (D) of Y series[/C][C]0[/C][/ROW]
[ROW][C]k[/C][C]rho(Y[t],X[t+k])[/C][/ROW]
[ROW][C]-23[/C][C]0.671787964159572[/C][/ROW]
[ROW][C]-22[/C][C]0.679184707444795[/C][/ROW]
[ROW][C]-21[/C][C]0.716089237750407[/C][/ROW]
[ROW][C]-20[/C][C]0.750217664504006[/C][/ROW]
[ROW][C]-19[/C][C]0.74734406403583[/C][/ROW]
[ROW][C]-18[/C][C]0.726135797845854[/C][/ROW]
[ROW][C]-17[/C][C]0.706019981885346[/C][/ROW]
[ROW][C]-16[/C][C]0.690985495998584[/C][/ROW]
[ROW][C]-15[/C][C]0.693537513953531[/C][/ROW]
[ROW][C]-14[/C][C]0.729975913606778[/C][/ROW]
[ROW][C]-13[/C][C]0.76361550876126[/C][/ROW]
[ROW][C]-12[/C][C]0.760710779751736[/C][/ROW]
[ROW][C]-11[/C][C]0.735219198837318[/C][/ROW]
[ROW][C]-10[/C][C]0.705545148555029[/C][/ROW]
[ROW][C]-9[/C][C]0.692670742882974[/C][/ROW]
[ROW][C]-8[/C][C]0.692222283851699[/C][/ROW]
[ROW][C]-7[/C][C]0.727096653359828[/C][/ROW]
[ROW][C]-6[/C][C]0.759491453289002[/C][/ROW]
[ROW][C]-5[/C][C]0.750978456840487[/C][/ROW]
[ROW][C]-4[/C][C]0.722639267592746[/C][/ROW]
[ROW][C]-3[/C][C]0.69040240341198[/C][/ROW]
[ROW][C]-2[/C][C]0.66954733649681[/C][/ROW]
[ROW][C]-1[/C][C]0.670430808936217[/C][/ROW]
[ROW][C]0[/C][C]0.706161077983438[/C][/ROW]
[ROW][C]1[/C][C]0.735923298906549[/C][/ROW]
[ROW][C]2[/C][C]0.705840988168237[/C][/ROW]
[ROW][C]3[/C][C]0.673158051398928[/C][/ROW]
[ROW][C]4[/C][C]0.633646916115765[/C][/ROW]
[ROW][C]5[/C][C]0.601944694315972[/C][/ROW]
[ROW][C]6[/C][C]0.592352141296355[/C][/ROW]
[ROW][C]7[/C][C]0.61395377222505[/C][/ROW]
[ROW][C]8[/C][C]0.63364750538397[/C][/ROW]
[ROW][C]9[/C][C]0.609277423385721[/C][/ROW]
[ROW][C]10[/C][C]0.578239505968076[/C][/ROW]
[ROW][C]11[/C][C]0.544350489982261[/C][/ROW]
[ROW][C]12[/C][C]0.512787376529433[/C][/ROW]
[ROW][C]13[/C][C]0.499954014299177[/C][/ROW]
[ROW][C]14[/C][C]0.521152976468228[/C][/ROW]
[ROW][C]15[/C][C]0.53608683918156[/C][/ROW]
[ROW][C]16[/C][C]0.52350334858987[/C][/ROW]
[ROW][C]17[/C][C]0.492231736409141[/C][/ROW]
[ROW][C]18[/C][C]0.46061665405219[/C][/ROW]
[ROW][C]19[/C][C]0.428150550689399[/C][/ROW]
[ROW][C]20[/C][C]0.415436636641488[/C][/ROW]
[ROW][C]21[/C][C]0.434989576298891[/C][/ROW]
[ROW][C]22[/C][C]0.449745443257097[/C][/ROW]
[ROW][C]23[/C][C]0.438879711290564[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=319976&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=319976&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Cross Correlation Function
ParameterValue
Box-Cox transformation parameter (lambda) of X series1
Degree of non-seasonal differencing (d) of X series0
Degree of seasonal differencing (D) of X series0
Seasonal Period (s)1
Box-Cox transformation parameter (lambda) of Y series1
Degree of non-seasonal differencing (d) of Y series0
Degree of seasonal differencing (D) of Y series0
krho(Y[t],X[t+k])
-230.671787964159572
-220.679184707444795
-210.716089237750407
-200.750217664504006
-190.74734406403583
-180.726135797845854
-170.706019981885346
-160.690985495998584
-150.693537513953531
-140.729975913606778
-130.76361550876126
-120.760710779751736
-110.735219198837318
-100.705545148555029
-90.692670742882974
-80.692222283851699
-70.727096653359828
-60.759491453289002
-50.750978456840487
-40.722639267592746
-30.69040240341198
-20.66954733649681
-10.670430808936217
00.706161077983438
10.735923298906549
20.705840988168237
30.673158051398928
40.633646916115765
50.601944694315972
60.592352141296355
70.61395377222505
80.63364750538397
90.609277423385721
100.578239505968076
110.544350489982261
120.512787376529433
130.499954014299177
140.521152976468228
150.53608683918156
160.52350334858987
170.492231736409141
180.46061665405219
190.428150550689399
200.415436636641488
210.434989576298891
220.449745443257097
230.438879711290564



Parameters (Session):
par1 = 1 ; par2 = 0 ; par3 = 0 ; par4 = 1 ; par5 = 1 ; par6 = 0 ; par7 = 0 ; par8 = na.fail ;
Parameters (R input):
par1 = 1 ; par2 = 0 ; par3 = 0 ; par4 = 1 ; par5 = 1 ; par6 = 0 ; par7 = 0 ; par8 = na.fail ;
R code (references can be found in the software module):
par1 <- as.numeric(par1)
par2 <- as.numeric(par2)
par3 <- as.numeric(par3)
par4 <- as.numeric(par4)
par5 <- as.numeric(par5)
par6 <- as.numeric(par6)
par7 <- as.numeric(par7)
if (par8=='na.fail') par8 <- na.fail else par8 <- na.pass
ccf <- function (x, y, lag.max = NULL, type = c('correlation', 'covariance'), plot = TRUE, na.action = na.fail, ...) {
type <- match.arg(type)
if (is.matrix(x) || is.matrix(y))
stop('univariate time series only')
X <- na.action(ts.intersect(as.ts(x), as.ts(y)))
colnames(X) <- c(deparse(substitute(x))[1L], deparse(substitute(y))[1L])
acf.out <- acf(X, lag.max = lag.max, plot = FALSE, type = type, na.action=na.action)
lag <- c(rev(acf.out$lag[-1, 2, 1]), acf.out$lag[, 1, 2])
y <- c(rev(acf.out$acf[-1, 2, 1]), acf.out$acf[, 1, 2])
acf.out$acf <- array(y, dim = c(length(y), 1L, 1L))
acf.out$lag <- array(lag, dim = c(length(y), 1L, 1L))
acf.out$snames <- paste(acf.out$snames, collapse = ' & ')
if (plot) {
plot(acf.out, ...)
return(invisible(acf.out))
}
else return(acf.out)
}
if (par1 == 0) {
x <- log(x)
} else {
x <- (x ^ par1 - 1) / par1
}
if (par5 == 0) {
y <- log(y)
} else {
y <- (y ^ par5 - 1) / par5
}
if (par2 > 0) x <- diff(x,lag=1,difference=par2)
if (par6 > 0) y <- diff(y,lag=1,difference=par6)
if (par3 > 0) x <- diff(x,lag=par4,difference=par3)
if (par7 > 0) y <- diff(y,lag=par4,difference=par7)
print(x)
print(y)
bitmap(file='test1.png')
(r <- ccf(x,y,na.action=par8,main='Cross Correlation Function',ylab='CCF',xlab='Lag (k)'))
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Cross Correlation Function',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'Value',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Box-Cox transformation parameter (lambda) of X series',header=TRUE)
a<-table.element(a,par1)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Degree of non-seasonal differencing (d) of X series',header=TRUE)
a<-table.element(a,par2)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Degree of seasonal differencing (D) of X series',header=TRUE)
a<-table.element(a,par3)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Seasonal Period (s)',header=TRUE)
a<-table.element(a,par4)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Box-Cox transformation parameter (lambda) of Y series',header=TRUE)
a<-table.element(a,par5)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Degree of non-seasonal differencing (d) of Y series',header=TRUE)
a<-table.element(a,par6)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Degree of seasonal differencing (D) of Y series',header=TRUE)
a<-table.element(a,par7)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'k',header=TRUE)
a<-table.element(a,'rho(Y[t],X[t+k])',header=TRUE)
a<-table.row.end(a)
mylength <- length(r$acf)
myhalf <- floor((mylength-1)/2)
for (i in 1:mylength) {
a<-table.row.start(a)
a<-table.element(a,i-myhalf-1,header=TRUE)
a<-table.element(a,r$acf[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')