3 AT_SETUP([CTABLES parsing])
5 [[DATA LIST LIST NOTABLE /x y z.
6 CTABLES /TABLE=(x + y) > z.
7 CTABLES /TABLE=(x[c] + y[c]) > z.
8 CTABLES /TABLE=(x + y) > z[c].
9 CTABLES /TABLE=x BY y BY z.
10 CTABLES /TABLE=x[c] [ROWPCT.COUNT] > y[c].
11 CTABLES /TABLE=x[c] > y[c] [ROWPCT.COUNT].
13 AT_CHECK([pspp ctables.sps])
16 AT_SETUP([CTABLES one categorical variable])
17 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
18 AT_DATA([ctables.sps],
21 CTABLES /TABLE BY QN1.
22 CTABLES /TABLE BY BY QN1.
24 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
26 ╭────────────────────────────────────────────────────────────────────────┬─────╮
28 ├────────────────────────────────────────────────────────────────────────┼─────┤
29 │ 1. How often do you usually drive a car or other Every day │ 4667│
30 │motor vehicle? Several days a week │ 1274│
31 │ Once a week or less │ 361│
32 │ Only certain times a │ 130│
35 ╰────────────────────────────────────────────────────────────────────────┴─────╯
38 ╭──────────────────────────────────────────────────────────────────────────────╮
39 │ 1. How often do you usually drive a car or other motor vehicle? │
40 ├─────────┬──────────────────┬──────────────────┬────────────────────────┬─────┤
41 │ │ Several days a │ Once a week or │ Only certain times a │ │
42 │Every day│ week │ less │ year │Never│
43 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
44 │ Count │ Count │ Count │ Count │Count│
45 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
46 │ 4667│ 1274│ 361│ 130│ 540│
47 ╰─────────┴──────────────────┴──────────────────┴────────────────────────┴─────╯
59 AT_SETUP([CTABLES one scale variable])
60 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
61 AT_DATA([ctables.sps],
63 CTABLES /TABLE QND1[COUNT, MEAN, STDDEV, MINIMUM, MAXIMUM].
64 CTABLES /TABLE BY QND1.
65 CTABLES /TABLE BY BY QND1.
67 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
69 ╭──────────────────────────┬─────┬────┬─────────────┬───────┬───────╮
70 │ │Count│Mean│Std Deviation│Minimum│Maximum│
71 ├──────────────────────────┼─────┼────┼─────────────┼───────┼───────┤
72 │D1. AGE: What is your age?│ 6930│ 48│ 19│ 16│ 86│
73 ╰──────────────────────────┴─────┴────┴─────────────┴───────┴───────╯
76 ╭──────────────────────────╮
77 │D1. AGE: What is your age?│
78 ├──────────────────────────┤
80 ├──────────────────────────┤
82 ╰──────────────────────────╯
85 D1. AGE: What is your age?