+Sun Apr 17 16:38:00 2005 Ben Pfaff <blp@gnu.org>
+
+ * crosstabs.stat, data-fmts.stat, do-if.stat, do-repeat.stat,
+ gengarbage.c, inpt-pgm.stat, mdfy-vars.stat, means.stat,
+ mtch-file.stat, pcs-if.stat, recode.stat, repeating.stat,
+ reread.data, reread.stat, sys-info.stat, t-test.stat,
+ temporary.stat, time-date.stat, vector.stat: Removed because they
+ were unused.
+
+ * Makefile.am: Removed sort.data references. Fixed up
+ DISTCLEANFILES.
+
Sun Mar 20 14:16:31 2005 Ben Pfaff <blp@gnu.org>
* command/aggregate.sh: Rewrite.
expressions/variables.sh \
expressions/vectors.sh
-noinst_PROGRAMS = gengarbage
-
-noinst_DATA = sort.data
-sort.data: gengarbage$(EXTEXT)
- ./gengarbage | head -1000 > $@
-
EXTRA_DIST = $(TESTS) weighting.data data-list.data list.data \
bugs/computebug.stat bugs/computebug.out \
bugs/recode-copy-bug-1.stat bugs/recode-copy-bug-2.stat \
expressions/randist/uniform.out \
expressions/randist/weibull.out
-DISTCLEANFILES = *.save sort.data pspp.* foo* msgs *.actual
+DISTCLEANFILES = *.save pspp.* foo*
MAINTAINERCLEANFILES = Makefile.in
-
+++ /dev/null
-clear transformations.
-input program.
-loop a=1 to 1000.
-compute a=trunc(uniform(5)).
-compute b=trunc(uniform(5)).
-compute c=trunc(uniform(5)).
-compute d=trunc(uniform(5)).
-compute e=trunc(uniform(5)).
-compute f=trunc(uniform(5)).
-end case.
-end loop.
-end file.
-end input program.
-select if not ((a=1 and e=3) or (c=2)).
-print /all.
-missing value all (2).
-*crosstabs/missing=report/variables=a to f(0,4)/tables=a by e by f/statistics=all/pivot on.
-crosstabs a by e by f/statistics=all/pivot on.
-execute.
+++ /dev/null
-set echo off.
-title 'Test non-binary data input formats'.
-
-data list /a 1-8(a) /* 1
- ahex 9-16(ahex) /* 2
- comma 17-24(comma) /* 3
- dollar 25-32(dollar) /* 4
- f 33-40(f) /* 5
- pibhex 41-48(pibhex) /* 6
- n 49-56(n) /* 7
- e 57-64(e). /* 8
-formats comma(comma8.2) dollar(dollar8.2).
-print /a ahex comma dollar f pibhex n e.
-
-/* This set of data should produce errors:
-/*
-/* - First line should be error-free.
-/* - Second line should have errors for F, PIBHEX, and N fields.
-/* - Third line should have errors for COMMA, DOLLAR, F, and N fields.
-/* - Fourth line should have errors for F and N fields.
-/*
-/* 2 3 4 5 6 7 8 .
-begin data.
-abcdefgh414243441,2,3.4,$1,2,3.4123456.6100023451234567812345678
- 4a4b4c4d1,234.56$1234.56 abcd ghjk -12345671234+56
- 4C4D4E4F1234+56 $1234+56 0 1 abcd 12345e671234e+56
- 555657581234e+561234e+56 1.2 3 000000001234e67 1234-5
-end data.
-
-data list /date 1-32(date) /* 1
- time 33-64(time,4). /* 2
-print /date time.
-
-/* This set of data should produce errors:
-/*
-/* 2
-begin data.
-11-july-1982 12:10:55.59
-8-xii-23 55:56:75.105
-end data.
-
-data list /datetime 1-32(datetime,4) /* 1
- adate 33-64(adate). /* 2
-print /datetime adate.
-/* 2
-begin data.
-7-7-8 12:10:55.5 10/15/1582
-11-jul-1982 9:00 10/01/78
-end data.
-
-data list /jdate 1-32(jdate) /* 1
- dtime 33-64(dtime). /* 2
-print /jdate dtime.
-/* 2
-begin data.
-1582365 10 15:30:00.32
-1996001 0 8:23:59.99
-end data.
-
-data list /wkday 1-32(wkday) /* 1
- month 33-64(month). /* 2
-print /wkday month.
-/* 2
-begin data.
-mon xii
-Saturday 12
-thursday march
- ixiii
-end data.
-
-data list /moyr 1-32(moyr) /* 1
- qyr 33-64(qyr). /* 2
-print /moyr qyr.
-/* 2
-begin data.
-jan 96 4 q 1986
-mar 1896 1q1600
-end data.
-
-data list /wkyr 1-32(wkyr) /* 1
- pct 33-64(pct). /* 2
-print /wkyr pct.
-/* 2
-begin data.
-4 wk 97 105%
-52 wk 1996 55.5%
-end data.
-
-data list /dot 1-32(dot) /* 1
- edate 33-64(edate). /* 2
-formats dot(dot32.3).
-print /dot edate.
-/* 2
-begin data.
-123.456.789,348 1.10.1978
- 30.12.1996
-end data.
-
-formats dot (comma32.3).
-set decimal comma.
-print /dot.
-execute.
-
-set decimal dot.
-print /dot.
-execute.
-
-data list /sdate 1-32(sdate). /* 1
-print /sdate.
-begin data.
-1923/7/3
-1992.5.2
-end data.
-
-data list /date 1-32.
-compute date = date * 86400.
-print /date (date32).
-begin data.
-1
-50000
-102
-1157
-14288
-87365
-109623
-153211
-152371
-144623
-end data.
-
-data list /date 1-32(date).
-compute jdate = date / 86400.
-print /jdate.
-begin data.
-15-OCT-1582
-06-SEP-1719
-24-JAN-1583
-14-DEC-1585
-26-NOV-1621
-25-DEC-1821
-03-DEC-1882
-06-APR-2002
-18-DEC-1999
-01-OCT-1978
-end data.
-
-set cca 'NPX,PFX,SFX,NSX'.
-set ccb 'NPX.PFX.SFX.NSX'.
-set ccc '-,$,,'.
-set ccd '(.SFR..)'.
-set cce 'asld,adl,lfj,lfs'.
-
-data list /cc 1-32(f).
-print /'cca: ' cc (cca32.2).
-print /'ccb: ' cc (ccb32.2).
-print /'ccc: ' cc (ccc32.2).
-print /'ccd: ' cc (ccd32.2).
-print /'cce: ' cc (cce32.2).
-begin data.
-78.19
--78.19
-123456789.12
-1e23
-end data.
-
-print /'cca: ' cc (cca16.2).
-print /'ccb: ' cc (ccb16.2).
-print /'ccc: ' cc (ccc16.2).
-print /'ccd: ' cc (ccd16.2).
-print /'cce: ' cc (cce16.2).
-execute.
-
-print /'cca: ' cc (cca8.2).
-print /'ccb: ' cc (ccb8.2).
-print /'ccc: ' cc (ccc8.2).
-print /'ccd: ' cc (ccd8.2).
-print /'cce: ' cc (cce8.2).
-execute.
-
+++ /dev/null
-title 'Test DO IF control structure'.
-
-data list /x y z 1-6.
-begin data.
-000099
-019900
-019820
-001089
-020000
-end data.
-do if x~=2.
-loop i=1 to x.
-do if x=0.
-print /i x z.
-else.
-do if x=1.
-print /i x y.
-else.
-print /i 'Huh?'.
-end if.
-end if.
-end loop.
-end if.
-execute.
+++ /dev/null
-title 'Test DO REPEAT control structure'.
-
-set echo on.
-data list file='list.data'/var00001 to var00005 1-5.
-string s1 to s5(a8).
-vector s=s1 to s5.
-do repeat v=var1 to var5/r=region1 to region5/x=0 to 4
- /y=10 to 6/z='abcd',x'010203','alksdj'+'fklasdjfladsf','al''ksj','iouio'
- /longname=var00001 to var00005.
-compute v=2**x.
-compute v=x.
-compute r=v.
-compute longname=r.
-compute s(x+1)=z.
-end repeat print.
-list.
-
+++ /dev/null
-/* gengarbage - Generates 127-character lines of random digits.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- Written by Ben Pfaff <blp@gnu.org>.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#endif
-
-int
-main (void)
-{
- srand (time (0));
- for (;;)
- {
- int c;
-
- for (c = 0; c < 127; c++)
- putchar ('0' + rand() % 10);
- putchar ('\n');
- }
- exit (EXIT_SUCCESS);
-}
+++ /dev/null
-/*
-/*
-/* Tests for INPUT PROGRAM.
-/*
-/*
-
-remark EOF
-----------------------------------------------------------------------
-Testing use of INPUT PROGRAM.
-----------------------------------------------------------------------
-EOF
-input program.
-data list free/A #B.
-end case.
-data list free/C D.
-end case.
-data list fixed/#E 2.
-end case.
-end input program.
-list.
-
-begin data.
-1 2 3 4 5
-6 7 8 9 0
-end data.
-
+++ /dev/null
-title 'Test MODIFY VARS, RENAME VARIABLES'.
-
-/* Note that these are not quite in alphabetic order.
-data list /a b c d e f g h i j k m n o p l q r s t u v w x y z 1-26 (a).
-
-/* Dummy data that's not actually examined.
-begin data.
-ABCDEFGHIJKLMNOPQRSTUVWXYZ
-NOPQRSTUVWXYZABCDEFGHIJKLM
-end data.
-
-/* This should display z y x w s q p n m l k j i h t7 t6 t5 t4 t3 t2 t1.
-modify vars /reorder=backward alpha/drop o r t u v/rename (a to g=t1 to t7).
-display var.
-
-/* This should display z y x w s q p n m l x14 x13 x12 x11 t1 t6 t5 t4 t3
-/* t2 t7.
-rename variables (t1=t7)(t7=t1)(h i j k=x11 to x14).
-display var.
-
-/* The command below should fail with an error message.
-rename variables (t1=t2)(t2=t2).
-
-/* This should display y x w s q p n m l x14 x13 x12 x11 t1 t6 t5 t3 t7.
-modify vars /reorder=forward positional/keep y to t5 t3 x14 t7.
-display var.
-
-/* This should display t7 x11 q s x y. */
-modify vars /reorder=backward positional/keep x s y x11 t7 q.
-display var.
-
+++ /dev/null
-title 'Preliminary test for MEANS procedure'.
-
-data list /v1 to v4 1-4.
-begin data.
-1234
-321
-2 13
-4121
-1104
-03 4
-0193
-end data.
-means variables=v1(1,4) v2(1,9) v3(lo,hi)
- /tables=v1 by v2 by v3.
+++ /dev/null
-title 'Test MATCH FILES'.
-data list /x a b c 1-4.
-begin data.
-0243
-1983
-2924
-2853
-3195
-4862
-2056
-end data.
-save 'mtf-1.save'.
-
-data list /x d e f 1-4.
-begin data.
-0837
-1834
-2843
-2049
-3853
-5029
-2853
-end data.
-save 'mtf-2.save'.
-
-data list /x g h i 1-4.
-begin data.
-0743
-1823
-6845
-2875
-3945
-4341
-2723
-end data.
-
-match files /file='mtf-1.save' /file='mtf-2.save' /table=* /by x.
-list.
-
-data list /x g h i 1-4.
-begin data.
-0743
-1823
-6845
-2875
-3945
-4341
-2723
-end data.
-
-match files /file='mtf-1.save' /file='mtf-2.save' /file=* /by x.
-list.
-
-match files/file='mtf-1.save' /file='mtf-2.save'/by x.
-list.
+++ /dev/null
-title 'Test PROCESS IF utility'.
-
-data list /x 1-2.
-begin data.
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-end data.
-process if mod(x,2) ~= 0.
-list.
-compute x = x*3.
-process if mod(x,2) = 0.
-list.
-
+++ /dev/null
-title 'Test RECODE transformation'.
-
-data list /A B 1-20(a).
-begin data.
-12345678901234567890
-a b
-jkl; aklsdf
-aklsd ioqeur
- ioquer pasdflk
-end data.
-*recode A B(1,2,3,4=5)(5 thru hi=9)(lo thru 10=4) into A D
- /A B(lo thru hi=copy)(sysmis=0)(else=sysmis) into C D.
-string c d(a10).
-leave c d.
-recode A B('a'='b')('jkl;'='jkl;p')('ioqeur'='sdjfkla') into C D.
-*recode A B(1,2,3,4="asdf")(else="xyzw")(sysmis="bdfg") into C D.
-*recode A B("asdf"=copy)(convert)("lkjf"=sysmis)(convert)(else=123) into C D.
-*recode A B(1,3,5,6,7=COPY)(SYSMIS=5e5) into C D.
-*recode a (convert)('xx'=50) into b.
-list.
-
+++ /dev/null
-title 'Test REPEATING DATA utility'.
-
-input program.
-data list /x 1 n 3.
-repeating data starts=11-20 /continues=2-11 /length=10 /occurs=n
- /id=1=x /data=name 1-5 (a) number 6-10.
-end input program.
-
-begin data.
-1 3 foo 1
-1bar 2
-1baz 3
-end data.
-
-list.
-
+++ /dev/null
-5510ACME 5
- 5MISC 8901
-8974ACME 9
-1928ACME 4
- 6MISC 8973
+++ /dev/null
-title 'Test REREAD transformation'.
-
-file handle INPUT /name='reread.data'.
-
-input program.
- data list file=INPUT/BRAND 5-10(a).
- do if(BRAND='ACME').
- reread.
- data list /PART 1-4 COUNT 11-15.
- else if(BRAND='MISC').
- reread.
- data list /PART 11-15 COUNT 1-4.
- end if.
- end case.
-end input program.
-list.
+++ /dev/null
-title 'Test SYSFILE INFO, DISPLAY utilities'.
-
-/* Run file-label.stat before running this syntax file, as it
-/* creates foo.save.
-sysfile info file='foo.save'.
-
-get 'foo.save'.
-display names.
-display index.
-display labels.
-display variables.
-display dictionary.
-
+++ /dev/null
-title 'Preliminary test for T-TEST procedure'.
-
-data list /v1 to v4 1-4.
-begin data.
-1234
-321
-2 13
-4121
-1104
-03 4
-0193
-end data.
-t-test v1 v2 with v3 v4 (paired).
+++ /dev/null
-title 'Test TEMPORARY transformation'.
-
-set echo on/screen on.
-data list /z 1 x 2.
-formats x(f3).
-split file by z.
-list.
-begin data.
-12
-13
-14
-15
-16
-23
-24
-25
-26
-27
-28
-end data.
-compute x=x+1.
-temporary.
-compute x=x+1.
-compute y=x+1.
-sel if y<7.
-descriptives x y.
-list.
-compute x=x-10.
-list.
+++ /dev/null
-title 'Test time and date input and output formats'.
-
-data list fixed
- /a(date20)/b(adate20)/c(jdate20)/d(qyr20)/e(moyr20)/f(wkyr20)/g(wkday20)
- /h(month20)/i(time20.2)/j(dtime20.2)/k(datetime24.2).
-begin data.
-01-oct-78
-10/1/78
-78101
-3q96
-nov 52
-38wk23
-saturday
-xi
-10:01
-4 5:12.9
-01-feb-1903 04:05:06.07
-end data.
-print /a to e.
-print /f to k.
-execute.
-
-data list /x 1.
-begin data.
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-end data.
-compute y=$time.
-formats y(datetime25).
-list.
-compute z=$time.
-formats z(datetime25).
-list.
-compute p=$time.
-formats p(datetime25).
-list.
-
+++ /dev/null
-title 'Test VECTOR utility'.
-
-data list /c 1(a).
-begin data.
-5
-3
-4
-1
-2
-end data.
-
-string x1 to x5 y1 to y5(a1).
-vector x=x1 to x5.
-*formats all(f1).
-compute x(number(c))=c.
-leave x1 to x5.
-list.
-
-vector x=x1 to x5.
-vector y=y1 to y5.
-*formats all(f1).
-compute y(number(c))=x(number(c)+1).
-display vector.
-list.