4 dnl TOTAL interaction with PCOMPUTE, e.g. the following
6 dnl /PCOMPUTE &all_drivers=EXPR([1 THRU 2] + [3 THRU 4])
7 dnl /PPROPERTIES &all_drivers LABEL='All Drivers'
8 dnl /PCOMPUTE &pct_not_drivers=EXPR([5] / ([1 THRU 2] + [3 THRU 4] + [5]) * 100)
9 dnl /PPROPERTIES &pct_not_drivers LABEL='% Not Drivers' FORMAT=COUNT PCT40.1
10 dnl /TABLE=qn1 BY qns3a
11 dnl /CATEGORIES VARIABLES=qns3a TOTAL=YES
12 dnl /CATEGORIES VARIABLES=qn1 [1 THRU 2, SUBTOTAL='Frequent Drivers',
13 dnl 3 THRU 4, SUBTOTAL='Infrequent Drivers',
14 dnl &all_drivers, 5, &pct_not_drivers,
15 dnl MISSING, SUBTOTAL='Not Drivers or Missing'].
16 dnl yields gaps in the Total column:
17 dnl ╭─────────────────────────────────────────────────────────────────────────┬──────────────────╮
18 dnl │ │ S3a. GENDER: │
19 dnl │ ├─────┬──────┬─────┤
20 dnl │ │ Male│Female│Total│
21 dnl │ ├─────┼──────┼─────┤
22 dnl │ │Count│ Count│Count│
23 dnl ├─────────────────────────────────────────────────────────────────────────┼─────┼──────┼─────┤
24 dnl │ 1. How often do you usually drive a car or other Every day │ 2305│ 2362│ 4667│
25 dnl │motor vehicle? Several days a week │ 440│ 834│ 1274│
26 dnl │ Frequent Drivers │ 2745│ 3196│ │
27 dnl │ Once a week or less │ 125│ 236│ 361│
28 dnl │ Only certain times a │ 58│ 72│ 130│
30 dnl │ Infrequent Drivers │ 183│ 308│ │
31 dnl │ All Drivers │ 2928│ 3504│ │
32 dnl │ Never │ 192│ 348│ 540│
33 dnl │ % Not Drivers │ 6.2%│ 9.0%│ │
34 dnl │ Don't know │ 3│ 5│ 8│
35 dnl │ Refused │ 9│ 10│ 19│
36 dnl │ Not Drivers or │ 204│ 363│ │
38 dnl ╰─────────────────────────────────────────────────────────────────────────┴─────┴──────┴─────╯
39 dnl Features not yet implemented:
40 dnl - Multiple response sets
41 dnl - MRSETS subcommand.
42 dnl - CATEGORIES: Special case for explicit category specifications and multiple dichotomy sets.
45 dnl - Summary functions:
46 dnl * .LCL and .UCL suffixes.
49 dnl * Data-dependent sorting.
51 AT_SETUP([CTABLES parsing])
52 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
53 AT_DATA([ctables.sps],
56 /FORMAT MINCOLWIDTH=10 MAXCOLWIDTH=20 UNITS=POINTS EMPTY=ZERO MISSING="x"
57 /FORMAT MINCOLWIDTH=DEFAULT MAXCOLWIDTH=DEFAULT UNITS=INCHES EMPTY=BLANK MISSING="."
58 /FORMAT UNITS=CM EMPTY="(-)"
59 /VLABELS VARIABLES=qn1 DISPLAY=DEFAULT
60 /VLABELS VARIABLES=qn17 DISPLAY=NAME
61 /VLABELS VARIABLES=qns3a DISPLAY=LABEL
62 /VLABELS VARIABLES=qnd1 DISPLAY=BOTH
63 /VLABELS VARIABLES=qn20 DISPLAY=NONE
64 /MRSETS COUNTDUPLICATES=NO
65 /MRSETS COUNTDUPLICATES=YES
68 /WEIGHT VARIABLE=qns3a
70 /HIDESMALLCOUNTS COUNT=10
72 /SLABELS POSITION=COLUMN VISIBLE=YES
73 /SLABELS VISIBLE=NO POSITION=ROW
74 /SLABELS POSITION=LAYER
76 /CLABELS ROWLABELS=OPPOSITE
78 /CATEGORIES VARIABLES=qn1 qn17
79 ORDER=A KEY=VALUE MISSING=INCLUDE TOTAL=YES LABEL="xyzzy"
80 POSITION=BEFORE EMPTY=INCLUDE.
81 CTABLES /TABLE qnsa1 /CLABELS ROWLABELS=LAYER.
82 CTABLES /TABLE qnsa1 /CLABELS COLLABELS=OPPOSITE.
83 CTABLES /TABLE qnsa1 /CLABELS COLLABELS=LAYER.
85 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
88 ╭───────────────────┬────┬────╮
90 ├───────────────────┼────┼────┤
91 │Sa1. SAMPLE SOURCE:│5392│1607│
92 ╰───────────────────┴────┴────╯
96 ╭───────────────────┬─────╮
98 ├───────────────────┼─────┤
99 │Sa1. SAMPLE SOURCE:│ 5392│
100 ╰───────────────────┴─────╯
103 ╭────────────────────────┬─────╮
105 ├────────────────────────┼─────┤
106 │Sa1. SAMPLE SOURCE: RDD │ 5392│
108 ╰────────────────────────┴─────╯
111 ╭────────────────────────┬─────╮
113 ├────────────────────────┼─────┤
114 │Sa1. SAMPLE SOURCE: RDD │ 5392│
116 ╰────────────────────────┴─────╯
120 AT_SETUP([CTABLES parsing - negative])
121 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
122 AT_DATA([ctables.sps],
125 CTABLES /FORMAT MINCOLWIDTH='foo'.
126 CTABLES /TABLE qn1 [**].
127 CTABLES /TABLE qn1 [NOTAFUNCTION].
130 CTABLES /TABLE NOTAVAR.
132 CTABLES /TABLE string[S].
133 CTABLES /TABLE qn1 [PTILE 101].
134 CTABLES /TABLE qn1 [MEAN F0.1].
135 CTABLES /TABLE qn1 [MEAN NEGPAREN1.2].
136 CTABLES /TABLE qn1 [MEAN NEGPAREN3.4].
137 CTABLES /TABLE qn1 [MEAN TOTALS].
138 CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
139 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [SUBTOTAL=x].
140 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [LO **].
141 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [LO THRU x].
142 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1 THRU **].
143 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['x' THRU **].
144 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&**].
145 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&x].
146 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=PTILE(qn1, 101).
147 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1.
148 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=MEAN.
149 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 MISSING=**.
150 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 TOTAL=**.
151 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 LABEL=**.
152 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 POSITION=**.
153 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 EMPTY=**.
154 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 **.
155 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1,2,3] **.
156 CTABLES /PCOMPUTE &k=EXPR(SUBTOTAL[0]).
157 CTABLES /PCOMPUTE &k=EXPR(SUBTOTAL[1**]).
158 CTABLES /PCOMPUTE &k=EXPR([LO **]).
159 CTABLES /PCOMPUTE &k=EXPR([LO THRU **]).
160 CTABLES /PCOMPUTE &k=EXPR([1 THRU **]).
161 CTABLES /PCOMPUTE &k=EXPR([1**]).
162 CTABLES /PCOMPUTE &k=EXPR((1x)).
163 CTABLES /PCOMPUTE **k.
164 CTABLES /PCOMPUTE &1.
165 CTABLES /PCOMPUTE &k**.
166 CTABLES /PCOMPUTE &k=**.
167 CTABLES /PCOMPUTE &k=EXPR**.
168 CTABLES /PCOMPUTE &k=EXPR(1x).
169 CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
170 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k FORMAT=NOTAFUNCTION.
171 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k FORMAT=PTILE **.
172 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k LABEL=**.
173 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k HIDESOURCECATS=**.
174 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k **.
175 CTABLES /FORMAT EMPTY=**.
176 CTABLES /FORMAT MISSING=**.
178 CTABLES /FORMAT MINCOLWIDTH=20 MAXCOLWIDTH=10/.
180 CTABLES /VLABELS VARIABLES=NOTAVAR.
181 CTABLES /VLABELS VARIABLES=qn1 **.
182 CTABLES /VLABELS VARIABLES=qn1 DISPLAY=**.
184 CTABLES /MRSETS COUNTDUPLICATES=**.
185 CTABLES /SMISSING **.
187 CTABLES /WEIGHT VARIABLE=NOTAVAR.
188 CTABLES /HIDESMALLCOUNTS COUNT=1.
190 CTABLES /HIDESMALLCOUNTS COUNT=2.
191 CTABLES /TABLE qn1**.
192 CTABLES /TABLE qn1 /SLABELS POSITION=**.
193 CTABLES /TABLE qn1 /SLABELS VISIBLE=**.
194 CTABLES /TABLE qn1 /SLABELS **.
195 CTABLES /TABLE qn1 /CLABELS ROWLABELS=**.
196 CTABLES /TABLE qn1 /CLABELS COLLABELS=**.
197 CTABLES /TABLE qn1 /CLABELS **.
198 CTABLES /TABLE qn1 /CRITERIA **.
199 CTABLES /TABLE qn1 /CRITERIA CILEVEL=101.
200 CTABLES /TABLE qn1 /TITLES **.
201 CTABLES /TABLE qn1 /SIGTEST TYPE=**.
202 CTABLES /TABLE qn1 /SIGTEST ALPHA=**.
203 CTABLES /TABLE qn1 /SIGTEST INCLUDEMRSETS=**.
204 CTABLES /TABLE qn1 /SIGTEST CATEGORIES=**.
205 CTABLES /TABLE qn1 /SIGTEST **.
206 CTABLES /TABLE qn1 /COMPARETEST TYPE=**.
207 CTABLES /TABLE qn1 /COMPARETEST ALPHA=**.
208 CTABLES /TABLE qn1 /COMPARETEST ALPHA=0,5.
209 CTABLES /TABLE qn1 /COMPARETEST ADJUST=**.
210 CTABLES /TABLE qn1 /COMPARETEST INCLUDEMRSETS=**.
211 CTABLES /TABLE qn1 /COMPARETEST MEANSVARIANCE=**.
212 CTABLES /TABLE qn1 /COMPARETEST CATEGORIES=**.
213 CTABLES /TABLE qn1 /COMPARETEST MERGE=**.
214 CTABLES /TABLE qn1 /COMPARETEST STYLE=**.
215 CTABLES /TABLE qn1 /COMPARETEST SHOWSIG=**.
216 CTABLES /TABLE qn1 /COMPARETEST **.
217 CTABLES /TABLE qn1 /FORMAT.
218 CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CLABELS COLLABELS=OPPOSITE.
219 CTABLES /TABLE qn20 > qnd1.
220 CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
221 NUMERIC datetime (DATETIME17.0).
222 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=datetime ['123'].
224 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [1],
225 [[ctables.sps:2.8: error: CTABLES: Syntax error expecting `/'.
229 ctables.sps:3.29-3.33: error: CTABLES: Syntax error expecting non-negative
230 number for MINCOLWIDTH.
231 3 | CTABLES /FORMAT MINCOLWIDTH='foo'.
234 ctables.sps:4.21-4.22: error: CTABLES: Syntax error expecting identifier.
235 4 | CTABLES /TABLE qn1 [**].
238 ctables.sps:5.21-5.32: error: CTABLES: Syntax error expecting summary function
240 5 | CTABLES /TABLE qn1 [NOTAFUNCTION].
243 ctables.sps:6.20: error: CTABLES: Syntax error expecting `@:}@'.
244 6 | CTABLES /TABLE @{:@qn1.
247 ctables.sps:7.16-7.17: error: CTABLES: Syntax error expecting identifier.
248 7 | CTABLES /TABLE **.
251 ctables.sps:8.16-8.22: error: CTABLES: NOTAVAR is not a variable name.
252 8 | CTABLES /TABLE NOTAVAR.
255 ctables.sps:10.16-10.24: error: CTABLES: Cannot use string variable string as a
257 10 | CTABLES /TABLE string[S].
260 ctables.sps:11.27-11.29: error: CTABLES: Syntax error expecting number between 0
262 11 | CTABLES /TABLE qn1 [PTILE 101].
265 ctables.sps:12: error: CTABLES: Output format F0.1 specifies width 0, but F
266 requires a width between 1 and 40.
268 ctables.sps:13.26-13.36: error: CTABLES: Output format NEGPAREN requires width 2
270 13 | CTABLES /TABLE qn1 [MEAN NEGPAREN1.2].
273 ctables.sps:14.26-14.36: error: CTABLES: Output format NEGPAREN requires width
274 greater than decimals.
275 14 | CTABLES /TABLE qn1 [MEAN NEGPAREN3.4].
278 ctables.sps:15.21-15.24: error: CTABLES: Summary function MEAN applies only to
280 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
283 ctables.sps:15.16-15.18: note: CTABLES: 'QN1' is not a scale variable.
284 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
287 ctables.sps:15.32: error: CTABLES: Syntax error expecting `@<:@'.
288 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
291 ctables.sps:16.21-16.24: error: CTABLES: Summary function MEAN applies only to
293 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
296 ctables.sps:16.16-16.18: note: CTABLES: 'QN1' is not a scale variable.
297 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
300 ctables.sps:16.40: error: CTABLES: Syntax error expecting `@:>@'.
301 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
304 ctables.sps:17.56: error: CTABLES: Syntax error expecting string.
305 17 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [SUBTOTAL=x].
308 ctables.sps:18.50-18.51: error: CTABLES: Syntax error expecting THRU.
309 18 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [LO **].
312 ctables.sps:19.55: error: CTABLES: Syntax error expecting number.
313 19 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [LO THRU x].
316 ctables.sps:20.54-20.55: error: CTABLES: Syntax error expecting number.
317 20 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1 THRU **].
320 ctables.sps:21.56-21.57: error: CTABLES: Syntax error expecting string.
321 21 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['x' THRU **].
324 ctables.sps:22.48-22.49: error: CTABLES: Syntax error expecting identifier.
325 22 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&**].
328 ctables.sps:23.47-23.48: error: CTABLES: Unknown postcompute &x.
329 23 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&x].
332 ctables.sps:24.61-24.63: error: CTABLES: Syntax error expecting number between 0
334 24 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=PTILE(qn1, 101).
337 ctables.sps:25.58: error: CTABLES: Syntax error expecting `@:}@'.
338 25 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1.
341 ctables.sps:26.54: error: CTABLES: Syntax error expecting `@{:@'.
342 26 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=MEAN.
345 ctables.sps:27.54-27.55: error: CTABLES: Syntax error expecting INCLUDE or
347 27 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 MISSING=**.
350 ctables.sps:28.52-28.53: error: CTABLES: Syntax error expecting YES or NO.
351 28 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 TOTAL=**.
354 ctables.sps:29.52-29.53: error: CTABLES: Syntax error expecting string.
355 29 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 LABEL=**.
358 ctables.sps:30.55-30.56: error: CTABLES: Syntax error expecting BEFORE or AFTER.
359 30 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 POSITION=**.
362 ctables.sps:31.52-31.53: error: CTABLES: Syntax error expecting INCLUDE or
364 31 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 EMPTY=**.
367 ctables.sps:32.46-32.47: error: CTABLES: Syntax error expecting ORDER, KEY,
368 MISSING, TOTAL, LABEL, POSITION, or EMPTY.
369 32 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 **.
372 ctables.sps:33.54-33.55: error: CTABLES: Syntax error expecting TOTAL, LABEL,
374 33 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1,2,3] **.
377 ctables.sps:34.36: error: CTABLES: Syntax error expecting positive integer for
379 34 | CTABLES /PCOMPUTE &k=EXPR(SUBTOTAL[0]).
382 ctables.sps:35.37-35.38: error: CTABLES: Syntax error expecting `@:>@'.
383 35 | CTABLES /PCOMPUTE &k=EXPR(SUBTOTAL[1**]).
386 ctables.sps:36.31-36.32: error: CTABLES: Syntax error expecting THRU.
387 36 | CTABLES /PCOMPUTE &k=EXPR([LO **]).
390 ctables.sps:37.36-37.37: error: CTABLES: Syntax error expecting number.
391 37 | CTABLES /PCOMPUTE &k=EXPR([LO THRU **]).
394 ctables.sps:38.35-38.36: error: CTABLES: Syntax error expecting number.
395 38 | CTABLES /PCOMPUTE &k=EXPR([1 THRU **]).
398 ctables.sps:39.29-39.30: error: CTABLES: Syntax error expecting `@:>@'.
399 39 | CTABLES /PCOMPUTE &k=EXPR([1**]).
402 ctables.sps:40.29: error: CTABLES: Syntax error expecting `@:}@'.
403 40 | CTABLES /PCOMPUTE &k=EXPR((1x)).
406 ctables.sps:41.19-41.20: error: CTABLES: Syntax error expecting &.
407 41 | CTABLES /PCOMPUTE **k.
410 ctables.sps:42.20: error: CTABLES: Syntax error expecting identifier.
411 42 | CTABLES /PCOMPUTE &1.
414 ctables.sps:43.21-43.22: error: CTABLES: Syntax error expecting `='.
415 43 | CTABLES /PCOMPUTE &k**.
418 ctables.sps:44.22-44.23: error: CTABLES: Syntax error expecting EXPR.
419 44 | CTABLES /PCOMPUTE &k=**.
422 ctables.sps:45.26-45.27: error: CTABLES: Syntax error expecting `@{:@'.
423 45 | CTABLES /PCOMPUTE &k=EXPR**.
426 ctables.sps:46.28: error: CTABLES: Syntax error expecting `@:}@'.
427 46 | CTABLES /PCOMPUTE &k=EXPR(1x).
430 ctables.sps:47.31-47.49: warning: CTABLES: New definition of &k will override
431 the previous definition.
432 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
433 | ^~~~~~~~~~~~~~~~~~~
435 ctables.sps:47.10-47.28: note: CTABLES: This is the previous definition.
436 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
437 | ^~~~~~~~~~~~~~~~~~~
439 ctables.sps:47.50: error: CTABLES: Syntax error expecting `/'.
440 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
443 ctables.sps:48.53-48.64: error: CTABLES: Syntax error expecting summary function
445 48 | CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k FORMAT=NOTAFUNCTION.
448 ctables.sps:49.59-49.60: error: CTABLES: Syntax error expecting number between 0
450 49 | CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k FORMAT=PTILE **.
453 ctables.sps:50.52-50.53: error: CTABLES: Syntax error expecting string.
454 50 | CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k LABEL=**.
457 ctables.sps:51.61-51.62: error: CTABLES: Syntax error expecting YES or NO.
458 51 | CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k HIDESOURCECATS=**.
461 ctables.sps:52.46-52.47: error: CTABLES: Syntax error expecting LABEL, FORMAT,
463 52 | CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k **.
466 ctables.sps:53.23-53.24: error: CTABLES: Syntax error expecting string.
467 53 | CTABLES /FORMAT EMPTY=**.
470 ctables.sps:54.25-54.26: error: CTABLES: Syntax error expecting string.
471 54 | CTABLES /FORMAT MISSING=**.
474 ctables.sps:55.17-55.18: error: CTABLES: Syntax error expecting MINCOLWIDTH,
475 MAXCOLWIDTH, UNITS, EMPTY, or MISSING.
476 55 | CTABLES /FORMAT **.
479 ctables.sps:56.17-56.45: error: CTABLES: MINCOLWIDTH must not be greater than
481 56 | CTABLES /FORMAT MINCOLWIDTH=20 MAXCOLWIDTH=10/.
482 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
484 ctables.sps:57.18-57.19: error: CTABLES: Syntax error expecting VARIABLES.
485 57 | CTABLES /VLABELS **.
488 ctables.sps:58.28-58.34: error: CTABLES: NOTAVAR is not a variable name.
489 58 | CTABLES /VLABELS VARIABLES=NOTAVAR.
492 ctables.sps:59.32-59.33: error: CTABLES: Syntax error expecting DISPLAY.
493 59 | CTABLES /VLABELS VARIABLES=qn1 **.
496 ctables.sps:60.40-60.41: error: CTABLES: Syntax error expecting DEFAULT, NAME,
497 LABEL, BOTH, or NONE.
498 60 | CTABLES /VLABELS VARIABLES=qn1 DISPLAY=**.
501 ctables.sps:61.17-61.18: error: CTABLES: Syntax error expecting COUNTDUPLICATES.
502 61 | CTABLES /MRSETS **.
505 ctables.sps:62.33-62.34: error: CTABLES: Syntax error expecting YES or NO.
506 62 | CTABLES /MRSETS COUNTDUPLICATES=**.
509 ctables.sps:63.19-63.20: error: CTABLES: Syntax error expecting VARIABLE or
511 63 | CTABLES /SMISSING **.
514 ctables.sps:64.17-64.18: error: CTABLES: Syntax error expecting VARIABLE.
515 64 | CTABLES /WEIGHT **.
518 ctables.sps:65.26-65.32: error: CTABLES: NOTAVAR is not a variable name.
519 65 | CTABLES /WEIGHT VARIABLE=NOTAVAR.
522 ctables.sps:66.32: error: CTABLES: Syntax error expecting integer 2 or greater
523 for HIDESMALLCOUNTS COUNT.
524 66 | CTABLES /HIDESMALLCOUNTS COUNT=1.
527 ctables.sps:67.10-67.13: error: CTABLES: Syntax error expecting one of the
528 following: FORMAT, VLABELS, MRSETS, SMISSING, PCOMPUTE, PPROPERTIES, WEIGHT,
529 HIDESMALLCOUNTS, TABLE.
533 ctables.sps:68.33: error: CTABLES: Syntax error expecting `/'.
534 68 | CTABLES /HIDESMALLCOUNTS COUNT=2.
537 ctables.sps:69.19-69.20: error: CTABLES: Syntax error expecting `/'.
538 69 | CTABLES /TABLE qn1**.
541 ctables.sps:70.38-70.39: error: CTABLES: Syntax error expecting COLUMN, ROW, or
543 70 | CTABLES /TABLE qn1 /SLABELS POSITION=**.
546 ctables.sps:71.37-71.38: error: CTABLES: Syntax error expecting YES or NO.
547 71 | CTABLES /TABLE qn1 /SLABELS VISIBLE=**.
550 ctables.sps:72.29-72.30: error: CTABLES: Syntax error expecting POSITION or
552 72 | CTABLES /TABLE qn1 /SLABELS **.
555 ctables.sps:73.39-73.40: error: CTABLES: Syntax error expecting OPPOSITE or
557 73 | CTABLES /TABLE qn1 /CLABELS ROWLABELS=**.
560 ctables.sps:74.39-74.40: error: CTABLES: Syntax error expecting OPPOSITE or
562 74 | CTABLES /TABLE qn1 /CLABELS COLLABELS=**.
565 ctables.sps:75.29-75.30: error: CTABLES: Syntax error expecting AUTO, ROWLABELS,
567 75 | CTABLES /TABLE qn1 /CLABELS **.
570 ctables.sps:76.30-76.31: error: CTABLES: Syntax error expecting CILEVEL.
571 76 | CTABLES /TABLE qn1 /CRITERIA **.
574 ctables.sps:77.38-77.40: error: CTABLES: Syntax error expecting number in
575 @<:@0,100@:}@ for CILEVEL.
576 77 | CTABLES /TABLE qn1 /CRITERIA CILEVEL=101.
579 ctables.sps:78.28-78.29: error: CTABLES: Syntax error expecting CAPTION, CORNER,
581 78 | CTABLES /TABLE qn1 /TITLES **.
584 ctables.sps:79.34-79.35: error: CTABLES: Syntax error expecting CHISQUARE.
585 79 | CTABLES /TABLE qn1 /SIGTEST TYPE=**.
588 ctables.sps:80.35-80.36: error: CTABLES: Syntax error expecting number in @<:@0,1@:}@
590 80 | CTABLES /TABLE qn1 /SIGTEST ALPHA=**.
593 ctables.sps:81.43-81.44: error: CTABLES: Syntax error expecting YES or NO.
594 81 | CTABLES /TABLE qn1 /SIGTEST INCLUDEMRSETS=**.
597 ctables.sps:82.40-82.41: error: CTABLES: Syntax error expecting ALLVISIBLE or
599 82 | CTABLES /TABLE qn1 /SIGTEST CATEGORIES=**.
602 ctables.sps:83.29-83.30: error: CTABLES: Syntax error expecting TYPE, ALPHA,
603 INCLUDEMRSETS, or CATEGORIES.
604 83 | CTABLES /TABLE qn1 /SIGTEST **.
607 ctables.sps:84.38-84.39: error: CTABLES: Syntax error expecting PROP or MEAN.
608 84 | CTABLES /TABLE qn1 /COMPARETEST TYPE=**.
611 ctables.sps:85.39-85.40: error: CTABLES: Syntax error expecting number in (0,1)
613 85 | CTABLES /TABLE qn1 /COMPARETEST ALPHA=**.
616 ctables.sps:86.39: error: CTABLES: Syntax error expecting number in (0,1) for
618 86 | CTABLES /TABLE qn1 /COMPARETEST ALPHA=0,5.
621 ctables.sps:87.40-87.41: error: CTABLES: Syntax error expecting BONFERRONI, BH,
623 87 | CTABLES /TABLE qn1 /COMPARETEST ADJUST=**.
626 ctables.sps:88.47-88.48: error: CTABLES: Syntax error expecting YES or NO.
627 88 | CTABLES /TABLE qn1 /COMPARETEST INCLUDEMRSETS=**.
630 ctables.sps:89.47-89.48: error: CTABLES: Syntax error expecting ALLCATS or
632 89 | CTABLES /TABLE qn1 /COMPARETEST MEANSVARIANCE=**.
635 ctables.sps:90.44-90.45: error: CTABLES: Syntax error expecting ALLVISIBLE or
637 90 | CTABLES /TABLE qn1 /COMPARETEST CATEGORIES=**.
640 ctables.sps:91.39-91.40: error: CTABLES: Syntax error expecting YES or NO.
641 91 | CTABLES /TABLE qn1 /COMPARETEST MERGE=**.
644 ctables.sps:92.39-92.40: error: CTABLES: Syntax error expecting APA or SIMPLE.
645 92 | CTABLES /TABLE qn1 /COMPARETEST STYLE=**.
648 ctables.sps:93.41-93.42: error: CTABLES: Syntax error expecting YES or NO.
649 93 | CTABLES /TABLE qn1 /COMPARETEST SHOWSIG=**.
652 ctables.sps:94.33-94.34: error: CTABLES: Syntax error expecting one of the
653 following: TYPE, ALPHA, ADJUST, INCLUDEMRSETS, MEANSVARIANCE, CATEGORIES, MERGE,
655 94 | CTABLES /TABLE qn1 /COMPARETEST **.
658 ctables.sps:95.21-95.26: error: CTABLES: Syntax error expecting TABLE, SLABELS,
659 CLABELS, CRITERIA, CATEGORIES, TITLES, SIGTEST, or COMPARETEST.
660 95 | CTABLES /TABLE qn1 /FORMAT.
663 ctables.sps:95.21-95.26: note: CTABLES: This subcommand must appear before
665 95 | CTABLES /TABLE qn1 /FORMAT.
668 ctables.sps:96: error: CTABLES: ROWLABELS and COLLABELS may not both be
671 ctables.sps:96.21-96.46: note: CTABLES: This is the first specification.
672 96 | CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CLABELS
674 | ^~~~~~~~~~~~~~~~~~~~~~~~~~
676 ctables.sps:96.49-96.74: note: CTABLES: This is the second specification.
677 96 | CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CLABELS
680 ^~~~~~~~~~~~~~~~~~~~~~~~~~
682 ctables.sps:97.16-97.26: error: CTABLES: Cannot nest scale variables.
683 97 | CTABLES /TABLE qn20 > qnd1.
686 ctables.sps:97.16-97.19: note: CTABLES: This is an outer scale variable.
687 97 | CTABLES /TABLE qn20 > qnd1.
690 ctables.sps:97.23-97.26: note: CTABLES: This is an inner scale variable.
691 97 | CTABLES /TABLE qn20 > qnd1.
694 ctables.sps:98.16-98.35: error: CTABLES: Summaries may only be requested for
695 categorical variables at the innermost nesting level.
696 98 | CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
697 | ^~~~~~~~~~~~~~~~~~~~
699 ctables.sps:98.16-98.18: note: CTABLES: This outer categorical variable has a
701 98 | CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
704 ctables.sps:100.52-100.56: error: CTABLES: Failed to parse category
705 specification as format DATETIME: Day (123) must be between 1 and 31..
706 100 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=datetime ['123'].
711 AT_SETUP([CTABLES parsing - more negative])
712 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
713 AT_DATA([ctables.sps],
715 CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
716 CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
717 CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
720 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['string'].
721 CTABLES /TABLE string /CATEGORIES VARIABLES=string [1].
723 CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1).
725 CTABLES /TABLE qnd1 /CLABELS ROWLABELS=OPPOSITE.
726 CTABLES /TABLE qn1 + string /CLABELS ROWLABELS=OPPOSITE.
727 CTABLES /TABLE qn1 + qnsa1 /CLABELS ROWLABELS=OPPOSITE.
728 CTABLES /TABLE qn105ba + qn105bb /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn105ba [1,2,3].
730 CTABLES /PCOMPUTE &x=EXPR(1**2**3).
731 CTABLES /PCOMPUTE &x=EXPR([**]).
732 CTABLES /PCOMPUTE &x=EXPR(**).
736 CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
738 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=PTILE(qn1, 50).
740 CTABLES /TABLE $mrset.
742 CTABLES /TABLE qn113 /SIGTEST TYPE=CHISQUARE.
743 CTABLES /TABLE qn113 /COMPARETEST TYPE=PROP.
745 CTABLES /TABLE qn113 [COUNT.UCL].
747 CTABLES /TABLE qn1 /CATEGORIES **.
751 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [1],
752 [[ctables.sps:2.76-2.78: error: CTABLES: Computed category &pc references a category not included in the category list.
753 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
756 ctables.sps:2.28-2.35: note: CTABLES: This is the missing category.
757 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
760 ctables.sps:2.76-2.79: note: CTABLES: To fix the problem, add subtotals to the list of categories here.
761 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
764 ctables.sps:3.73-3.75: error: CTABLES: Computed category &pc references a category not included in the category list.
765 3 | CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
768 ctables.sps:3.28-3.32: note: CTABLES: This is the missing category.
769 3 | CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
772 ctables.sps:3: note: CTABLES: To fix the problem, add TOTAL=YES to the variable's CATEGORIES specification.
774 ctables.sps:4.76-4.99: error: CTABLES: These categories include 2 instances of SUBTOTAL or HSUBTOTAL, so references from
775 computed categories must refer to subtotals by position, e.g. SUBTOTAL[1].
776 4 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
777 | ^~~~~~~~~~~~~~~~~~~~~~~~
779 ctables.sps:4.28-4.35: note: CTABLES: This is the reference that lacks a position.
780 4 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
783 ctables.sps:7.47-7.54: error: CTABLES: This category specification may be applied only to string variables, but this
784 subcommand tries to apply it to numeric variable QN1.
785 7 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['string'].
788 ctables.sps:8.53: error: CTABLES: This category specification may be applied only to numeric variables, but this
789 subcommand tries to apply it to string variable string.
790 8 | CTABLES /TABLE string /CATEGORIES VARIABLES=string [1].
793 ctables.sps:10.74-10.86: error: CTABLES: Data-dependent sorting is not implemented.
794 10 | CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1).
797 ctables.sps:12: error: CTABLES: To move category labels from one axis to another, the variables whose labels are to be
798 moved must be categorical, but qnd1 is scale.
800 ctables.sps:12.22-12.47: note: CTABLES: This syntax moves category labels to another axis.
801 12 | CTABLES /TABLE qnd1 /CLABELS ROWLABELS=OPPOSITE.
802 | ^~~~~~~~~~~~~~~~~~~~~~~~~~
804 ctables.sps:13: error: CTABLES: To move category labels from one axis to another, the variables whose labels are to be
805 moved must all have the same width, but QN1 has width 0 and string has width 8.
807 ctables.sps:13.30-13.55: note: CTABLES: This syntax moves category labels to another axis.
808 13 | CTABLES /TABLE qn1 + string /CLABELS ROWLABELS=OPPOSITE.
809 | ^~~~~~~~~~~~~~~~~~~~~~~~~~
811 ctables.sps:14: error: CTABLES: To move category labels from one axis to another, the variables whose labels are to be
812 moved must all have the same value labels, but QN1 and QNSA1 have different value labels.
814 ctables.sps:14.29-14.54: note: CTABLES: This syntax moves category labels to another axis.
815 14 | CTABLES /TABLE qn1 + qnsa1 /CLABELS ROWLABELS=OPPOSITE.
816 | ^~~~~~~~~~~~~~~~~~~~~~~~~~
818 ctables.sps:15: error: CTABLES: To move category labels from one axis to another, the variables whose labels are to be
819 moved must all have the same category specifications, but QN105BA and QN105BB have different category specifications.
821 ctables.sps:15.35-15.60: note: CTABLES: This syntax moves category labels to another axis.
822 15 | CTABLES /TABLE qn105ba + qn105bb /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn105ba [1,2,3].
823 | ^~~~~~~~~~~~~~~~~~~~~~~~~~
825 ctables.sps:17.27-17.33: warning: CTABLES: The exponentiation operator (`**') is left-associative: `a**b**c' equals
826 `(a**b)**c', not `a**(b**c)'. To disable this warning, insert parentheses.
827 17 | CTABLES /PCOMPUTE &x=EXPR(1**2**3).
830 ctables.sps:17.35: error: CTABLES: Syntax error expecting `/'.
831 17 | CTABLES /PCOMPUTE &x=EXPR(1**2**3).
834 ctables.sps:18.28-18.29: error: CTABLES: Syntax error.
835 18 | CTABLES /PCOMPUTE &x=EXPR([**]).
838 ctables.sps:19.27-19.28: error: CTABLES: Syntax error.
839 19 | CTABLES /PCOMPUTE &x=EXPR(**).
842 ctables.sps:21.15: error: CTABLES: At least one variable must be specified.
846 ctables.sps:23: error: CTABLES: Summaries may appear only on one axis.
848 ctables.sps:23.50-23.54: note: CTABLES: This variable on the layers axis has a summary.
849 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
852 ctables.sps:23.16-23.20: note: CTABLES: This variable on the rows axis has a summary.
853 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
856 ctables.sps:23.33-23.37: note: CTABLES: This variable on the columns axis has a summary.
857 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
860 ctables.sps:23.33-23.37: note: CTABLES: This is a scale variable, so it always has a summary even if the syntax does not
861 explicitly specify one.
862 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
865 ctables.sps:25.46-25.63: error: CTABLES: Data-dependent sorting is not implemented.
866 25 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=PTILE(qn1, 50).
869 ctables.sps:27.16-27.21: error: CTABLES: Multiple response set support not implemented.
870 27 | CTABLES /TABLE $mrset.
873 ctables.sps:29.23-29.44: error: CTABLES: Support for SIGTEST not yet implemented.
874 29 | CTABLES /TABLE qn113 /SIGTEST TYPE=CHISQUARE.
875 | ^~~~~~~~~~~~~~~~~~~~~~
877 ctables.sps:30.23-30.43: error: CTABLES: Support for COMPARETEST not yet implemented.
878 30 | CTABLES /TABLE qn113 /COMPARETEST TYPE=PROP.
879 | ^~~~~~~~~~~~~~~~~~~~~
881 ctables.sps:32.23-32.31: error: CTABLES: Support for LCL, UCL, and SE summary functions is not yet implemented.
882 32 | CTABLES /TABLE qn113 [COUNT.UCL].
885 ctables.sps:34.32-34.33: error: CTABLES: Syntax error expecting VARIABLES.
886 34 | CTABLES /TABLE qn1 /CATEGORIES **.
889 ctables.sps:36.10-36.15: error: CTABLES: Syntax error expecting one of the following: FORMAT, VLABELS, MRSETS, SMISSING,
890 PCOMPUTE, PPROPERTIES, WEIGHT, HIDESMALLCOUNTS, TABLE.
891 36 | CTABLES /TITLES.
894 ctables.sps:36.10-36.15: note: CTABLES: TABLE must appear before this subcommand.
895 36 | CTABLES /TITLES.
900 AT_SETUP([CTABLES one categorical variable])
901 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
902 AT_DATA([ctables.sps],
905 CTABLES /TABLE BY qn1.
906 CTABLES /TABLE BY BY qn1.
908 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
910 ╭────────────────────────────────────────────────────────────────────────┬─────╮
912 ├────────────────────────────────────────────────────────────────────────┼─────┤
913 │ 1. How often do you usually drive a car or other Every day │ 4667│
914 │motor vehicle? Several days a week │ 1274│
915 │ Once a week or less │ 361│
916 │ Only certain times a │ 130│
919 ╰────────────────────────────────────────────────────────────────────────┴─────╯
922 ╭──────────────────────────────────────────────────────────────────────────────╮
923 │ 1. How often do you usually drive a car or other motor vehicle? │
924 ├─────────┬──────────────────┬──────────────────┬────────────────────────┬─────┤
925 │ │ Several days a │ Once a week or │ Only certain times a │ │
926 │Every day│ week │ less │ year │Never│
927 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
928 │ Count │ Count │ Count │ Count │Count│
929 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
930 │ 4667│ 1274│ 361│ 130│ 540│
931 ╰─────────┴──────────────────┴──────────────────┴────────────────────────┴─────╯
943 AT_SETUP([CTABLES one string variable])
944 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
945 AT_DATA([ctables.sps],
948 MISSING VALUES licensed('DontKnow', 'Refused').
949 RECODE qnd7a(1='Yes')(2='No')(3='DontKnow')(4='Refused') INTO licensed.
950 CTABLES /TABLE licensed.
951 CTABLES /TABLE licensed [COUNT, TOTALS[COUNT, VALIDN]] /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
952 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['Yes', 'No'] TOTAL=YES.
953 * Notice that the string matching is case-sensitive.
954 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['Yes', 'no'] TOTAL=YES.
955 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['No' THRU 'yes'] TOTAL=YES.
957 /PCOMPUTE ¬yes=EXPR(['No']+['DontKnow']+['Refused'])
958 /PPROPERTIES ¬yes LABEL='Not Yes' HIDESOURCECATS=YES
960 /CATEGORIES VARIABLES=licensed ['Yes', ¬yes, 'No', 'DontKnow', 'Refused'].
962 /PCOMPUTE ¬yes=EXPR(['DontKnow' THRU 'No'] + ['Refused'])
963 /PPROPERTIES ¬yes LABEL='Not Yes' HIDESOURCECATS=YES
965 /CATEGORIES VARIABLES=licensed ['Yes', ¬yes, 'DontKnow' THRU 'No', 'Refused'].
967 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
977 ╭─────────────────┬─────┬───────╮
979 ├─────────────────┼─────┼───────┤
980 │licensed DontKnow│ 4│ │
984 │ Total │ 6999│ 6951│
985 ╰─────────────────┴─────┴───────╯
988 ╭──────────────┬─────╮
990 ├──────────────┼─────┤
991 │licensed Yes │ 6379│
994 ╰──────────────┴─────╯
997 ╭──────────────┬─────╮
999 ├──────────────┼─────┤
1000 │licensed Yes │ 6379│
1003 ╰──────────────┴─────╯
1006 ╭────────────────┬─────╮
1008 ├────────────────┼─────┤
1013 ╰────────────────┴─────╯
1016 ╭────────────────┬─────╮
1018 ├────────────────┼─────┤
1019 │licensed Yes │ 6379│
1021 ╰────────────────┴─────╯
1024 ╭────────────────┬─────╮
1026 ├────────────────┼─────┤
1027 │licensed Yes │ 6379│
1029 ╰────────────────┴─────╯
1033 AT_SETUP([CTABLES one scale variable])
1034 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1035 AT_DATA([ctables.sps],
1038 CTABLES /TABLE qnd1[COUNT, VALIDN, TOTALN, MEAN, STDDEV, MINIMUM, MAXIMUM].
1039 CTABLES /TABLE BY qnd1.
1040 CTABLES /TABLE BY BY qnd1.
1042 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1043 Descriptive Statistics
1044 ╭──────────────────────────┬────┬─────┬───────┬───────┬───────────╮
1045 │ │ N │ Mean│Std Dev│Minimum│ Maximum │
1046 ├──────────────────────────┼────┼─────┼───────┼───────┼───────────┤
1047 │D1. AGE: What is your age?│6930│48.26│ 19.01│ 16│86 or older│
1048 │Valid N (listwise) │6999│ │ │ │ │
1049 │Missing N (listwise) │ 69│ │ │ │ │
1050 ╰──────────────────────────┴────┴─────┴───────┴───────┴───────────╯
1053 ╭──────────────────────┬─────┬───────┬───────┬────┬────────────┬───────┬───────╮
1054 │ │ │ │ │ │ Std │ │ │
1055 │ │Count│Valid N│Total N│Mean│ Deviation │Minimum│Maximum│
1056 ├──────────────────────┼─────┼───────┼───────┼────┼────────────┼───────┼───────┤
1057 │D1. AGE: What is your │ 6999│ 6930│ 6999│ 48│ 19│ 16│ 86│
1058 │age? │ │ │ │ │ │ │ │
1059 ╰──────────────────────┴─────┴───────┴───────┴────┴────────────┴───────┴───────╯
1062 ╭──────────────────────────╮
1063 │D1. AGE: What is your age?│
1064 ├──────────────────────────┤
1066 ├──────────────────────────┤
1068 ╰──────────────────────────╯
1071 D1. AGE: What is your age?
1080 AT_SETUP([CTABLES simple stacking])
1081 AT_KEYWORDS([stack stacked])
1082 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1083 AT_DATA([ctables.sps],
1085 CTABLES /TABLE qn105ba + qn105bb + qn105bc + qn105bd BY qns3a [COLPCT PCT8.0].
1087 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1089 ╭───────────────────────────────────────────────────────────────┬──────────────╮
1096 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
1097 │105b. How likely is it that drivers who have had Almost │ 10%│ 11%│
1098 │too much to drink to drive safely will A. Get certain │ │ │
1099 │stopped by the police? Very likely │ 21%│ 22%│
1100 │ Somewhat │ 38%│ 42%│
1102 │ Somewhat │ 21%│ 18%│
1106 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
1107 │105b. How likely is it that drivers who have had Almost │ 14%│ 18%│
1108 │too much to drink to drive safely will B. Have an certain │ │ │
1109 │accident? Very likely │ 36%│ 45%│
1110 │ Somewhat │ 39%│ 32%│
1112 │ Somewhat │ 9%│ 4%│
1116 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
1117 │105b. How likely is it that drivers who have had Almost │ 18%│ 16%│
1118 │too much to drink to drive safely will C. Be certain │ │ │
1119 │convicted for drunk driving? Very likely │ 32%│ 28%│
1120 │ Somewhat │ 27%│ 32%│
1122 │ Somewhat │ 15%│ 15%│
1126 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
1127 │105b. How likely is it that drivers who have had Almost │ 16%│ 16%│
1128 │too much to drink to drive safely will D. Be certain │ │ │
1129 │arrested for drunk driving? Very likely │ 26%│ 27%│
1130 │ Somewhat │ 32%│ 35%│
1132 │ Somewhat │ 17%│ 15%│
1136 ╰───────────────────────────────────────────────────────────────┴──────┴───────╯
1140 AT_SETUP([CTABLES show or hide empty categories])
1141 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1142 AT_DATA([ctables.sps],
1144 IF (qn105ba = 2) qn105ba = 1.
1145 IF (qns3a = 1) qns3a = 2.
1146 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0].
1147 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
1148 /CATEGORIES VAR=qn105ba EMPTY=EXCLUDE.
1149 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
1150 /CATEGORIES VAR=qns3a EMPTY=EXCLUDE.
1151 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
1152 /CATEGORIES VAR=ALL EMPTY=EXCLUDE.
1154 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1156 ╭──────────────────────────────────────────────────────────────┬───────────────╮
1163 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
1164 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
1165 │too much to drink to drive safely will A. Get certain │ │ │
1166 │stopped by the police? Very likely│ .│ 0%│
1167 │ Somewhat │ .│ 40%│
1169 │ Somewhat │ .│ 19%│
1173 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
1176 ╭──────────────────────────────────────────────────────────────┬───────────────╮
1183 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
1184 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
1185 │too much to drink to drive safely will A. Get certain │ │ │
1186 │stopped by the police? Somewhat │ .│ 40%│
1188 │ Somewhat │ .│ 19%│
1192 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
1195 ╭────────────────────────────────────────────────────────────────────┬─────────╮
1202 ├────────────────────────────────────────────────────────────────────┼─────────┤
1203 │105b. How likely is it that drivers who have had too Almost │ 32%│
1204 │much to drink to drive safely will A. Get stopped by certain │ │
1205 │the police? Very likely │ 0%│
1212 ╰────────────────────────────────────────────────────────────────────┴─────────╯
1215 ╭────────────────────────────────────────────────────────────────────┬─────────╮
1222 ├────────────────────────────────────────────────────────────────────┼─────────┤
1223 │105b. How likely is it that drivers who have had too Almost │ 32%│
1224 │much to drink to drive safely will A. Get stopped by certain │ │
1225 │the police? Somewhat │ 40%│
1231 ╰────────────────────────────────────────────────────────────────────┴─────────╯
1235 AT_SETUP([CTABLES sorting categories])
1236 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1237 AT_DATA([ctables.sps],
1239 IF (QND5A=6) QND5A=-1.
1240 IF (QND5A=5) QND5A=-2.
1241 CTABLES /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=VALUE ORDER=A
1242 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=VALUE ORDER=D
1243 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=LABEL ORDER=A
1244 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=LABEL ORDER=D.
1246 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1248 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1250 ├────────────────────────────────────────────────────────────────────────┼─────┤
1251 │D5a. What would you say is your primary ethnic -2.00 │ 52│
1252 │background? -1.00 │ 78│
1256 │ South American │ 34│
1257 │ Central American │ 0│
1258 │ Puerto Rican, OR │ 0│
1259 │ Something else │ 68│
1260 │ Multiple - cannot choose│ 7│
1262 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1265 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1267 ├────────────────────────────────────────────────────────────────────────┼─────┤
1268 │D5a. What would you say is your primary ethnic Multiple - cannot choose│ 7│
1269 │background? one │ │
1270 │ Something else │ 68│
1271 │ Puerto Rican, OR │ 0│
1272 │ Central American │ 0│
1273 │ South American │ 34│
1279 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1282 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1284 ├────────────────────────────────────────────────────────────────────────┼─────┤
1285 │D5a. What would you say is your primary ethnic Central American │ 0│
1286 │background? Cuban │ 20│
1288 │ Multiple - cannot choose│ 7│
1290 │ Puerto Rican, OR │ 0│
1291 │ Something else │ 68│
1292 │ South American │ 34│
1296 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1299 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1301 ├────────────────────────────────────────────────────────────────────────┼─────┤
1302 │D5a. What would you say is your primary ethnic Spanish │ 48│
1303 │background? South American │ 34│
1304 │ Something else │ 68│
1305 │ Puerto Rican, OR │ 0│
1306 │ Multiple - cannot choose│ 7│
1310 │ Central American │ 0│
1313 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1317 AT_SETUP([CTABLES simple nesting])
1318 AT_KEYWORDS([nest nested])
1319 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1320 AT_DATA([ctables.sps],
1322 CTABLES /TABLE (qn105ba + qn105bb + qn105bc + qn105bd) > qns3a [COUNT, TABLEPCT PCT8.0]
1323 /CATEGORIES VARIABLES=qns3a TOTAL=YES.
1324 CTABLES /TABLE qns3a > (qn105ba + qn105bb + qn105bc + qn105bd) [TABLEPCT PCT8.0]
1325 /CATEGORIES VARIABLES=qns3a TOTAL=YES
1326 /CLABELS ROW=OPPOSITE.
1328 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1330 ╭─────────────────────────────────────────────────────────────────┬─────┬──────╮
1333 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1334 │105b. How likely is it that drivers Almost S3a. Male │ 297│ 4%│
1335 │who have had too much to drink to certain GENDER: Female│ 403│ 6%│
1336 │drive safely will A. Get stopped by Total │ 700│ 10%│
1337 │the police? ╶──────────────────────────┼─────┼──────┤
1338 │ Very S3a. Male │ 660│ 10%│
1339 │ likely GENDER: Female│ 842│ 12%│
1340 │ Total │ 1502│ 22%│
1341 │ ╶──────────────────────────┼─────┼──────┤
1342 │ Somewhat S3a. Male │ 1174│ 17%│
1343 │ likely GENDER: Female│ 1589│ 23%│
1344 │ Total │ 2763│ 40%│
1345 │ ╶──────────────────────────┼─────┼──────┤
1346 │ Somewhat S3a. Male │ 640│ 9%│
1347 │ unlikely GENDER: Female│ 667│ 10%│
1348 │ Total │ 1307│ 19%│
1349 │ ╶──────────────────────────┼─────┼──────┤
1350 │ Very S3a. Male │ 311│ 5%│
1351 │ unlikely GENDER: Female│ 298│ 4%│
1353 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1354 │105b. How likely is it that drivers Almost S3a. Male │ 429│ 6%│
1355 │who have had too much to drink to certain GENDER: Female│ 671│ 10%│
1356 │drive safely will B. Have an accident? Total │ 1100│ 16%│
1357 │ ╶──────────────────────────┼─────┼──────┤
1358 │ Very S3a. Male │ 1104│ 16%│
1359 │ likely GENDER: Female│ 1715│ 25%│
1360 │ Total │ 2819│ 41%│
1361 │ ╶──────────────────────────┼─────┼──────┤
1362 │ Somewhat S3a. Male │ 1203│ 17%│
1363 │ likely GENDER: Female│ 1214│ 18%│
1364 │ Total │ 2417│ 35%│
1365 │ ╶──────────────────────────┼─────┼──────┤
1366 │ Somewhat S3a. Male │ 262│ 4%│
1367 │ unlikely GENDER: Female│ 168│ 2%│
1369 │ ╶──────────────────────────┼─────┼──────┤
1370 │ Very S3a. Male │ 81│ 1%│
1371 │ unlikely GENDER: Female│ 59│ 1%│
1373 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1374 │105b. How likely is it that drivers Almost S3a. Male │ 539│ 8%│
1375 │who have had too much to drink to certain GENDER: Female│ 610│ 9%│
1376 │drive safely will C. Be convicted for Total │ 1149│ 17%│
1377 │drunk driving? ╶──────────────────────────┼─────┼──────┤
1378 │ Very S3a. Male │ 988│ 14%│
1379 │ likely GENDER: Female│ 1049│ 15%│
1380 │ Total │ 2037│ 30%│
1381 │ ╶──────────────────────────┼─────┼──────┤
1382 │ Somewhat S3a. Male │ 822│ 12%│
1383 │ likely GENDER: Female│ 1210│ 18%│
1384 │ Total │ 2032│ 30%│
1385 │ ╶──────────────────────────┼─────┼──────┤
1386 │ Somewhat S3a. Male │ 446│ 7%│
1387 │ unlikely GENDER: Female│ 548│ 8%│
1389 │ ╶──────────────────────────┼─────┼──────┤
1390 │ Very S3a. Male │ 268│ 4%│
1391 │ unlikely GENDER: Female│ 354│ 5%│
1393 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1394 │105b. How likely is it that drivers Almost S3a. Male │ 498│ 7%│
1395 │who have had too much to drink to certain GENDER: Female│ 603│ 9%│
1396 │drive safely will D. Be arrested for Total │ 1101│ 16%│
1397 │drunk driving? ╶──────────────────────────┼─────┼──────┤
1398 │ Very S3a. Male │ 805│ 12%│
1399 │ likely GENDER: Female│ 1029│ 15%│
1400 │ Total │ 1834│ 27%│
1401 │ ╶──────────────────────────┼─────┼──────┤
1402 │ Somewhat S3a. Male │ 975│ 14%│
1403 │ likely GENDER: Female│ 1332│ 19%│
1404 │ Total │ 2307│ 34%│
1405 │ ╶──────────────────────────┼─────┼──────┤
1406 │ Somewhat S3a. Male │ 535│ 8%│
1407 │ unlikely GENDER: Female│ 560│ 8%│
1408 │ Total │ 1095│ 16%│
1409 │ ╶──────────────────────────┼─────┼──────┤
1410 │ Very S3a. Male │ 270│ 4%│
1411 │ unlikely GENDER: Female│ 279│ 4%│
1413 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
1416 ╭─────────────────────────────────┬────────┬──────┬─────────┬─────────┬────────╮
1417 │ │ Almost │ Very │ Somewhat│ Somewhat│ Very │
1418 │ │ certain│likely│ likely │ unlikely│unlikely│
1419 │ ├────────┼──────┼─────────┼─────────┼────────┤
1421 │ │ Table %│ % │ Table % │ Table % │ Table %│
1422 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1423 │S3a. Male 105b. How likely │ 4%│ 10%│ 17%│ 9%│ 5%│
1424 │GENDER: is it that drivers│ │ │ │ │ │
1425 │ who have had too │ │ │ │ │ │
1426 │ much to drink to │ │ │ │ │ │
1427 │ drive safely will │ │ │ │ │ │
1428 │ A. Get stopped by │ │ │ │ │ │
1429 │ the police? │ │ │ │ │ │
1430 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1431 │ Female 105b. How likely │ 6%│ 12%│ 23%│ 10%│ 4%│
1432 │ is it that drivers│ │ │ │ │ │
1433 │ who have had too │ │ │ │ │ │
1434 │ much to drink to │ │ │ │ │ │
1435 │ drive safely will │ │ │ │ │ │
1436 │ A. Get stopped by │ │ │ │ │ │
1437 │ the police? │ │ │ │ │ │
1438 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1439 │ Total 105b. How likely │ 10%│ 22%│ 40%│ 19%│ 9%│
1440 │ is it that drivers│ │ │ │ │ │
1441 │ who have had too │ │ │ │ │ │
1442 │ much to drink to │ │ │ │ │ │
1443 │ drive safely will │ │ │ │ │ │
1444 │ A. Get stopped by │ │ │ │ │ │
1445 │ the police? │ │ │ │ │ │
1446 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1447 │S3a. Male 105b. How likely │ 6%│ 16%│ 17%│ 4%│ 1%│
1448 │GENDER: is it that drivers│ │ │ │ │ │
1449 │ who have had too │ │ │ │ │ │
1450 │ much to drink to │ │ │ │ │ │
1451 │ drive safely will │ │ │ │ │ │
1452 │ B. Have an │ │ │ │ │ │
1453 │ accident? │ │ │ │ │ │
1454 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1455 │ Female 105b. How likely │ 10%│ 25%│ 18%│ 2%│ 1%│
1456 │ is it that drivers│ │ │ │ │ │
1457 │ who have had too │ │ │ │ │ │
1458 │ much to drink to │ │ │ │ │ │
1459 │ drive safely will │ │ │ │ │ │
1460 │ B. Have an │ │ │ │ │ │
1461 │ accident? │ │ │ │ │ │
1462 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1463 │ Total 105b. How likely │ 16%│ 41%│ 35%│ 6%│ 2%│
1464 │ is it that drivers│ │ │ │ │ │
1465 │ who have had too │ │ │ │ │ │
1466 │ much to drink to │ │ │ │ │ │
1467 │ drive safely will │ │ │ │ │ │
1468 │ B. Have an │ │ │ │ │ │
1469 │ accident? │ │ │ │ │ │
1470 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1471 │S3a. Male 105b. How likely │ 8%│ 14%│ 12%│ 7%│ 4%│
1472 │GENDER: is it that drivers│ │ │ │ │ │
1473 │ who have had too │ │ │ │ │ │
1474 │ much to drink to │ │ │ │ │ │
1475 │ drive safely will │ │ │ │ │ │
1476 │ C. Be convicted │ │ │ │ │ │
1477 │ for drunk driving?│ │ │ │ │ │
1478 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1479 │ Female 105b. How likely │ 9%│ 15%│ 18%│ 8%│ 5%│
1480 │ is it that drivers│ │ │ │ │ │
1481 │ who have had too │ │ │ │ │ │
1482 │ much to drink to │ │ │ │ │ │
1483 │ drive safely will │ │ │ │ │ │
1484 │ C. Be convicted │ │ │ │ │ │
1485 │ for drunk driving?│ │ │ │ │ │
1486 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1487 │ Total 105b. How likely │ 17%│ 30%│ 30%│ 15%│ 9%│
1488 │ is it that drivers│ │ │ │ │ │
1489 │ who have had too │ │ │ │ │ │
1490 │ much to drink to │ │ │ │ │ │
1491 │ drive safely will │ │ │ │ │ │
1492 │ C. Be convicted │ │ │ │ │ │
1493 │ for drunk driving?│ │ │ │ │ │
1494 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1495 │S3a. Male 105b. How likely │ 7%│ 12%│ 14%│ 8%│ 4%│
1496 │GENDER: is it that drivers│ │ │ │ │ │
1497 │ who have had too │ │ │ │ │ │
1498 │ much to drink to │ │ │ │ │ │
1499 │ drive safely will │ │ │ │ │ │
1500 │ D. Be arrested for│ │ │ │ │ │
1501 │ drunk driving? │ │ │ │ │ │
1502 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1503 │ Female 105b. How likely │ 9%│ 15%│ 19%│ 8%│ 4%│
1504 │ is it that drivers│ │ │ │ │ │
1505 │ who have had too │ │ │ │ │ │
1506 │ much to drink to │ │ │ │ │ │
1507 │ drive safely will │ │ │ │ │ │
1508 │ D. Be arrested for│ │ │ │ │ │
1509 │ drunk driving? │ │ │ │ │ │
1510 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1511 │ Total 105b. How likely │ 16%│ 27%│ 34%│ 16%│ 8%│
1512 │ is it that drivers│ │ │ │ │ │
1513 │ who have had too │ │ │ │ │ │
1514 │ much to drink to │ │ │ │ │ │
1515 │ drive safely will │ │ │ │ │ │
1516 │ D. Be arrested for│ │ │ │ │ │
1517 │ drunk driving? │ │ │ │ │ │
1518 ╰─────────────────────────────────┴────────┴──────┴─────────┴─────────┴────────╯
1522 AT_SETUP([CTABLES nesting and scale variables])
1523 AT_KEYWORDS([nest nested])
1524 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1525 AT_DATA([ctables.sps],
1527 CTABLES /TABLE=qnd1 > qn1 BY qns3a.
1528 CTABLES /TABLE=qnd1 [MINIMUM, MAXIMUM, MEAN] > qns3a > (qn26 + qn27).
1529 CTABLES /TABLE=qnsa1 > qn105ba [COLPCT] BY qns1
1530 /CATEGORIES VAR=qnsa1 EMPTY=EXCLUDE.
1531 CTABLES /TABLE=AgeGroup > qn20 [MEAN F8.1, STDDEV F8.1].
1533 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1535 ╭─────────────────────────────────────────────────────────────────┬────────────╮
1541 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1542 │D1. AGE: What 1. How often do you usually drive Every day │ 46│ 46│
1543 │is your age? a car or other motor vehicle? Several days a │ 51│ 59│
1545 │ Once a week or │ 44│ 54│
1547 │ Only certain │ 34│ 41│
1548 │ times a year │ │ │
1550 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
1553 ╭─────────────────────────────────────────────────────────┬───────┬───────┬────╮
1554 │ │Minimum│Maximum│Mean│
1555 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
1556 │D1. AGE: S3a. Male 26. During the last 12 Yes│ 16│ 86│ 42│
1557 │What is GENDER: months, has there been a │ │ │ │
1558 │your time when you felt you │ │ │ │
1559 │age? should cut down on your No │ 16│ 86│ 46│
1561 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
1562 │ Female 26. During the last 12 Yes│ 16│ 86│ 43│
1563 │ months, has there been a │ │ │ │
1564 │ time when you felt you │ │ │ │
1565 │ should cut down on your No │ 16│ 86│ 48│
1567 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
1568 │D1. AGE: S3a. Male 27. During the last 12 Yes│ 16│ 86│ 38│
1569 │What is GENDER: months, has there been a │ │ │ │
1570 │your time when people criticized No │ 16│ 86│ 46│
1571 │age? your drinking? │ │ │ │
1572 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
1573 │ Female 27. During the last 12 Yes│ 17│ 69│ 37│
1574 │ months, has there been a │ │ │ │
1575 │ time when people criticized No │ 16│ 86│ 48│
1576 │ your drinking? │ │ │ │
1577 ╰─────────────────────────────────────────────────────────┴───────┴───────┴────╯
1580 ╭─────────────────────────────┬────────────────────────────────────────────────╮
1581 │ │S1. Including yourself, how many members of this│
1582 │ │ household are age 16 or older? │
1583 │ ├──────┬──────┬──────┬──────┬──────┬──────┬──────┤
1584 │ │ │ │ │ │ │ │ 6 or │
1585 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
1586 │ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
1587 │ │Column│Column│Column│Column│Column│Column│Column│
1588 │ │ % │ % │ % │ % │ % │ % │ % │
1589 ├─────────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
1590 │Sa1. RDD 105b. Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
1591 │SAMPLE How certain │ │ │ │ │ │ │ │
1592 │SOURCE: likely │ │ │ │ │ │ │ │
1593 │ is it Very │ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
1594 │ that likely │ │ │ │ │ │ │ │
1595 │ drivers │ │ │ │ │ │ │ │
1596 │ who have │ │ │ │ │ │ │ │
1597 │ had too Somewhat│ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
1598 │ much to likely │ │ │ │ │ │ │ │
1599 │ drink to │ │ │ │ │ │ │ │
1600 │ drive │ │ │ │ │ │ │ │
1601 │ safely Somewhat│ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
1602 │ will A. unlikely│ │ │ │ │ │ │ │
1603 │ Get │ │ │ │ │ │ │ │
1604 │ stopped Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
1605 │ by the unlikely│ │ │ │ │ │ │ │
1606 │ police? │ │ │ │ │ │ │ │
1607 ╰─────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
1610 ╭──────────────────────────────────────────────────────────────┬────┬──────────╮
1613 ├──────────────────────────────────────────────────────────────┼────┼──────────┤
1614 │Age 16 to 25 20. On how many of the thirty days in this │ 5.2│ 6.0│
1615 │group typical month did you have one or more │ │ │
1616 │ alcoholic beverages to drink? │ │ │
1617 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1618 │ 26 to 35 20. On how many of the thirty days in this │ 4.7│ 5.9│
1619 │ typical month did you have one or more │ │ │
1620 │ alcoholic beverages to drink? │ │ │
1621 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1622 │ 36 to 45 20. On how many of the thirty days in this │ 5.5│ 6.8│
1623 │ typical month did you have one or more │ │ │
1624 │ alcoholic beverages to drink? │ │ │
1625 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1626 │ 46 to 55 20. On how many of the thirty days in this │ 5.8│ 7.7│
1627 │ typical month did you have one or more │ │ │
1628 │ alcoholic beverages to drink? │ │ │
1629 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1630 │ 56 to 65 20. On how many of the thirty days in this │ 6.3│ 8.2│
1631 │ typical month did you have one or more │ │ │
1632 │ alcoholic beverages to drink? │ │ │
1633 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1634 │ 66 or 20. On how many of the thirty days in this │ 7.1│ 9.2│
1635 │ older typical month did you have one or more │ │ │
1636 │ alcoholic beverages to drink? │ │ │
1637 ╰──────────────────────────────────────────────────────────────┴────┴──────────╯
1642 AT_SETUP([CTABLES SLABELS])
1643 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1644 AT_DATA([ctables.sps],
1646 CTABLES /TABLE qn1 [COUNT COLPCT].
1647 CTABLES /TABLE qn1 [COUNT COLPCT]
1648 /SLABELS POSITION=ROW.
1649 CTABLES /TABLE qn1 [COUNT COLPCT]
1650 /SLABELS POSITION=ROW VISIBLE=NO.
1652 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1654 ╭────────────────────────────────────────────────────────────────┬─────┬───────╮
1657 ├────────────────────────────────────────────────────────────────┼─────┼───────┤
1658 │ 1. How often do you usually drive a car or Every day │ 4667│ 66.9%│
1659 │other motor vehicle? Several days a week│ 1274│ 18.3%│
1660 │ Once a week or less│ 361│ 5.2%│
1661 │ Only certain times │ 130│ 1.9%│
1663 │ Never │ 540│ 7.7%│
1664 ╰────────────────────────────────────────────────────────────────┴─────┴───────╯
1667 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1668 │ 1. How often do you usually drive a car or Every day Count │ 4667│
1669 │other motor vehicle? Column │66.9%│
1671 │ ╶───────────────────────────┼─────┤
1672 │ Several days a week Count │ 1274│
1675 │ ╶───────────────────────────┼─────┤
1676 │ Once a week or less Count │ 361│
1679 │ ╶───────────────────────────┼─────┤
1680 │ Only certain times Count │ 130│
1681 │ a year Column │ 1.9%│
1683 │ ╶───────────────────────────┼─────┤
1684 │ Never Count │ 540│
1687 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1690 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1691 │ 1. How often do you usually drive a car or other Every day │ 4667│
1692 │motor vehicle? │66.9%│
1693 │ Several days a week │ 1274│
1695 │ Once a week or less │ 361│
1697 │ Only certain times a │ 130│
1701 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1705 AT_SETUP([CTABLES simple totals])
1706 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1707 AT_DATA([ctables.sps],
1710 /CATEGORIES VARIABLES=qn17 TOTAL=YES LABEL='Number responding'.
1711 DESCRIPTIVES qn18/STATISTICS=MEAN.
1712 CTABLES /TABLE=region > qn18 [MEAN, COUNT, VALIDN, TOTALN]
1713 /CATEGORIES VARIABLES=region TOTAL=YES LABEL='All regions'.
1715 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1717 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1719 ├────────────────────────────────────────────────────────────────────────┼─────┤
1720 │17. When you drink alcoholic beverages, which ONE of OR, something else│ 2│
1721 │the following beverages do you drink MOST OFTEN? Beer │ 1073│
1724 │ Wine coolers │ 137│
1725 │ Hard liquor or │ 888│
1727 │ Flavored malt │ 83│
1729 │ Number responding │ 4221│
1730 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1732 Descriptive Statistics
1733 ╭────────────────────────────────────────────────────────────────────┬────┬────╮
1735 ├────────────────────────────────────────────────────────────────────┼────┼────┤
1736 │18. When you drink ANSWERFROM(QN17R1), about how many │4218│4.62│
1737 │ANSWERFROM(QN17R2) do you usually drink per sitting? │ │ │
1738 │Valid N (listwise) │6999│ │
1739 │Missing N (listwise) │2781│ │
1740 ╰────────────────────────────────────────────────────────────────────┴────┴────╯
1743 ╭──────────────────────────────────────────────────────┬────┬─────┬──────┬─────╮
1744 │ │ │ │ Valid│Total│
1745 │ │Mean│Count│ N │ N │
1746 ├──────────────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1747 │Region NE 18. When you drink ANSWERFROM(QN17R1),│4.36│ 1409│ 949│ 1409│
1748 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1749 │ you usually drink per sitting? │ │ │ │ │
1750 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1751 │ MW 18. When you drink ANSWERFROM(QN17R1),│4.67│ 1654│ 1027│ 1654│
1752 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1753 │ you usually drink per sitting? │ │ │ │ │
1754 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1755 │ S 18. When you drink ANSWERFROM(QN17R1),│4.71│ 2390│ 1287│ 2390│
1756 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1757 │ you usually drink per sitting? │ │ │ │ │
1758 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1759 │ W 18. When you drink ANSWERFROM(QN17R1),│4.69│ 1546│ 955│ 1546│
1760 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1761 │ you usually drink per sitting? │ │ │ │ │
1762 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1763 │ All 18. When you drink ANSWERFROM(QN17R1),│4.62│ 6999│ 4218│ 6999│
1764 │ regions about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1765 │ you usually drink per sitting? │ │ │ │ │
1766 ╰──────────────────────────────────────────────────────┴────┴─────┴──────┴─────╯
1770 AT_SETUP([CTABLES subtotals])
1771 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1772 AT_DATA([ctables.sps],
1774 CTABLES /TABLE=qn105ba BY qns1
1775 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
1776 CTABLES /TABLE=qn105ba [COLPCT] BY qns1
1777 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL].
1778 CTABLES /TABLE=qn105ba BY qns1
1779 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL]
1780 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
1782 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1784 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
1785 │ │ S1. Including yourself, how many members of this household │
1786 │ │ are age 16 or older? │
1787 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
1788 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
1789 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1790 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1791 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1792 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
1793 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
1794 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
1795 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
1796 │ likely │ │ │ │ │ │ │ │
1797 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
1798 │ unlikely │ │ │ │ │ │ │ │
1799 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
1800 │ unlikely │ │ │ │ │ │ │ │
1801 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
1804 ╭────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────╮
1805 │ │ S1. Including yourself, how many members of this household │
1806 │ │ are age 16 or older? │
1807 │ ├────────┬────────┬────────┬────────┬───────┬────────┬────────┤
1808 │ │ │ │ │ │ │ │ 6 or │
1809 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
1810 │ ├────────┼────────┼────────┼────────┼───────┼────────┼────────┤
1811 │ │ │ │ │ │ Column│ │ │
1812 │ │Column %│Column %│Column %│Column %│ % │Column %│Column %│
1813 ├────────────────────────────────────────────────────────┼────────┼────────┼────────┼────────┼───────┼────────┼────────┤
1814 │105b. How likely is it that drivers who have Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
1815 │had too much to drink to drive safely will certain │ │ │ │ │ │ │ │
1816 │A. Get stopped by the police? Very likely│ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
1817 │ Somewhat │ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
1818 │ likely │ │ │ │ │ │ │ │
1819 │ Subtotal │ │ 72.8%│ 68.6%│ 75.0%│ 74.0%│ 81.8%│ 81.0%│
1820 │ Somewhat │ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
1821 │ unlikely │ │ │ │ │ │ │ │
1822 │ Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
1823 │ unlikely │ │ │ │ │ │ │ │
1824 │ Subtotal │ │ 27.2%│ 31.4%│ 25.0%│ 26.0%│ 18.2%│ 19.0%│
1825 ╰────────────────────────────────────────────────────────┴────────┴────────┴────────┴────────┴───────┴────────┴────────╯
1828 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
1829 │ │ S1. Including yourself, how many members of this household │
1830 │ │ are age 16 or older? │
1831 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
1832 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
1833 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1834 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1835 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1836 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
1837 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
1838 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
1839 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
1840 │ likely │ │ │ │ │ │ │ │
1841 │ Subtotal │ 1121│ 2047│ 3168│ 375│ 142│ 45│ 562│
1842 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
1843 │ unlikely │ │ │ │ │ │ │ │
1844 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
1845 │ unlikely │ │ │ │ │ │ │ │
1846 │ Subtotal │ 419│ 937│ 1356│ 125│ 50│ 10│ 185│
1847 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
1851 AT_SETUP([CTABLES PCOMPUTE])
1852 AT_KEYWORDS([postcompute])
1853 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1854 AT_DATA([ctables.sps],
1857 /PCOMPUTE &x=EXPR([3] + [4])
1858 /PCOMPUTE &y=EXPR([4] + [5])
1859 /PPROPERTIES &x LABEL='3+4' FORMAT=COUNT F8.2
1860 /PPROPERTIES &y LABEL=')LABEL[5]+)LABEL[6]'
1861 /TABLE=qn105ba [COUNT, ROWPCT] BY qns1
1862 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, &x, &y, SUBTOTAL] TOTAL=YES
1864 * Adding HIDESOURCECATS=YES for one PPROPERTIES.
1866 /PCOMPUTE &x=EXPR([3] + [4])
1867 /PCOMPUTE &y=EXPR([4] + [5])
1868 /PPROPERTIES &x LABEL='3+4' FORMAT=COUNT F8.2
1869 /PPROPERTIES &y LABEL=')LABEL[5]+)LABEL[6]' HIDESOURCECATS=YES
1870 /TABLE=qn105ba [COUNT, ROWPCT] BY qns1
1871 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, &x, &y, SUBTOTAL] TOTAL=YES
1873 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1875 ╭───────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
1876 │ │ S1. Including yourself, how many members of this household are age 16 or older? │
1877 │ ├───────────┬───────────┬───────────┬───────────┬──────────┬──────────┬────────────┬──────────┬───────────┬────────────┤
1878 │ │ 1 │ 2 │ Subtotal │ 3 │ 4 │ 5 │ 3+4 │ 4+5 │ Subtotal │ Total │
1879 │ ├─────┬─────┼─────┬─────┼─────┬─────┼─────┬─────┼─────┬────┼─────┬────┼──────┬─────┼─────┬────┼─────┬─────┼─────┬──────┤
1880 │ │ │ │ │ │ │ │ │ │ │ Row│ │ Row│ │ │ │ Row│ │ │ │ │
1881 │ │Count│Row %│Count│Row %│Count│Row %│Count│Row %│Count│ % │Count│ % │ Count│Row %│Count│ % │Count│Row %│Count│ Row %│
1882 ├───────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼────┼─────┼────┼──────┼─────┼─────┼────┼─────┼─────┼─────┼──────┤
1883 │105b. How Almost │ 147│30.3%│ 246│50.7%│ 393│81.0%│ 62│12.8%│ 19│3.9%│ 11│2.3%│ 81.00│16.7%│ 30│6.2%│ 92│19.0%│ 485│100.0%│
1884 │likely is certain │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1885 │it that │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1886 │drivers Very │ 384│34.3%│ 552│49.2%│ 936│83.5%│ 120│10.7%│ 51│4.5%│ 14│1.2%│171.00│15.3%│ 65│5.8%│ 185│16.5%│ 1121│100.0%│
1887 │who have likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1888 │had too │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1889 │much to Somewhat│ 590│27.8%│ 1249│58.8%│ 1839│86.6%│ 193│ 9.1%│ 72│3.4%│ 20│ .9%│265.00│12.5%│ 92│4.3%│ 285│13.4%│ 2124│100.0%│
1890 │drink to likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1891 │drive │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1892 │safely Somewhat│ 278│26.6%│ 647│61.8%│ 925│88.3%│ 84│ 8.0%│ 32│3.1%│ 6│ .6%│116.00│11.1%│ 38│3.6%│ 122│11.7%│ 1047│100.0%│
1893 │will A. unlikely│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1894 │Get │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1895 │stopped by Very │ 141│28.5%│ 290│58.7%│ 431│87.2%│ 41│ 8.3%│ 18│3.6%│ 4│ .8%│ 59.00│11.9%│ 22│4.5%│ 63│12.8%│ 494│100.0%│
1896 │the unlikely│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1897 │police? │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1898 ╰───────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴────┴─────┴────┴──────┴─────┴─────┴────┴─────┴─────┴─────┴──────╯
1901 ╭─────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────╮
1902 │ │ S1. Including yourself, how many members of this household are age 16 or older? │
1903 │ ├───────────┬───────────┬───────────┬───────────┬────────────┬──────────┬───────────┬────────────┤
1904 │ │ 1 │ 2 │ Subtotal │ 3 │ 3+4 │ 4+5 │ Subtotal │ Total │
1905 │ ├─────┬─────┼─────┬─────┼─────┬─────┼─────┬─────┼──────┬─────┼─────┬────┼─────┬─────┼─────┬──────┤
1906 │ │ │ │ │ │ │ │ │ │ │ │ │ Row│ │ │ │ │
1907 │ │Count│Row %│Count│Row %│Count│Row %│Count│Row %│ Count│Row %│Count│ % │Count│Row %│Count│ Row %│
1908 ├─────────────────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼──────┼─────┼─────┼────┼─────┼─────┼─────┼──────┤
1909 │105b. How likely is it that Almost │ 147│30.3%│ 246│50.7%│ 393│81.0%│ 62│12.8%│ 81.00│16.7%│ 30│6.2%│ 92│19.0%│ 485│100.0%│
1910 │drivers who have had too much certain │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1911 │to drink to drive safely will Very │ 384│34.3%│ 552│49.2%│ 936│83.5%│ 120│10.7%│171.00│15.3%│ 65│5.8%│ 185│16.5%│ 1121│100.0%│
1912 │A. Get stopped by the police? likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1913 │ Somewhat │ 590│27.8%│ 1249│58.8%│ 1839│86.6%│ 193│ 9.1%│265.00│12.5%│ 92│4.3%│ 285│13.4%│ 2124│100.0%│
1914 │ likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1915 │ Somewhat │ 278│26.6%│ 647│61.8%│ 925│88.3%│ 84│ 8.0%│116.00│11.1%│ 38│3.6%│ 122│11.7%│ 1047│100.0%│
1916 │ unlikely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1917 │ Very │ 141│28.5%│ 290│58.7%│ 431│87.2%│ 41│ 8.3%│ 59.00│11.9%│ 22│4.5%│ 63│12.8%│ 494│100.0%│
1918 │ unlikely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1919 ╰─────────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴──────┴─────┴─────┴────┴─────┴─────┴─────┴──────╯
1923 AT_SETUP([CTABLES PCOMPUTE - OTHERNM and MISSING])
1924 AT_KEYWORDS([postcompute])
1925 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1926 AT_DATA([ctables.sps],
1929 /PCOMPUTE &x=EXPR(OTHERNM)
1930 /PCOMPUTE &y=EXPR(MISSING)
1931 /PPROPERTIES &x LABEL='Drivers'
1932 /PPROPERTIES &y LABEL='Missing Values 2'
1934 /CATEGORIES VARIABLES=qn1 [OTHERNM, 5, &x, SUBTOTAL='Valid Values', MISSING, SUBTOTAL='Missing Values', &y]
1936 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1938 ╭──────────────────────────────────────────────────────────────────────────────────────────┬────────────╮
1944 ├──────────────────────────────────────────────────────────────────────────────────────────┼─────┼──────┤
1945 │ 1. How often do you usually drive a car or other motor vehicle? Every day │ 2305│ 2362│
1946 │ Several days a week │ 440│ 834│
1947 │ Once a week or less │ 125│ 236│
1948 │ Only certain times a year│ 58│ 72│
1950 │ Drivers │ 2928│ 3504│
1951 │ Valid Values │ 3120│ 3852│
1952 │ Don't know │ 3│ 5│
1954 │ Missing Values │ 12│ 15│
1955 │ Missing Values 2 │ 12│ 15│
1956 ╰──────────────────────────────────────────────────────────────────────────────────────────┴─────┴──────╯
1960 AT_SETUP([CTABLES PCOMPUTE - THRU])
1961 AT_KEYWORDS([postcompute])
1962 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1963 AT_DATA([ctables.sps],
1966 /PCOMPUTE &x=EXPR([1 THRU 2])
1967 /PCOMPUTE &y=EXPR([3 THRU 4])
1968 /PCOMPUTE &z=EXPR([5] + MISSING)
1969 /PPROPERTIES &x LABEL='Frequent Drivers'
1970 /PPROPERTIES &y LABEL='Infrequent Drivers'
1971 /PPROPERTIES &z LABEL='Not Drivers or Missing'
1973 /CATEGORIES VARIABLES=qn1 [1 THRU 2, &x, 3 THRU 4, &y, SUBTOTAL='Drivers', 5, MISSING, &z]
1975 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1977 ╭──────────────────────────────────────────────────────────────────────────────────────────┬────────────╮
1983 ├──────────────────────────────────────────────────────────────────────────────────────────┼─────┼──────┤
1984 │ 1. How often do you usually drive a car or other motor vehicle? Every day │ 2305│ 2362│
1985 │ Several days a week │ 440│ 834│
1986 │ Frequent Drivers │ 2745│ 3196│
1987 │ Once a week or less │ 125│ 236│
1988 │ Only certain times a year│ 58│ 72│
1989 │ Infrequent Drivers │ 183│ 308│
1990 │ Drivers │ 2928│ 3504│
1992 │ Don't know │ 3│ 5│
1994 │ Not Drivers or Missing │ 204│ 363│
1995 ╰──────────────────────────────────────────────────────────────────────────────────────────┴─────┴──────╯
1999 dnl I'm not sure that this is the correct behavior (see
2000 dnl https://mail.gnu.org/archive/html/pspp-users/2022-07/msg00002.html)
2001 dnl but at least this test will notify us if the behavior changes.
2002 AT_SETUP([CTABLES intersecting PCOMPUTEs])
2003 AT_KEYWORDS([PCOMPUTE postcompute])
2004 AT_DATA([ctables.sps],
2005 [[DATA LIST LIST NOTABLE/x y z.
2008 VARIABLE LEVEL x y (NOMINAL).
2022 /PCOMPUTE &a = EXPR([1] + [2])
2023 /PCOMPUTE &b = EXPR([2] + [3])
2024 /PCOMPUTE &c = EXPR([4] * [5])
2025 /PCOMPUTE &d = EXPR([5] * [6])
2027 /CATEGORIES VARIABLES=x [1, &a, 2, &b, 3]
2028 /CATEGORIES VARIABLES=y [4, &c, 5, &d, 6].
2030 AT_CHECK([pspp ctables.sps -O box=unicode], [0],
2032 ╭───────────┬─────────────────────────────────────╮
2034 │ ├─────┬─────────┬─────┬─────────┬─────┤
2035 │ │ 4 │[4] * [5]│ 5 │[5] * [6]│ 6 │
2036 │ ├─────┼─────────┼─────┼─────────┼─────┤
2037 │ │Count│ Count │Count│ Count │Count│
2038 ├───────────┼─────┼─────────┼─────┼─────────┼─────┤
2039 │x 1 │ 5│ 10│ 2│ 18│ 9│
2040 │ [1] + [2]│ 7│ .│ 5│ .│ 13│
2041 │ 2 │ 2│ 6│ 3│ 12│ 4│
2042 │ [2] + [3]│ 3│ .│ 9│ .│ 5│
2043 │ 3 │ 1│ 6│ 6│ 6│ 1│
2044 ╰───────────┴─────┴─────────┴─────┴─────────┴─────╯
2048 AT_SETUP([CTABLES string and date and time])
2051 for gender in F M; do
2052 for month in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec; do
2053 for wkday in Sun Mon Tue Wed Thu Fri Sat Sun; do
2054 printf "$weight $gender $month $wkday\n"
2055 weight=$(expr \( $weight + 3 \) % 7 + 2)
2060 AT_DATA([ctables.sps],
2061 [[DATA LIST LIST NOTABLE FILE='ctables.txt'
2062 /w (F5.0) gender (A1) fmon (MONTH3) fday (WKDAY3).
2064 VARIABLE LEVEL w (SCALE).
2065 VARIABLE LEVEL gender fmon fday (NOMINAL).
2068 fmon 'Favorite month'
2069 fday 'Favorite day of the week'.
2070 VALUE LABELS /gender 'M' 'Male' 'F' 'Female'.
2072 /PCOMPUTE &q2 = EXPR(['APR' THRU 'June'])
2073 /PPROPERTIES &q2 LABEL='Q2'
2074 /PCOMPUTE &weekend = EXPR(['sun'] + ['Sat'])
2075 /PPROPERTIES &weekend LABEL='Weekend'
2076 /TABLE fmon BY gender > fday
2077 /CATEGORIES VARIABLES=fmon ['JAN', 'FEB', 'Mar', SUBTOTAL="Q1",
2079 'JUL' THRU 'sep', SUBTOTAL="Q3",
2080 OTHERNM, SUBTOTAL='Q4']
2081 /CATEGORIES VARIABLES=gender ['M', 'F']
2082 /CATEGORIES VARIABLE=fday ['Sun', 2 THRU 6, 'Sat', &weekend] TOTAL=YES
2083 /SLABELS VISIBLE=NO.
2085 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
2087 ╭──────────────────┬───────────────────────────────────────────────────────────────────────────────────╮
2089 │ ├─────────────────────────────────────────┬─────────────────────────────────────────┤
2091 │ ├─────────────────────────────────────────┼─────────────────────────────────────────┤
2092 │ │ Favorite day of the week │ Favorite day of the week │
2093 │ ├───┬───┬───┬───┬───┬───┬───┬───────┬─────┼───┬───┬───┬───┬───┬───┬───┬───────┬─────┤
2094 │ │SUN│MON│TUE│WED│THU│FRI│SAT│Weekend│Total│SUN│MON│TUE│WED│THU│FRI│SAT│Weekend│Total│
2095 ├──────────────────┼───┼───┼───┼───┼───┼───┼───┼───────┼─────┼───┼───┼───┼───┼───┼───┼───┼───────┼─────┤
2096 │Favorite month JAN│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│ 9│ 6│ 4│ 2│ 7│ 5│ 3│ 12│ 36│
2097 │ FEB│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│
2098 │ MAR│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│
2099 │ Q1 │ 32│ 17│ 18│ 12│ 13│ 14│ 15│ │ │ 29│ 12│ 13│ 14│ 15│ 16│ 17│ │ │
2100 │ APR│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│
2101 │ MAY│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│
2102 │ JUN│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│
2103 │ Q2 │ 24│ 13│ 14│ 15│ 16│ 17│ 18│ .│ │ 28│ 15│ 16│ 17│ 18│ 12│ 13│ .│ │
2104 │ JUL│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│
2105 │ AUG│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│
2106 │ SEP│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│
2107 │ Q3 │ 54│ 29│ 31│ 33│ 28│ 30│ 32│ │ │ 62│ 33│ 28│ 30│ 32│ 27│ 29│ │ │
2108 │ OCT│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│
2109 │ NOV│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│
2110 │ DEC│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│
2111 │ Q4 │ 36│ 12│ 13│ 14│ 15│ 16│ 17│ │ │ 26│ 14│ 15│ 16│ 17│ 18│ 12│ │ │
2112 ╰──────────────────┴───┴───┴───┴───┴───┴───┴───┴───────┴─────┴───┴───┴───┴───┴───┴───┴───┴───────┴─────╯
2116 AT_SETUP([CTABLES CLABELS])
2117 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2118 AT_DATA([ctables.sps],
2120 CTABLES /TABLE AgeGroup BY qns3a.
2121 CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=OPPOSITE.
2122 CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=OPPOSITE.
2123 CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=LAYER.
2124 CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=LAYER.
2126 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
2128 ╭───────────────────────┬────────────╮
2134 ├───────────────────────┼─────┼──────┤
2135 │Age group 15 or younger│ 0│ 0│
2136 │ 16 to 25 │ 594│ 505│
2137 │ 26 to 35 │ 476│ 491│
2138 │ 36 to 45 │ 489│ 548│
2139 │ 46 to 55 │ 526│ 649│
2140 │ 56 to 65 │ 516│ 731│
2141 │ 66 or older │ 531│ 943│
2142 ╰───────────────────────┴─────┴──────╯
2145 ╭───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
2147 │ ├──────────────────────────────────────────────────────┬───────────────────────────────────────────────────────┤
2149 │ ├─────────┬───────┬──────┬──────┬──────┬───────┬───────┼──────────┬──────┬───────┬──────┬──────┬──────┬────────┤
2150 │ │ 15 or │ 16 to │ 26 to│ 36 to│ 46 to│ 56 to │ 66 or │ 15 or │ 16 to│ 26 to │ 36 to│ 46 to│ 56 to│ 66 or │
2151 │ │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │
2152 │ ├─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
2153 │ │ Count │ Count │ Count│ Count│ Count│ Count │ Count │ Count │ Count│ Count │ Count│ Count│ Count│ Count │
2154 ├───────┼─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
2155 │Age │ 0│ 594│ 476│ 489│ 526│ 516│ 531│ 0│ 505│ 491│ 548│ 649│ 731│ 943│
2156 │group │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
2157 ╰───────┴─────────┴───────┴──────┴──────┴──────┴───────┴───────┴──────────┴──────┴───────┴──────┴──────┴──────┴────────╯
2160 ╭──────────────────────────────┬────────────╮
2164 ├──────────────────────────────┼────────────┤
2165 │Age group 15 or younger Male │ 0│
2167 │ ╶────────────────────┼────────────┤
2168 │ 16 to 25 Male │ 594│
2170 │ ╶────────────────────┼────────────┤
2171 │ 26 to 35 Male │ 476│
2173 │ ╶────────────────────┼────────────┤
2174 │ 36 to 45 Male │ 489│
2176 │ ╶────────────────────┼────────────┤
2177 │ 46 to 55 Male │ 526│
2179 │ ╶────────────────────┼────────────┤
2180 │ 56 to 65 Male │ 516│
2182 │ ╶────────────────────┼────────────┤
2183 │ 66 or older Male │ 531│
2185 ╰──────────────────────────────┴────────────╯
2189 ╭─────────┬────────────╮
2195 ├─────────┼─────┼──────┤
2197 ╰─────────┴─────┴──────╯
2201 ╭─────────┬────────────╮
2207 ├─────────┼─────┼──────┤
2208 │Age group│ 594│ 505│
2209 ╰─────────┴─────┴──────╯
2213 ╭─────────┬────────────╮
2219 ├─────────┼─────┼──────┤
2220 │Age group│ 476│ 491│
2221 ╰─────────┴─────┴──────╯
2225 ╭─────────┬────────────╮
2231 ├─────────┼─────┼──────┤
2232 │Age group│ 489│ 548│
2233 ╰─────────┴─────┴──────╯
2237 ╭─────────┬────────────╮
2243 ├─────────┼─────┼──────┤
2244 │Age group│ 526│ 649│
2245 ╰─────────┴─────┴──────╯
2249 ╭─────────┬────────────╮
2255 ├─────────┼─────┼──────┤
2256 │Age group│ 516│ 731│
2257 ╰─────────┴─────┴──────╯
2261 ╭─────────┬────────────╮
2267 ├─────────┼─────┼──────┤
2268 │Age group│ 531│ 943│
2269 ╰─────────┴─────┴──────╯
2273 ╭───────────────────────┬────────────╮
2277 ├───────────────────────┼────────────┤
2278 │Age group 15 or younger│ 0│
2284 │ 66 or older │ 531│
2285 ╰───────────────────────┴────────────╯
2289 ╭───────────────────────┬────────────╮
2293 ├───────────────────────┼────────────┤
2294 │Age group 15 or younger│ 0│
2300 │ 66 or older │ 943│
2301 ╰───────────────────────┴────────────╯
2305 AT_SETUP([CTABLES missing values])
2306 AT_DATA([ctables.sps],
2307 [[DATA LIST LIST NOTABLE/x y.
2346 MISSING VALUES x (1, 2) y (2, 3).
2347 VARIABLE LEVEL ALL (NOMINAL).
2349 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN,
2350 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
2351 /CATEGORIES VARIABLES=ALL TOTAL=YES.
2352 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN,
2353 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
2354 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
2355 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2356 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2357 /CATEGORIES VARIABLES=ALL TOTAL=YES
2358 /SLABELS POSITION=ROW.
2359 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2360 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2361 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE
2362 /SLABELS POSITION=ROW.
2363 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2364 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2365 /CATEGORIES VARIABLES=x [1, 2, 3, 4] TOTAL=YES
2366 /CATEGORIES VARIABLES=y [1, 3, 4, 5] TOTAL=YES
2367 /SLABELS POSITION=ROW.
2369 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
2371 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
2372 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
2373 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
2374 │x 3.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2375 │ 4.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2376 │ 5.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2377 │ Total│ 18│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
2378 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
2379 dnl Note that Column Total N % doesn't add up to 100 because missing
2380 dnl values are included in the total but not shown as a category and this
2381 dnl is expected behavior.
2384 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
2385 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
2386 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
2387 │x 1.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
2388 │ 2.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
2389 │ 3.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2390 │ 4.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2391 │ 5.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2392 │ Total│ 30│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
2393 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
2394 dnl Note that Column Total N % doesn't add up to 100 because system-missing
2395 dnl values are included in the total but not shown as a category and this
2396 dnl is expected behavior.
2399 ╭────────────────────────┬───────────────────────────╮
2401 │ ├──────┬──────┬──────┬──────┤
2402 │ │ 1.00 │ 4.00 │ 5.00 │ Total│
2403 ├────────────────────────┼──────┼──────┼──────┼──────┤
2404 │x 3.00 Count │ 1│ 1│ 1│ 3│
2405 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2406 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2407 │ Column Total N %│ 33.3%│ 33.3%│ 33.3%│ .│
2408 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2409 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2410 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2411 │ Valid N │ │ │ │ 3│
2412 │ Total N │ │ │ │ 6│
2413 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2414 │ 4.00 Count │ 1│ 1│ 1│ 3│
2415 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2416 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2417 │ Column Total N %│ 33.3%│ 33.3%│ 33.3%│ .│
2418 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2419 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2420 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2421 │ Valid N │ │ │ │ 3│
2422 │ Total N │ │ │ │ 6│
2423 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2424 │ 5.00 Count │ 1│ 1│ 1│ 3│
2425 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2426 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2427 │ Column Total N %│ 33.3%│ 33.3%│ 33.3%│ .│
2428 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2429 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2430 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2431 │ Valid N │ │ │ │ 3│
2432 │ Total N │ │ │ │ 6│
2433 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2434 │ Total Count │ 3│ 3│ 3│ 9│
2435 │ Column % │100.0%│100.0%│100.0%│ .│
2436 │ Column Valid N %│100.0%│100.0%│100.0%│ .│
2437 │ Column Total N %│100.0%│100.0%│100.0%│ .│
2438 │ Row % │ .│ .│ .│ .│
2439 │ Row Valid N % │ .│ .│ .│ .│
2440 │ Row Total N % │ .│ .│ .│ .│
2441 │ Valid N │ 3│ 3│ 3│ 9│
2442 │ Total N │ 3│ 3│ 3│ 18│
2443 ╰────────────────────────┴──────┴──────┴──────┴──────╯
2446 ╭────────────────────────┬─────────────────────────────────────────╮
2448 │ ├──────┬──────┬──────┬──────┬──────┬──────┤
2449 │ │ 1.00 │ 2.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
2450 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2451 │x 1.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2452 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2453 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2454 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2455 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2456 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2457 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2458 │ Valid N │ │ │ │ │ │ 3│
2459 │ Total N │ │ │ │ │ │ 6│
2460 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2461 │ 2.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2462 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2463 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2464 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2465 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2466 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2467 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2468 │ Valid N │ │ │ │ │ │ 3│
2469 │ Total N │ │ │ │ │ │ 6│
2470 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2471 │ 3.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2472 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2473 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2474 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2475 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2476 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2477 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2478 │ Valid N │ │ │ │ │ │ 3│
2479 │ Total N │ │ │ │ │ │ 6│
2480 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2481 │ 4.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2482 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2483 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2484 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2485 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2486 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2487 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2488 │ Valid N │ │ │ │ │ │ 3│
2489 │ Total N │ │ │ │ │ │ 6│
2490 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2491 │ 5.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2492 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2493 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2494 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2495 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2496 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2497 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2498 │ Valid N │ │ │ │ │ │ 3│
2499 │ Total N │ │ │ │ │ │ 6│
2500 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2501 │ Total Count │ 5│ 5│ 5│ 5│ 5│ 25│
2502 │ Column % │100.0%│100.0%│100.0%│100.0%│100.0%│ .│
2503 │ Column Valid N %│100.0%│ .│ .│100.0%│100.0%│ .│
2504 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│100.0%│ .│
2505 │ Row % │ .│ .│ .│ .│ .│ .│
2506 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
2507 │ Row Total N % │ .│ .│ .│ .│ .│ .│
2508 │ Valid N │ 5│ 0│ 0│ 5│ 5│ 15│
2509 │ Total N │ 5│ 5│ 5│ 5│ 5│ 30│
2510 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────╯
2513 ╭────────────────────────┬──────────────────────────────────╮
2515 │ ├──────┬──────┬──────┬──────┬──────┤
2516 │ │ 1.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
2517 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┤
2518 │x 1.00 Count │ 1│ 1│ 1│ 1│ 4│
2519 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2520 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2521 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2522 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2523 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2524 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2525 │ Valid N │ │ │ │ │ 3│
2526 │ Total N │ │ │ │ │ 6│
2527 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2528 │ 2.00 Count │ 1│ 1│ 1│ 1│ 4│
2529 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2530 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2531 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2532 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2533 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2534 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2535 │ Valid N │ │ │ │ │ 3│
2536 │ Total N │ │ │ │ │ 6│
2537 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2538 │ 3.00 Count │ 1│ 1│ 1│ 1│ 4│
2539 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2540 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2541 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2542 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2543 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2544 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2545 │ Valid N │ │ │ │ │ 3│
2546 │ Total N │ │ │ │ │ 6│
2547 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2548 │ 4.00 Count │ 1│ 1│ 1│ 1│ 4│
2549 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2550 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2551 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2552 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2553 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2554 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2555 │ Valid N │ │ │ │ │ 3│
2556 │ Total N │ │ │ │ │ 6│
2557 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2558 │ Total Count │ 4│ 4│ 4│ 4│ 16│
2559 │ Column % │100.0%│100.0%│100.0%│100.0%│ .│
2560 │ Column Valid N %│100.0%│ .│100.0%│100.0%│ .│
2561 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│ .│
2562 │ Row % │ .│ .│ .│ .│ .│
2563 │ Row Valid N % │ .│ .│ .│ .│ .│
2564 │ Row Total N % │ .│ .│ .│ .│ .│
2565 │ Valid N │ 4│ 0│ 4│ 4│ 12│
2566 │ Total N │ 4│ 4│ 4│ 4│ 24│
2567 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────╯
2571 AT_SETUP([CTABLES SMISSING=LISTWISE])
2572 AT_KEYWORDS([SMISSING LISTWISE])
2573 AT_DATA([ctables.sps],
2574 [[DATA LIST LIST NOTABLE/x y z.
2582 VARIABLE LEVEL x (NOMINAL).
2584 CTABLES /TABLE (y + z) > x.
2585 CTABLES /SMISSING LISTWISE /TABLE (y + z) > x.
2587 * The following doesn't come out as listwise because the tables are
2588 separate, not linked by an > operator.
2589 CTABLES /SMISSING LISTWISE /TABLE (y > x) + (z > x).
2591 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
2621 AT_SETUP([CTABLES VLABELS - variables on different axes])
2622 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2623 AT_DATA([ctables.sps],
2625 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=DEFAULT /TABLE qnd5a BY qns3a.
2626 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NAME /TABLE qnd5a BY qns3a.
2627 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=LABEL /TABLE qnd5a BY qns3a.
2628 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=BOTH /TABLE qnd5a BY qns3a.
2629 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a BY qns3a.
2631 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2633 ╭────────────────────────────────────────────────────────────────┬────────────╮
2639 ├────────────────────────────────────────────────────────────────┼─────┼──────┤
2640 │D5a. What would you say is your primary Cuban │ 13│ 7│
2641 │ethnic background? Mexican │ 175│ 136│
2643 │ South American │ 21│ 13│
2644 │ Central American │ 27│ 25│
2645 │ Puerto Rican, OR │ 37│ 41│
2646 │ Something else │ 35│ 33│
2647 │ Multiple - cannot │ 2│ 5│
2649 ╰────────────────────────────────────────────────────────────────┴─────┴──────╯
2652 ╭──────────────────────────────────┬────────────╮
2658 ├──────────────────────────────────┼─────┼──────┤
2659 │QND5A Cuban │ 13│ 7│
2660 │ Mexican │ 175│ 136│
2662 │ South American │ 21│ 13│
2663 │ Central American │ 27│ 25│
2664 │ Puerto Rican, OR │ 37│ 41│
2665 │ Something else │ 35│ 33│
2666 │ Multiple - cannot choose one│ 2│ 5│
2667 ╰──────────────────────────────────┴─────┴──────╯
2670 ╭────────────────────────────────────────────────────────────────┬────────────╮
2676 ├────────────────────────────────────────────────────────────────┼─────┼──────┤
2677 │D5a. What would you say is your primary Cuban │ 13│ 7│
2678 │ethnic background? Mexican │ 175│ 136│
2680 │ South American │ 21│ 13│
2681 │ Central American │ 27│ 25│
2682 │ Puerto Rican, OR │ 37│ 41│
2683 │ Something else │ 35│ 33│
2684 │ Multiple - cannot │ 2│ 5│
2686 ╰────────────────────────────────────────────────────────────────┴─────┴──────╯
2689 ╭────────────────────────────────────────────────────────────┬────────────────╮
2692 │ ├───────┬────────┤
2694 │ ├───────┼────────┤
2696 ├────────────────────────────────────────────────────────────┼───────┼────────┤
2697 │QND5A D5a. What would you say is your Cuban │ 13│ 7│
2698 │primary ethnic background? Mexican │ 175│ 136│
2700 │ South American │ 21│ 13│
2701 │ Central American │ 27│ 25│
2702 │ Puerto Rican, OR │ 37│ 41│
2703 │ Something else │ 35│ 33│
2704 │ Multiple - cannot │ 2│ 5│
2706 ╰────────────────────────────────────────────────────────────┴───────┴────────╯
2709 ╭────────────────────────────┬─────┬──────╮
2713 ├────────────────────────────┼─────┼──────┤
2715 │Mexican │ 175│ 136│
2717 │South American │ 21│ 13│
2718 │Central American │ 27│ 25│
2719 │Puerto Rican, OR │ 37│ 41│
2720 │Something else │ 35│ 33│
2721 │Multiple - cannot choose one│ 2│ 5│
2722 ╰────────────────────────────┴─────┴──────╯
2726 AT_SETUP([CTABLES VLABELS - stacked variables])
2727 AT_KEYWORDS([stack stacking])
2728 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2729 AT_DATA([ctables.sps],
2731 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NAME /TABLE qnd5a + qns3a.
2732 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NAME /TABLE qnd5a + qns3a.
2733 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NONE /TABLE qnd5a + qns3a.
2734 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NONE /TABLE qnd5a + qns3a.
2735 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a + qns3a.
2737 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2739 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2741 ├───────────────────────────────────────────────────────────────────────┼─────┤
2742 │D5a. What would you say is your primary ethnic Cuban │ 20│
2743 │background? Mexican │ 311│
2745 │ South American │ 34│
2746 │ Central American │ 52│
2747 │ Puerto Rican, OR │ 78│
2748 │ Something else │ 68│
2749 │ Multiple - cannot │ 7│
2751 ├───────────────────────────────────────────────────────────────────────┼─────┤
2754 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2757 ╭─────────────────────────────────────────┬─────╮
2759 ├─────────────────────────────────────────┼─────┤
2763 │ South American │ 34│
2764 │ Central American │ 52│
2765 │ Puerto Rican, OR │ 78│
2766 │ Something else │ 68│
2767 │ Multiple - cannot choose one│ 7│
2768 ├─────────────────────────────────────────┼─────┤
2769 │S3a. GENDER: Male │ 3132│
2771 ╰─────────────────────────────────────────┴─────╯
2774 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2776 ├───────────────────────────────────────────────────────────────────────┼─────┤
2777 │D5a. What would you say is your primary ethnic Cuban │ 20│
2778 │background? Mexican │ 311│
2780 │ South American │ 34│
2781 │ Central American │ 52│
2782 │ Puerto Rican, OR │ 78│
2783 │ Something else │ 68│
2784 │ Multiple - cannot │ 7│
2786 ├───────────────────────────────────────────────────────────────────────┼─────┤
2788 ├───────────────────────────────────────────────────────────────────────┼─────┤
2790 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2793 ╭─────────────────────────────┬─────╮
2795 ├─────────────────────────────┼─────┤
2797 ├─────────────────────────────┼─────┤
2799 ├─────────────────────────────┼─────┤
2801 ├─────────────────────────────┼─────┤
2802 │South American │ 34│
2803 ├─────────────────────────────┼─────┤
2804 │Central American │ 52│
2805 ├─────────────────────────────┼─────┤
2806 │Puerto Rican, OR │ 78│
2807 ├─────────────────────────────┼─────┤
2808 │Something else │ 68│
2809 ├─────────────────────────────┼─────┤
2810 │Multiple - cannot choose one │ 7│
2811 ├─────────────────────────────┼─────┤
2812 │S3a. GENDER: Male │ 3132│
2814 ╰─────────────────────────────┴─────╯
2817 ╭────────────────────────────┬─────╮
2819 ├────────────────────────────┼─────┤
2823 │South American │ 34│
2824 │Central American │ 52│
2825 │Puerto Rican, OR │ 78│
2826 │Something else │ 68│
2827 │Multiple - cannot choose one│ 7│
2830 ╰────────────────────────────┴─────╯
2834 AT_SETUP([CTABLES VLABELS - nested variables])
2835 AT_KEYWORDS([nest nesting])
2836 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2837 AT_DATA([ctables.sps],
2839 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NAME /TABLE qnd5a > qns3a.
2840 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NAME /TABLE qnd5a > qns3a.
2841 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NONE /TABLE qnd5a > qns3a.
2842 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NONE /TABLE qnd5a > qns3a.
2843 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a > qns3a.
2845 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2847 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2849 ├───────────────────────────────────────────────────────────────────────┼─────┤
2850 │D5a. What would you say is your Cuban QNS3A Male │ 13│
2851 │primary ethnic background? Female│ 7│
2852 │ ╶─────────────────────────────────┼─────┤
2853 │ Mexican QNS3A Male │ 175│
2855 │ ╶─────────────────────────────────┼─────┤
2856 │ Spanish QNS3A Male │ 20│
2858 │ ╶─────────────────────────────────┼─────┤
2859 │ South American QNS3A Male │ 21│
2861 │ ╶─────────────────────────────────┼─────┤
2862 │ Central American QNS3A Male │ 27│
2864 │ ╶─────────────────────────────────┼─────┤
2865 │ Puerto Rican, OR QNS3A Male │ 37│
2867 │ ╶─────────────────────────────────┼─────┤
2868 │ Something else QNS3A Male │ 35│
2870 │ ╶─────────────────────────────────┼─────┤
2871 │ Multiple - cannot QNS3A Male │ 2│
2872 │ choose one Female│ 5│
2873 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2876 ╭──────────────────────────────────────────────────────┬─────╮
2878 ├──────────────────────────────────────────────────────┼─────┤
2879 │QND5A Cuban S3a. GENDER: Male │ 13│
2881 │ ╶────────────────────────────────────────────────┼─────┤
2882 │ Mexican S3a. GENDER: Male │ 175│
2884 │ ╶────────────────────────────────────────────────┼─────┤
2885 │ Spanish S3a. GENDER: Male │ 20│
2887 │ ╶────────────────────────────────────────────────┼─────┤
2888 │ South American S3a. GENDER: Male │ 21│
2890 │ ╶────────────────────────────────────────────────┼─────┤
2891 │ Central American S3a. GENDER: Male │ 27│
2893 │ ╶────────────────────────────────────────────────┼─────┤
2894 │ Puerto Rican, OR S3a. GENDER: Male │ 37│
2896 │ ╶────────────────────────────────────────────────┼─────┤
2897 │ Something else S3a. GENDER: Male │ 35│
2899 │ ╶────────────────────────────────────────────────┼─────┤
2900 │ Multiple - cannot choose one S3a. GENDER: Male │ 2│
2902 ╰──────────────────────────────────────────────────────┴─────╯
2905 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2907 ├───────────────────────────────────────────────────────────────────────┼─────┤
2908 │D5a. What would you say is your primary Cuban Male │ 13│
2909 │ethnic background? Female│ 7│
2910 │ ╶────────────────────────────┼─────┤
2911 │ Mexican Male │ 175│
2913 │ ╶────────────────────────────┼─────┤
2914 │ Spanish Male │ 20│
2916 │ ╶────────────────────────────┼─────┤
2917 │ South American Male │ 21│
2919 │ ╶────────────────────────────┼─────┤
2920 │ Central American Male │ 27│
2922 │ ╶────────────────────────────┼─────┤
2923 │ Puerto Rican, OR Male │ 37│
2925 │ ╶────────────────────────────┼─────┤
2926 │ Something else Male │ 35│
2928 │ ╶────────────────────────────┼─────┤
2929 │ Multiple - cannot Male │ 2│
2930 │ choose one Female│ 5│
2931 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2934 ╭────────────────────────────────────────────────┬─────╮
2936 ├────────────────────────────────────────────────┼─────┤
2937 │Cuban S3a. GENDER: Male │ 13│
2939 ├────────────────────────────────────────────────┼─────┤
2940 │Mexican S3a. GENDER: Male │ 175│
2942 ├────────────────────────────────────────────────┼─────┤
2943 │Spanish S3a. GENDER: Male │ 20│
2945 ├────────────────────────────────────────────────┼─────┤
2946 │South American S3a. GENDER: Male │ 21│
2948 ├────────────────────────────────────────────────┼─────┤
2949 │Central American S3a. GENDER: Male │ 27│
2951 ├────────────────────────────────────────────────┼─────┤
2952 │Puerto Rican, OR S3a. GENDER: Male │ 37│
2954 ├────────────────────────────────────────────────┼─────┤
2955 │Something else S3a. GENDER: Male │ 35│
2957 ├────────────────────────────────────────────────┼─────┤
2958 │Multiple - cannot choose one S3a. GENDER: Male │ 2│
2960 ╰────────────────────────────────────────────────┴─────╯
2963 ╭───────────────────────────────────┬─────╮
2965 ├───────────────────────────────────┼─────┤
2968 ├───────────────────────────────────┼─────┤
2969 │Mexican Male │ 175│
2971 ├───────────────────────────────────┼─────┤
2974 ├───────────────────────────────────┼─────┤
2975 │South American Male │ 21│
2977 ├───────────────────────────────────┼─────┤
2978 │Central American Male │ 27│
2980 ├───────────────────────────────────┼─────┤
2981 │Puerto Rican, OR Male │ 37│
2983 ├───────────────────────────────────┼─────┤
2984 │Something else Male │ 35│
2986 ├───────────────────────────────────┼─────┤
2987 │Multiple - cannot choose one Male │ 2│
2989 ╰───────────────────────────────────┴─────╯
2993 AT_SETUP([CTABLES FORMAT EMPTY])
2994 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2995 AT_DATA([ctables.sps],
2997 CTABLES /FORMAT EMPTY=ZERO /TABLE qnd5a BY qnd5.
2998 CTABLES /FORMAT EMPTY=BLANK /TABLE qnd5a BY qnd5.
2999 CTABLES /FORMAT EMPTY='n/a' /TABLE qnd5a BY qnd5.
3001 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
3003 ╭─────────────────────────────────────────────┬───────────────────────────────╮
3004 │ │ D5. ETHNICITY: Are you of │
3005 │ │ Hispanic or Latino origin or │
3007 │ ├───────────────┬───────────────┤
3009 │ ├───────────────┼───────────────┤
3011 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
3012 │D5a. What would you say is Cuban │ 20│ 0│
3013 │your primary ethnic Mexican │ 311│ 0│
3014 │background? Spanish │ 48│ 0│
3015 │ South American │ 34│ 0│
3016 │ Central American│ 52│ 0│
3017 │ Puerto Rican, OR│ 78│ 0│
3018 │ Something else │ 68│ 0│
3019 │ Multiple - │ 7│ 0│
3020 │ cannot choose │ │ │
3022 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
3025 ╭─────────────────────────────────────────────┬───────────────────────────────╮
3026 │ │ D5. ETHNICITY: Are you of │
3027 │ │ Hispanic or Latino origin or │
3029 │ ├───────────────┬───────────────┤
3031 │ ├───────────────┼───────────────┤
3033 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
3034 │D5a. What would you say is Cuban │ 20│ │
3035 │your primary ethnic Mexican │ 311│ │
3036 │background? Spanish │ 48│ │
3037 │ South American │ 34│ │
3038 │ Central American│ 52│ │
3039 │ Puerto Rican, OR│ 78│ │
3040 │ Something else │ 68│ │
3042 │ cannot choose │ │ │
3044 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
3047 ╭─────────────────────────────────────────────┬───────────────────────────────╮
3048 │ │ D5. ETHNICITY: Are you of │
3049 │ │ Hispanic or Latino origin or │
3051 │ ├───────────────┬───────────────┤
3053 │ ├───────────────┼───────────────┤
3055 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
3056 │D5a. What would you say is Cuban │ 20│n/a │
3057 │your primary ethnic Mexican │ 311│n/a │
3058 │background? Spanish │ 48│n/a │
3059 │ South American │ 34│n/a │
3060 │ Central American│ 52│n/a │
3061 │ Puerto Rican, OR│ 78│n/a │
3062 │ Something else │ 68│n/a │
3063 │ Multiple - │ 7│n/a │
3064 │ cannot choose │ │ │
3066 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
3070 AT_SETUP([CTABLES FORMAT MISSING])
3071 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3072 AT_DATA([ctables.sps],
3074 CTABLES /FORMAT MISSING='(no data)' /TABLE qnd5a[COLPCT] BY qnd5.
3076 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
3078 ╭─────────────────────────────────────────────┬───────────────────────────────╮
3079 │ │ D5. ETHNICITY: Are you of │
3080 │ │ Hispanic or Latino origin or │
3082 │ ├───────────────┬───────────────┤
3084 │ ├───────────────┼───────────────┤
3085 │ │ Column % │ Column % │
3086 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
3087 │D5a. What would you say is Cuban │ 3.2%│(no data) │
3088 │your primary ethnic Mexican │ 50.3%│(no data) │
3089 │background? Spanish │ 7.8%│(no data) │
3090 │ South American │ 5.5%│(no data) │
3091 │ Central American│ 8.4%│(no data) │
3092 │ Puerto Rican, OR│ 12.6%│(no data) │
3093 │ Something else │ 11.0%│(no data) │
3094 │ Multiple - │ 1.1%│(no data) │
3095 │ cannot choose │ │ │
3097 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
3101 AT_SETUP([CTABLES HIDESMALLCOUNTS])
3102 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3103 AT_DATA([ctables.sps],
3105 CTABLES /TABLE qn38[c][COUNT, COLPCT].
3106 CTABLES /HIDESMALLCOUNTS /TABLE qn38[c][COUNT, COLPCT].
3107 CTABLES /HIDESMALLCOUNTS COUNT=10 /TABLE qn38[c][COUNT, COLPCT].
3109 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
3111 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
3113 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
3114 │38. How many drinks did you have on that Less than one│ 7│ .5%│
3115 │occasion? 1 │ 491│ 34.9%│
3135 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
3138 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
3140 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
3141 │38. How many drinks did you have on that Less than one│ 7│ .5%│
3142 │occasion? 1 │ 491│ 34.9%│
3162 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
3165 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
3167 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
3168 │38. How many drinks did you have on that Less than one│<10 │ .5%│
3169 │occasion? 1 │ 491│ 34.9%│
3189 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
3193 AT_SETUP([CTABLES FORMAT MINCOLWIDTH MAXCOLWIDTH])
3194 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3195 AT_DATA([ctables.sps],
3197 CTABLES /FORMAT MINCOLWIDTH=1 MAXCOLWIDTH=2 UNITS=INCHES /TABLE BY qns3a.
3199 AT_CHECK([pspp ctables.sps -o - -O box=unicode -o pspp.spv], [0], [dnl
3211 AT_CHECK([pspp-output get-table-look pspp.spv pspp.stt])
3212 AT_CHECK([sed 's/ /\n/g' pspp.stt | grep ColumnWidth | sort], [0], [dnl
3213 maximumColumnWidth="192"
3214 minimumColumnWidth="96"
3218 AT_SETUP([CTABLES special formats])
3219 AT_KEYWORDS([NEGPAREN NEQUAL PAREN PCTPAREN])
3220 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3221 AT_DATA([ctables.sps],
3223 COMPUTE x = qnd3 - 4.
3224 CTABLES /TABLE x[MINIMUM NEGPAREN8.1, MINIMUM NEQUAL8.1, MINIMUM PAREN8.1, MINIMUM PCTPAREN8.1, MAXIMUM NEGPAREN8.1, MAXIMUM NEQUAL8.1, MAXIMUM PAREN8.1, MAXIMUM PCTPAREN8.1].
3226 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
3228 ╭─┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────╮
3229 │ │Minimum│Minimum│Minimum│Minimum│Maximum│Maximum│Maximum│Maximum│
3230 ├─┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
3231 │x│(3.0) │N=-3.0 │(-3.0) │(-3.0%)│8.0 │N=8.0 │(8.0) │(8.0%) │
3232 ╰─┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────╯
3236 AT_SETUP([CTABLES TITLES])
3237 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3238 AT_DATA([ctables.sps],
3241 /VLABELS VARIABLES=qn1 DISPLAY=NONE
3242 /TABLE ((qn1[c][COUNT])) BY qns3a[c] > qnd5
3243 /TITLES TITLE='How often do you drive?'
3244 CAPTION='Generated )TIME on )DATE'
3247 AT_CHECK([pspp ctables.sps -O box=unicode | sed 's/..:..:../HH:MM:SS/
3248 s&../../..&MM/DD/YY&'], [0], [dnl
3249 How often do you drive?
3250 ╭───────────────────────────────────┬─────────────────────────────────────────╮
3252 │ ├────────────────────┬────────────────────┤
3254 │ ├────────────────────┼────────────────────┤
3255 │ │ D5. ETHNICITY: Are │ D5. ETHNICITY: Are │
3256 │ │ you of Hispanic or │ you of Hispanic or │
3257 │ │ Latino origin or │ Latino origin or │
3258 │( ( 1. How often do you usually │ descent? │ descent? │
3259 │drive a car or other motor ├─────────┬──────────┼─────────┬──────────┤
3260 │vehicle?) ) BY S3a. GENDER: > D5. │ Yes │ No │ Yes │ No │
3261 │ETHNICITY: Are you of Hispanic or ├─────────┼──────────┼─────────┼──────────┤
3262 │Latino origin or descent? │ Count │ Count │ Count │ Count │
3263 ├───────────────────────────────────┼─────────┼──────────┼─────────┼──────────┤
3264 │Every day │ 218│ 2066│ 166│ 2175│
3265 │Several days a week │ 44│ 391│ 45│ 782│
3266 │Once a week or less │ 16│ 109│ 12│ 223│
3267 │Only certain times a year │ 15│ 41│ 11│ 61│
3268 │Never │ 39│ 150│ 56│ 278│
3269 ╰───────────────────────────────────┴─────────┴──────────┴─────────┴──────────╯
3270 Generated HH:MM:SS on MM/DD/YY
3274 AT_SETUP([CTABLES area definitions])
3275 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3276 AT_DATA([ctables.sps],
3279 /VLABELS VARIABLES=ALL DISPLAY=NAME
3280 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3281 /SLABELS POSITION=ROW
3282 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[ROWID, LAYERROWID]
3283 /SLABELS POSITION=ROW
3284 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[COLID, LAYERCOLID]
3285 /SLABELS POSITION=ROW.
3287 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=80], [0], [dnl
3290 ╭─────────────────────────────┬─────────────┬──────╮
3292 │ ├──────┬──────┼───┬──┤
3294 │ ├──────┼──────┤ │ │
3295 │ │ QN86 │ QN86 │ │ │
3296 │ ├───┬──┼───┬──┤ │ │
3297 │ │Yes│No│Yes│No│Yes│No│
3298 ├─────────────────────────────┼───┼──┼───┼──┼───┼──┤
3299 │QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3300 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3301 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│
3302 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3303 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3304 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3305 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│
3306 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┤
3307 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3308 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3309 │ Subtable ID│ 4│ 4│ 5│ 5│ 6│ 6│
3310 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3311 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3312 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3313 │ Subtable ID│ 4│ 4│ 5│ 5│ 6│ 6│
3314 ╰─────────────────────────────┴───┴──┴───┴──┴───┴──╯
3318 ╭─────────────────────────────┬─────────────┬──────╮
3320 │ ├──────┬──────┼───┬──┤
3322 │ ├──────┼──────┤ │ │
3323 │ │ QN86 │ QN86 │ │ │
3324 │ ├───┬──┼───┬──┤ │ │
3325 │ │Yes│No│Yes│No│Yes│No│
3326 ├─────────────────────────────┼───┼──┼───┼──┼───┼──┤
3327 │QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3328 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3329 │ Subtable ID│ 7│ 7│ 8│ 8│ 9│ 9│
3330 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3331 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3332 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3333 │ Subtable ID│ 7│ 7│ 8│ 8│ 9│ 9│
3334 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┤
3335 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3336 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3337 │ Subtable ID│ 10│10│ 11│11│ 12│12│
3338 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3339 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3340 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3341 │ Subtable ID│ 10│10│ 11│11│ 12│12│
3342 ╰─────────────────────────────┴───┴──┴───┴──┴───┴──╯
3346 ╭──────────────────────────────┬─────────────┬──────╮
3348 │ ├──────┬──────┼───┬──┤
3350 │ ├──────┼──────┤ │ │
3351 │ │ QN86 │ QN86 │ │ │
3352 │ ├───┬──┼───┬──┤ │ │
3353 │ │Yes│No│Yes│No│Yes│No│
3354 ├──────────────────────────────┼───┼──┼───┼──┼───┼──┤
3355 │QN61 Yes QN57 Yes Row ID │ 1│ 1│ 2│ 2│ 3│ 3│
3356 │ Layer Row ID│ 1│ 1│ 1│ 1│ 2│ 2│
3357 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3358 │ No Row ID │ 4│ 4│ 5│ 5│ 6│ 6│
3359 │ Layer Row ID│ 3│ 3│ 3│ 3│ 4│ 4│
3360 │ ╶─────────────────────────┼───┼──┼───┼──┼───┼──┤
3361 │ No QN57 Yes Row ID │ 7│ 7│ 8│ 8│ 9│ 9│
3362 │ Layer Row ID│ 5│ 5│ 5│ 5│ 6│ 6│
3363 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3364 │ No Row ID │ 10│10│ 11│11│ 12│12│
3365 │ Layer Row ID│ 7│ 7│ 7│ 7│ 8│ 8│
3366 ╰──────────────────────────────┴───┴──┴───┴──┴───┴──╯
3370 ╭──────────────────────────────┬─────────────┬──────╮
3372 │ ├──────┬──────┼───┬──┤
3374 │ ├──────┼──────┤ │ │
3375 │ │ QN86 │ QN86 │ │ │
3376 │ ├───┬──┼───┬──┤ │ │
3377 │ │Yes│No│Yes│No│Yes│No│
3378 ├──────────────────────────────┼───┼──┼───┼──┼───┼──┤
3379 │QN61 Yes QN57 Yes Row ID │ 13│13│ 14│14│ 15│15│
3380 │ Layer Row ID│ 9│ 9│ 9│ 9│ 10│10│
3381 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3382 │ No Row ID │ 16│16│ 17│17│ 18│18│
3383 │ Layer Row ID│ 11│11│ 11│11│ 12│12│
3384 │ ╶─────────────────────────┼───┼──┼───┼──┼───┼──┤
3385 │ No QN57 Yes Row ID │ 19│19│ 20│20│ 21│21│
3386 │ Layer Row ID│ 13│13│ 13│13│ 14│14│
3387 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3388 │ No Row ID │ 22│22│ 23│23│ 24│24│
3389 │ Layer Row ID│ 15│15│ 15│15│ 16│16│
3390 ╰──────────────────────────────┴───┴──┴───┴──┴───┴──╯
3394 ╭─────────────────────────────────┬─────────────┬──────╮
3396 │ ├──────┬──────┼───┬──┤
3398 │ ├──────┼──────┤ │ │
3399 │ │ QN86 │ QN86 │ │ │
3400 │ ├───┬──┼───┬──┤ │ │
3401 │ │Yes│No│Yes│No│Yes│No│
3402 ├─────────────────────────────────┼───┼──┼───┼──┼───┼──┤
3403 │QN61 Yes QN57 Yes Column ID │ 1│ 2│ 3│ 4│ 5│ 6│
3404 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3405 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3406 │ No Column ID │ 1│ 2│ 3│ 4│ 5│ 6│
3407 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3408 │ ╶────────────────────────────┼───┼──┼───┼──┼───┼──┤
3409 │ No QN57 Yes Column ID │ 7│ 8│ 9│10│ 11│12│
3410 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3411 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3412 │ No Column ID │ 7│ 8│ 9│10│ 11│12│
3413 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3414 ╰─────────────────────────────────┴───┴──┴───┴──┴───┴──╯
3418 ╭─────────────────────────────────┬─────────────┬──────╮
3420 │ ├──────┬──────┼───┬──┤
3422 │ ├──────┼──────┤ │ │
3423 │ │ QN86 │ QN86 │ │ │
3424 │ ├───┬──┼───┬──┤ │ │
3425 │ │Yes│No│Yes│No│Yes│No│
3426 ├─────────────────────────────────┼───┼──┼───┼──┼───┼──┤
3427 │QN61 Yes QN57 Yes Column ID │ 13│14│ 15│16│ 17│18│
3428 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3429 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3430 │ No Column ID │ 13│14│ 15│16│ 17│18│
3431 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3432 │ ╶────────────────────────────┼───┼──┼───┼──┼───┼──┤
3433 │ No QN57 Yes Column ID │ 19│20│ 21│22│ 23│24│
3434 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3435 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3436 │ No Column ID │ 19│20│ 21│22│ 23│24│
3437 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3438 ╰─────────────────────────────────┴───┴──┴───┴──┴───┴──╯
3442 AT_SETUP([CTABLES area definitions with CLABELS ROWLABELS=OPPOSITE])
3443 AT_KEYWORDS([ROWLABELS OPPOSITE])
3444 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3445 AT_DATA([ctables.sps],
3448 /VLABELS VARIABLES=ALL DISPLAY=NAME
3449 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3450 /SLABELS POSITION=ROW
3451 /CLABELS ROWLABELS=OPPOSITE
3452 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3453 /SLABELS POSITION=ROW
3454 /CLABELS ROWLABELS=OPPOSITE
3455 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3456 /SLABELS POSITION=ROW
3457 /CLABELS ROWLABELS=OPPOSITE.
3459 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3462 ╭──────────────────────────────────┬───────────────────────────────────────────────────────╮
3464 │ ├───────────────────────────┬───────────────────────────┤
3466 │ ├───────────────────────────┼───────────────────────────┤
3468 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3469 │ │ Yes │ No │ Yes │ No │
3470 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3471 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3472 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3473 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3474 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3475 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3476 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3477 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3478 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3479 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3480 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3481 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3482 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3483 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3484 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3485 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3486 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3487 │ Subtable ID│ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3488 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3489 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3490 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3491 │ Subtable ID│ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3492 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3496 ╭──────────────────────────────────┬───────────────────────────────────────────────────────╮
3498 │ ├───────────────────────────┬───────────────────────────┤
3500 │ ├───────────────────────────┼───────────────────────────┤
3502 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3503 │ │ Yes │ No │ Yes │ No │
3504 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3505 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3506 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3507 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3508 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3509 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3510 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3511 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3512 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3513 │ Subtable ID│ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3514 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3515 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3516 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3517 │ Subtable ID│ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3518 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3519 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3520 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3521 │ Subtable ID│ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3522 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3523 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3524 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3525 │ Subtable ID│ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3526 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3530 ╭───────────────────────────────────┬───────────────────────────────────────────────────────╮
3532 │ ├───────────────────────────┬───────────────────────────┤
3534 │ ├───────────────────────────┼───────────────────────────┤
3536 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3537 │ │ Yes │ No │ Yes │ No │
3538 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3539 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3540 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3541 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3542 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3543 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3544 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3545 │QN26 Yes QN61 Yes QN57 Row ID │ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3546 │ Layer Row ID│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3547 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3548 │ No QN57 Row ID │ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3549 │ Layer Row ID│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3550 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3551 │ No QN61 Yes QN57 Row ID │ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3552 │ Layer Row ID│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3553 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3554 │ No QN57 Row ID │ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3555 │ Layer Row ID│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3556 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3560 ╭───────────────────────────────────┬───────────────────────────────────────────────────────╮
3562 │ ├───────────────────────────┬───────────────────────────┤
3564 │ ├───────────────────────────┼───────────────────────────┤
3566 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3567 │ │ Yes │ No │ Yes │ No │
3568 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3569 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3570 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3571 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3572 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3573 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3574 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3575 │QN26 Yes QN61 Yes QN57 Row ID │ 33│33│ 34│34│ 35│35│ 36│36│ 37│37│ 38│38│ 39│39│ 40│40│
3576 │ Layer Row ID│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│
3577 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3578 │ No QN57 Row ID │ 41│41│ 42│42│ 43│43│ 44│44│ 45│45│ 46│46│ 47│47│ 48│48│
3579 │ Layer Row ID│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│
3580 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3581 │ No QN61 Yes QN57 Row ID │ 49│49│ 50│50│ 51│51│ 52│52│ 53│53│ 54│54│ 55│55│ 56│56│
3582 │ Layer Row ID│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│
3583 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3584 │ No QN57 Row ID │ 57│57│ 58│58│ 59│59│ 60│60│ 61│61│ 62│62│ 63│63│ 64│64│
3585 │ Layer Row ID│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│
3586 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3590 ╭──────────────────────────────────────┬───────────────────────────────────────────────────────╮
3592 │ ├───────────────────────────┬───────────────────────────┤
3594 │ ├───────────────────────────┼───────────────────────────┤
3596 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3597 │ │ Yes │ No │ Yes │ No │
3598 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3599 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3600 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3601 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3602 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3603 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3604 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3605 │QN26 Yes QN61 Yes QN57 Column ID │ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3606 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3607 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3608 │ No QN57 Column ID │ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3609 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3610 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3611 │ No QN61 Yes QN57 Column ID │ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3612 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3613 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3614 │ No QN57 Column ID │ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3615 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3616 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3620 ╭──────────────────────────────────────┬───────────────────────────────────────────────────────╮
3622 │ ├───────────────────────────┬───────────────────────────┤
3624 │ ├───────────────────────────┼───────────────────────────┤
3626 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3627 │ │ Yes │ No │ Yes │ No │
3628 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3629 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3630 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3631 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3632 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3633 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3634 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3635 │QN26 Yes QN61 Yes QN57 Column ID │ 33│34│ 35│36│ 37│38│ 39│40│ 41│42│ 43│44│ 45│46│ 47│48│
3636 │ Layer Column ID│ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3637 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3638 │ No QN57 Column ID │ 33│34│ 35│36│ 37│38│ 39│40│ 41│42│ 43│44│ 45│46│ 47│48│
3639 │ Layer Column ID│ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3640 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3641 │ No QN61 Yes QN57 Column ID │ 49│50│ 51│52│ 53│54│ 55│56│ 57│58│ 59│60│ 61│62│ 63│64│
3642 │ Layer Column ID│ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3643 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3644 │ No QN57 Column ID │ 49│50│ 51│52│ 53│54│ 55│56│ 57│58│ 59│60│ 61│62│ 63│64│
3645 │ Layer Column ID│ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3646 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3650 AT_SETUP([CTABLES area definitions with CLABELS COLLABELS=OPPOSITE])
3651 AT_KEYWORDS([COLLABELS OPPOSITE])
3652 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3653 AT_DATA([ctables.sps],
3656 /VLABELS VARIABLES=ALL DISPLAY=NAME
3657 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3658 /SLABELS POSITION=ROW
3659 /CLABELS COLLABELS=OPPOSITE
3660 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3661 /SLABELS POSITION=ROW
3662 /CLABELS COLLABELS=OPPOSITE
3663 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3664 /SLABELS POSITION=ROW
3665 /CLABELS COLLABELS=OPPOSITE.
3667 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3670 ╭──────────────────────────────────────────┬───────────────────╮
3672 │ ├─────────┬─────────┤
3674 │ ├─────────┼─────────┤
3676 │ ├────┬────┼────┬────┤
3677 │ │ Yes│ No │ Yes│ No │
3678 │ ├────┼────┼────┼────┤
3679 │ │QN86│QN86│QN86│QN86│
3680 ├──────────────────────────────────────────┼────┼────┼────┼────┤
3681 │QN26 Yes QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3682 │ Layer ID │ 1│ 1│ 1│ 1│
3683 │ Subtable ID│ 1│ 1│ 2│ 2│
3684 │ ╶───────────────┼────┼────┼────┼────┤
3685 │ No Table ID │ 1│ 1│ 1│ 1│
3686 │ Layer ID │ 1│ 1│ 1│ 1│
3687 │ Subtable ID│ 1│ 1│ 2│ 2│
3688 │ ╶───────────────────┼────┼────┼────┼────┤
3689 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3690 │ Layer ID │ 1│ 1│ 1│ 1│
3691 │ Subtable ID│ 3│ 3│ 4│ 4│
3692 │ ╶───────────────┼────┼────┼────┼────┤
3693 │ No Table ID │ 1│ 1│ 1│ 1│
3694 │ Layer ID │ 1│ 1│ 1│ 1│
3695 │ Subtable ID│ 3│ 3│ 4│ 4│
3696 │ ╶────────────────────────────┼────┼────┼────┼────┤
3697 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3698 │ Layer ID │ 1│ 1│ 1│ 1│
3699 │ Subtable ID│ 5│ 5│ 6│ 6│
3700 │ ╶───────────────┼────┼────┼────┼────┤
3701 │ No Table ID │ 1│ 1│ 1│ 1│
3702 │ Layer ID │ 1│ 1│ 1│ 1│
3703 │ Subtable ID│ 5│ 5│ 6│ 6│
3704 │ ╶───────────────────┼────┼────┼────┼────┤
3705 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3706 │ Layer ID │ 1│ 1│ 1│ 1│
3707 │ Subtable ID│ 7│ 7│ 8│ 8│
3708 │ ╶───────────────┼────┼────┼────┼────┤
3709 │ No Table ID │ 1│ 1│ 1│ 1│
3710 │ Layer ID │ 1│ 1│ 1│ 1│
3711 │ Subtable ID│ 7│ 7│ 8│ 8│
3712 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
3713 │ No QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3714 │ Layer ID │ 1│ 1│ 1│ 1│
3715 │ Subtable ID│ 9│ 9│ 10│ 10│
3716 │ ╶───────────────┼────┼────┼────┼────┤
3717 │ No Table ID │ 1│ 1│ 1│ 1│
3718 │ Layer ID │ 1│ 1│ 1│ 1│
3719 │ Subtable ID│ 9│ 9│ 10│ 10│
3720 │ ╶───────────────────┼────┼────┼────┼────┤
3721 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3722 │ Layer ID │ 1│ 1│ 1│ 1│
3723 │ Subtable ID│ 11│ 11│ 12│ 12│
3724 │ ╶───────────────┼────┼────┼────┼────┤
3725 │ No Table ID │ 1│ 1│ 1│ 1│
3726 │ Layer ID │ 1│ 1│ 1│ 1│
3727 │ Subtable ID│ 11│ 11│ 12│ 12│
3728 │ ╶────────────────────────────┼────┼────┼────┼────┤
3729 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3730 │ Layer ID │ 1│ 1│ 1│ 1│
3731 │ Subtable ID│ 13│ 13│ 14│ 14│
3732 │ ╶───────────────┼────┼────┼────┼────┤
3733 │ No Table ID │ 1│ 1│ 1│ 1│
3734 │ Layer ID │ 1│ 1│ 1│ 1│
3735 │ Subtable ID│ 13│ 13│ 14│ 14│
3736 │ ╶───────────────────┼────┼────┼────┼────┤
3737 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3738 │ Layer ID │ 1│ 1│ 1│ 1│
3739 │ Subtable ID│ 15│ 15│ 16│ 16│
3740 │ ╶───────────────┼────┼────┼────┼────┤
3741 │ No Table ID │ 1│ 1│ 1│ 1│
3742 │ Layer ID │ 1│ 1│ 1│ 1│
3743 │ Subtable ID│ 15│ 15│ 16│ 16│
3744 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
3748 ╭──────────────────────────────────────────┬───────────────────╮
3750 │ ├─────────┬─────────┤
3752 │ ├─────────┼─────────┤
3754 │ ├────┬────┼────┬────┤
3755 │ │ Yes│ No │ Yes│ No │
3756 │ ├────┼────┼────┼────┤
3757 │ │QN86│QN86│QN86│QN86│
3758 ├──────────────────────────────────────────┼────┼────┼────┼────┤
3759 │QN26 Yes QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3760 │ Layer ID │ 2│ 2│ 2│ 2│
3761 │ Subtable ID│ 17│ 17│ 18│ 18│
3762 │ ╶───────────────┼────┼────┼────┼────┤
3763 │ No Table ID │ 1│ 1│ 1│ 1│
3764 │ Layer ID │ 2│ 2│ 2│ 2│
3765 │ Subtable ID│ 17│ 17│ 18│ 18│
3766 │ ╶───────────────────┼────┼────┼────┼────┤
3767 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3768 │ Layer ID │ 2│ 2│ 2│ 2│
3769 │ Subtable ID│ 19│ 19│ 20│ 20│
3770 │ ╶───────────────┼────┼────┼────┼────┤
3771 │ No Table ID │ 1│ 1│ 1│ 1│
3772 │ Layer ID │ 2│ 2│ 2│ 2│
3773 │ Subtable ID│ 19│ 19│ 20│ 20│
3774 │ ╶────────────────────────────┼────┼────┼────┼────┤
3775 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3776 │ Layer ID │ 2│ 2│ 2│ 2│
3777 │ Subtable ID│ 21│ 21│ 22│ 22│
3778 │ ╶───────────────┼────┼────┼────┼────┤
3779 │ No Table ID │ 1│ 1│ 1│ 1│
3780 │ Layer ID │ 2│ 2│ 2│ 2│
3781 │ Subtable ID│ 21│ 21│ 22│ 22│
3782 │ ╶───────────────────┼────┼────┼────┼────┤
3783 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3784 │ Layer ID │ 2│ 2│ 2│ 2│
3785 │ Subtable ID│ 23│ 23│ 24│ 24│
3786 │ ╶───────────────┼────┼────┼────┼────┤
3787 │ No Table ID │ 1│ 1│ 1│ 1│
3788 │ Layer ID │ 2│ 2│ 2│ 2│
3789 │ Subtable ID│ 23│ 23│ 24│ 24│
3790 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
3791 │ No QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3792 │ Layer ID │ 2│ 2│ 2│ 2│
3793 │ Subtable ID│ 25│ 25│ 26│ 26│
3794 │ ╶───────────────┼────┼────┼────┼────┤
3795 │ No Table ID │ 1│ 1│ 1│ 1│
3796 │ Layer ID │ 2│ 2│ 2│ 2│
3797 │ Subtable ID│ 25│ 25│ 26│ 26│
3798 │ ╶───────────────────┼────┼────┼────┼────┤
3799 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3800 │ Layer ID │ 2│ 2│ 2│ 2│
3801 │ Subtable ID│ 27│ 27│ 28│ 28│
3802 │ ╶───────────────┼────┼────┼────┼────┤
3803 │ No Table ID │ 1│ 1│ 1│ 1│
3804 │ Layer ID │ 2│ 2│ 2│ 2│
3805 │ Subtable ID│ 27│ 27│ 28│ 28│
3806 │ ╶────────────────────────────┼────┼────┼────┼────┤
3807 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3808 │ Layer ID │ 2│ 2│ 2│ 2│
3809 │ Subtable ID│ 29│ 29│ 30│ 30│
3810 │ ╶───────────────┼────┼────┼────┼────┤
3811 │ No Table ID │ 1│ 1│ 1│ 1│
3812 │ Layer ID │ 2│ 2│ 2│ 2│
3813 │ Subtable ID│ 29│ 29│ 30│ 30│
3814 │ ╶───────────────────┼────┼────┼────┼────┤
3815 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3816 │ Layer ID │ 2│ 2│ 2│ 2│
3817 │ Subtable ID│ 31│ 31│ 32│ 32│
3818 │ ╶───────────────┼────┼────┼────┼────┤
3819 │ No Table ID │ 1│ 1│ 1│ 1│
3820 │ Layer ID │ 2│ 2│ 2│ 2│
3821 │ Subtable ID│ 31│ 31│ 32│ 32│
3822 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
3826 ╭───────────────────────────────────────────┬───────────────────╮
3828 │ ├─────────┬─────────┤
3830 │ ├─────────┼─────────┤
3832 │ ├────┬────┼────┬────┤
3833 │ │ Yes│ No │ Yes│ No │
3834 │ ├────┼────┼────┼────┤
3835 │ │QN86│QN86│QN86│QN86│
3836 ├───────────────────────────────────────────┼────┼────┼────┼────┤
3837 │QN26 Yes QN61 Yes QN57 Yes Yes Row ID │ 1│ 1│ 3│ 3│
3838 │ Layer Row ID│ 1│ 1│ 1│ 1│
3839 │ ╶────────────────┼────┼────┼────┼────┤
3840 │ No Row ID │ 2│ 2│ 4│ 4│
3841 │ Layer Row ID│ 2│ 2│ 2│ 2│
3842 │ ╶────────────────────┼────┼────┼────┼────┤
3843 │ No Yes Row ID │ 5│ 5│ 7│ 7│
3844 │ Layer Row ID│ 3│ 3│ 3│ 3│
3845 │ ╶────────────────┼────┼────┼────┼────┤
3846 │ No Row ID │ 6│ 6│ 8│ 8│
3847 │ Layer Row ID│ 4│ 4│ 4│ 4│
3848 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3849 │ No QN57 Yes Yes Row ID │ 9│ 9│ 11│ 11│
3850 │ Layer Row ID│ 5│ 5│ 5│ 5│
3851 │ ╶────────────────┼────┼────┼────┼────┤
3852 │ No Row ID │ 10│ 10│ 12│ 12│
3853 │ Layer Row ID│ 6│ 6│ 6│ 6│
3854 │ ╶────────────────────┼────┼────┼────┼────┤
3855 │ No Yes Row ID │ 13│ 13│ 15│ 15│
3856 │ Layer Row ID│ 7│ 7│ 7│ 7│
3857 │ ╶────────────────┼────┼────┼────┼────┤
3858 │ No Row ID │ 14│ 14│ 16│ 16│
3859 │ Layer Row ID│ 8│ 8│ 8│ 8│
3860 │ ╶──────────────────────────────────────┼────┼────┼────┼────┤
3861 │ No QN61 Yes QN57 Yes Yes Row ID │ 17│ 17│ 19│ 19│
3862 │ Layer Row ID│ 9│ 9│ 9│ 9│
3863 │ ╶────────────────┼────┼────┼────┼────┤
3864 │ No Row ID │ 18│ 18│ 20│ 20│
3865 │ Layer Row ID│ 10│ 10│ 10│ 10│
3866 │ ╶────────────────────┼────┼────┼────┼────┤
3867 │ No Yes Row ID │ 21│ 21│ 23│ 23│
3868 │ Layer Row ID│ 11│ 11│ 11│ 11│
3869 │ ╶────────────────┼────┼────┼────┼────┤
3870 │ No Row ID │ 22│ 22│ 24│ 24│
3871 │ Layer Row ID│ 12│ 12│ 12│ 12│
3872 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3873 │ No QN57 Yes Yes Row ID │ 25│ 25│ 27│ 27│
3874 │ Layer Row ID│ 13│ 13│ 13│ 13│
3875 │ ╶────────────────┼────┼────┼────┼────┤
3876 │ No Row ID │ 26│ 26│ 28│ 28│
3877 │ Layer Row ID│ 14│ 14│ 14│ 14│
3878 │ ╶────────────────────┼────┼────┼────┼────┤
3879 │ No Yes Row ID │ 29│ 29│ 31│ 31│
3880 │ Layer Row ID│ 15│ 15│ 15│ 15│
3881 │ ╶────────────────┼────┼────┼────┼────┤
3882 │ No Row ID │ 30│ 30│ 32│ 32│
3883 │ Layer Row ID│ 16│ 16│ 16│ 16│
3884 ╰───────────────────────────────────────────┴────┴────┴────┴────╯
3888 ╭───────────────────────────────────────────┬───────────────────╮
3890 │ ├─────────┬─────────┤
3892 │ ├─────────┼─────────┤
3894 │ ├────┬────┼────┬────┤
3895 │ │ Yes│ No │ Yes│ No │
3896 │ ├────┼────┼────┼────┤
3897 │ │QN86│QN86│QN86│QN86│
3898 ├───────────────────────────────────────────┼────┼────┼────┼────┤
3899 │QN26 Yes QN61 Yes QN57 Yes Yes Row ID │ 33│ 33│ 35│ 35│
3900 │ Layer Row ID│ 17│ 17│ 17│ 17│
3901 │ ╶────────────────┼────┼────┼────┼────┤
3902 │ No Row ID │ 34│ 34│ 36│ 36│
3903 │ Layer Row ID│ 18│ 18│ 18│ 18│
3904 │ ╶────────────────────┼────┼────┼────┼────┤
3905 │ No Yes Row ID │ 37│ 37│ 39│ 39│
3906 │ Layer Row ID│ 19│ 19│ 19│ 19│
3907 │ ╶────────────────┼────┼────┼────┼────┤
3908 │ No Row ID │ 38│ 38│ 40│ 40│
3909 │ Layer Row ID│ 20│ 20│ 20│ 20│
3910 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3911 │ No QN57 Yes Yes Row ID │ 41│ 41│ 43│ 43│
3912 │ Layer Row ID│ 21│ 21│ 21│ 21│
3913 │ ╶────────────────┼────┼────┼────┼────┤
3914 │ No Row ID │ 42│ 42│ 44│ 44│
3915 │ Layer Row ID│ 22│ 22│ 22│ 22│
3916 │ ╶────────────────────┼────┼────┼────┼────┤
3917 │ No Yes Row ID │ 45│ 45│ 47│ 47│
3918 │ Layer Row ID│ 23│ 23│ 23│ 23│
3919 │ ╶────────────────┼────┼────┼────┼────┤
3920 │ No Row ID │ 46│ 46│ 48│ 48│
3921 │ Layer Row ID│ 24│ 24│ 24│ 24│
3922 │ ╶──────────────────────────────────────┼────┼────┼────┼────┤
3923 │ No QN61 Yes QN57 Yes Yes Row ID │ 49│ 49│ 51│ 51│
3924 │ Layer Row ID│ 25│ 25│ 25│ 25│
3925 │ ╶────────────────┼────┼────┼────┼────┤
3926 │ No Row ID │ 50│ 50│ 52│ 52│
3927 │ Layer Row ID│ 26│ 26│ 26│ 26│
3928 │ ╶────────────────────┼────┼────┼────┼────┤
3929 │ No Yes Row ID │ 53│ 53│ 55│ 55│
3930 │ Layer Row ID│ 27│ 27│ 27│ 27│
3931 │ ╶────────────────┼────┼────┼────┼────┤
3932 │ No Row ID │ 54│ 54│ 56│ 56│
3933 │ Layer Row ID│ 28│ 28│ 28│ 28│
3934 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3935 │ No QN57 Yes Yes Row ID │ 57│ 57│ 59│ 59│
3936 │ Layer Row ID│ 29│ 29│ 29│ 29│
3937 │ ╶────────────────┼────┼────┼────┼────┤
3938 │ No Row ID │ 58│ 58│ 60│ 60│
3939 │ Layer Row ID│ 30│ 30│ 30│ 30│
3940 │ ╶────────────────────┼────┼────┼────┼────┤
3941 │ No Yes Row ID │ 61│ 61│ 63│ 63│
3942 │ Layer Row ID│ 31│ 31│ 31│ 31│
3943 │ ╶────────────────┼────┼────┼────┼────┤
3944 │ No Row ID │ 62│ 62│ 64│ 64│
3945 │ Layer Row ID│ 32│ 32│ 32│ 32│
3946 ╰───────────────────────────────────────────┴────┴────┴────┴────╯
3950 ╭──────────────────────────────────────────────┬───────────────────╮
3952 │ ├─────────┬─────────┤
3954 │ ├─────────┼─────────┤
3956 │ ├────┬────┼────┬────┤
3957 │ │ Yes│ No │ Yes│ No │
3958 │ ├────┼────┼────┼────┤
3959 │ │QN86│QN86│QN86│QN86│
3960 ├──────────────────────────────────────────────┼────┼────┼────┼────┤
3961 │QN26 Yes QN61 Yes QN57 Yes Yes Column ID │ 1│ 2│ 3│ 4│
3962 │ Layer Column ID│ 1│ 2│ 3│ 4│
3963 │ ╶───────────────────┼────┼────┼────┼────┤
3964 │ No Column ID │ 1│ 2│ 3│ 4│
3965 │ Layer Column ID│ 1│ 2│ 3│ 4│
3966 │ ╶───────────────────────┼────┼────┼────┼────┤
3967 │ No Yes Column ID │ 5│ 6│ 7│ 8│
3968 │ Layer Column ID│ 1│ 2│ 3│ 4│
3969 │ ╶───────────────────┼────┼────┼────┼────┤
3970 │ No Column ID │ 5│ 6│ 7│ 8│
3971 │ Layer Column ID│ 1│ 2│ 3│ 4│
3972 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3973 │ No QN57 Yes Yes Column ID │ 9│ 10│ 11│ 12│
3974 │ Layer Column ID│ 1│ 2│ 3│ 4│
3975 │ ╶───────────────────┼────┼────┼────┼────┤
3976 │ No Column ID │ 9│ 10│ 11│ 12│
3977 │ Layer Column ID│ 1│ 2│ 3│ 4│
3978 │ ╶───────────────────────┼────┼────┼────┼────┤
3979 │ No Yes Column ID │ 13│ 14│ 15│ 16│
3980 │ Layer Column ID│ 1│ 2│ 3│ 4│
3981 │ ╶───────────────────┼────┼────┼────┼────┤
3982 │ No Column ID │ 13│ 14│ 15│ 16│
3983 │ Layer Column ID│ 1│ 2│ 3│ 4│
3984 │ ╶─────────────────────────────────────────┼────┼────┼────┼────┤
3985 │ No QN61 Yes QN57 Yes Yes Column ID │ 17│ 18│ 19│ 20│
3986 │ Layer Column ID│ 1│ 2│ 3│ 4│
3987 │ ╶───────────────────┼────┼────┼────┼────┤
3988 │ No Column ID │ 17│ 18│ 19│ 20│
3989 │ Layer Column ID│ 1│ 2│ 3│ 4│
3990 │ ╶───────────────────────┼────┼────┼────┼────┤
3991 │ No Yes Column ID │ 21│ 22│ 23│ 24│
3992 │ Layer Column ID│ 1│ 2│ 3│ 4│
3993 │ ╶───────────────────┼────┼────┼────┼────┤
3994 │ No Column ID │ 21│ 22│ 23│ 24│
3995 │ Layer Column ID│ 1│ 2│ 3│ 4│
3996 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3997 │ No QN57 Yes Yes Column ID │ 25│ 26│ 27│ 28│
3998 │ Layer Column ID│ 1│ 2│ 3│ 4│
3999 │ ╶───────────────────┼────┼────┼────┼────┤
4000 │ No Column ID │ 25│ 26│ 27│ 28│
4001 │ Layer Column ID│ 1│ 2│ 3│ 4│
4002 │ ╶───────────────────────┼────┼────┼────┼────┤
4003 │ No Yes Column ID │ 29│ 30│ 31│ 32│
4004 │ Layer Column ID│ 1│ 2│ 3│ 4│
4005 │ ╶───────────────────┼────┼────┼────┼────┤
4006 │ No Column ID │ 29│ 30│ 31│ 32│
4007 │ Layer Column ID│ 1│ 2│ 3│ 4│
4008 ╰──────────────────────────────────────────────┴────┴────┴────┴────╯
4012 ╭──────────────────────────────────────────────┬───────────────────╮
4014 │ ├─────────┬─────────┤
4016 │ ├─────────┼─────────┤
4018 │ ├────┬────┼────┬────┤
4019 │ │ Yes│ No │ Yes│ No │
4020 │ ├────┼────┼────┼────┤
4021 │ │QN86│QN86│QN86│QN86│
4022 ├──────────────────────────────────────────────┼────┼────┼────┼────┤
4023 │QN26 Yes QN61 Yes QN57 Yes Yes Column ID │ 33│ 34│ 35│ 36│
4024 │ Layer Column ID│ 5│ 6│ 7│ 8│
4025 │ ╶───────────────────┼────┼────┼────┼────┤
4026 │ No Column ID │ 33│ 34│ 35│ 36│
4027 │ Layer Column ID│ 5│ 6│ 7│ 8│
4028 │ ╶───────────────────────┼────┼────┼────┼────┤
4029 │ No Yes Column ID │ 37│ 38│ 39│ 40│
4030 │ Layer Column ID│ 5│ 6│ 7│ 8│
4031 │ ╶───────────────────┼────┼────┼────┼────┤
4032 │ No Column ID │ 37│ 38│ 39│ 40│
4033 │ Layer Column ID│ 5│ 6│ 7│ 8│
4034 │ ╶────────────────────────────────┼────┼────┼────┼────┤
4035 │ No QN57 Yes Yes Column ID │ 41│ 42│ 43│ 44│
4036 │ Layer Column ID│ 5│ 6│ 7│ 8│
4037 │ ╶───────────────────┼────┼────┼────┼────┤
4038 │ No Column ID │ 41│ 42│ 43│ 44│
4039 │ Layer Column ID│ 5│ 6│ 7│ 8│
4040 │ ╶───────────────────────┼────┼────┼────┼────┤
4041 │ No Yes Column ID │ 45│ 46│ 47│ 48│
4042 │ Layer Column ID│ 5│ 6│ 7│ 8│
4043 │ ╶───────────────────┼────┼────┼────┼────┤
4044 │ No Column ID │ 45│ 46│ 47│ 48│
4045 │ Layer Column ID│ 5│ 6│ 7│ 8│
4046 │ ╶─────────────────────────────────────────┼────┼────┼────┼────┤
4047 │ No QN61 Yes QN57 Yes Yes Column ID │ 49│ 50│ 51│ 52│
4048 │ Layer Column ID│ 5│ 6│ 7│ 8│
4049 │ ╶───────────────────┼────┼────┼────┼────┤
4050 │ No Column ID │ 49│ 50│ 51│ 52│
4051 │ Layer Column ID│ 5│ 6│ 7│ 8│
4052 │ ╶───────────────────────┼────┼────┼────┼────┤
4053 │ No Yes Column ID │ 53│ 54│ 55│ 56│
4054 │ Layer Column ID│ 5│ 6│ 7│ 8│
4055 │ ╶───────────────────┼────┼────┼────┼────┤
4056 │ No Column ID │ 53│ 54│ 55│ 56│
4057 │ Layer Column ID│ 5│ 6│ 7│ 8│
4058 │ ╶────────────────────────────────┼────┼────┼────┼────┤
4059 │ No QN57 Yes Yes Column ID │ 57│ 58│ 59│ 60│
4060 │ Layer Column ID│ 5│ 6│ 7│ 8│
4061 │ ╶───────────────────┼────┼────┼────┼────┤
4062 │ No Column ID │ 57│ 58│ 59│ 60│
4063 │ Layer Column ID│ 5│ 6│ 7│ 8│
4064 │ ╶───────────────────────┼────┼────┼────┼────┤
4065 │ No Yes Column ID │ 61│ 62│ 63│ 64│
4066 │ Layer Column ID│ 5│ 6│ 7│ 8│
4067 │ ╶───────────────────┼────┼────┼────┼────┤
4068 │ No Column ID │ 61│ 62│ 63│ 64│
4069 │ Layer Column ID│ 5│ 6│ 7│ 8│
4070 ╰──────────────────────────────────────────────┴────┴────┴────┴────╯
4074 AT_SETUP([CTABLES area definitions with CLABELS ROWLABELS=LAYER])
4075 AT_KEYWORDS([ROWLABELS LAYER])
4076 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4077 AT_DATA([ctables.sps],
4080 /VLABELS VARIABLES=ALL DISPLAY=NAME
4081 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
4082 /SLABELS POSITION=ROW
4083 /CLABELS ROWLABELS=LAYER
4084 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
4085 /SLABELS POSITION=ROW
4086 /CLABELS ROWLABELS=LAYER
4087 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
4088 /SLABELS POSITION=ROW
4089 /CLABELS ROWLABELS=LAYER.
4091 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
4095 ╭──────────────────────────────────┬───────────────────────────╮
4097 │ ├─────────────┬─────────────┤
4099 │ ├─────────────┼─────────────┤
4101 │ ├──────┬──────┼──────┬──────┤
4102 │ │ Yes │ No │ Yes │ No │
4103 │ ├──────┼──────┼──────┼──────┤
4104 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4105 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4106 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4107 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4108 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4109 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4110 │ Subtable ID│ 1│ 1│ 3│ 3│ 5│ 5│ 7│ 7│
4111 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4112 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4113 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4114 │ Subtable ID│ 1│ 1│ 3│ 3│ 5│ 5│ 7│ 7│
4115 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4116 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4117 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4118 │ Subtable ID│ 9│ 9│ 11│11│ 13│13│ 15│15│
4119 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4120 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4121 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4122 │ Subtable ID│ 9│ 9│ 11│11│ 13│13│ 15│15│
4123 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4128 ╭──────────────────────────────────┬───────────────────────────╮
4130 │ ├─────────────┬─────────────┤
4132 │ ├─────────────┼─────────────┤
4134 │ ├──────┬──────┼──────┬──────┤
4135 │ │ Yes │ No │ Yes │ No │
4136 │ ├──────┼──────┼──────┼──────┤
4137 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4138 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4139 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4140 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4141 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4142 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4143 │ Subtable ID│ 2│ 2│ 4│ 4│ 6│ 6│ 8│ 8│
4144 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4145 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4146 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4147 │ Subtable ID│ 2│ 2│ 4│ 4│ 6│ 6│ 8│ 8│
4148 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4149 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4150 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4151 │ Subtable ID│ 10│10│ 12│12│ 14│14│ 16│16│
4152 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4153 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4154 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4155 │ Subtable ID│ 10│10│ 12│12│ 14│14│ 16│16│
4156 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4161 ╭──────────────────────────────────┬───────────────────────────╮
4163 │ ├─────────────┬─────────────┤
4165 │ ├─────────────┼─────────────┤
4167 │ ├──────┬──────┼──────┬──────┤
4168 │ │ Yes │ No │ Yes │ No │
4169 │ ├──────┼──────┼──────┼──────┤
4170 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4171 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4172 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4173 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4174 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4175 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4176 │ Subtable ID│ 17│17│ 19│19│ 21│21│ 23│23│
4177 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4178 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4179 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4180 │ Subtable ID│ 17│17│ 19│19│ 21│21│ 23│23│
4181 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4182 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4183 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4184 │ Subtable ID│ 25│25│ 27│27│ 29│29│ 31│31│
4185 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4186 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4187 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4188 │ Subtable ID│ 25│25│ 27│27│ 29│29│ 31│31│
4189 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4194 ╭──────────────────────────────────┬───────────────────────────╮
4196 │ ├─────────────┬─────────────┤
4198 │ ├─────────────┼─────────────┤
4200 │ ├──────┬──────┼──────┬──────┤
4201 │ │ Yes │ No │ Yes │ No │
4202 │ ├──────┼──────┼──────┼──────┤
4203 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4204 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4205 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4206 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4207 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4208 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4209 │ Subtable ID│ 18│18│ 20│20│ 22│22│ 24│24│
4210 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4211 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4212 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4213 │ Subtable ID│ 18│18│ 20│20│ 22│22│ 24│24│
4214 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4215 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4216 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4217 │ Subtable ID│ 26│26│ 28│28│ 30│30│ 32│32│
4218 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4219 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4220 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4221 │ Subtable ID│ 26│26│ 28│28│ 30│30│ 32│32│
4222 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4227 ╭───────────────────────────────────┬───────────────────────────╮
4229 │ ├─────────────┬─────────────┤
4231 │ ├─────────────┼─────────────┤
4233 │ ├──────┬──────┼──────┬──────┤
4234 │ │ Yes │ No │ Yes │ No │
4235 │ ├──────┼──────┼──────┼──────┤
4236 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4237 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4238 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4239 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4240 │QN26 Yes QN61 Yes QN57 Row ID │ 1│ 1│ 3│ 3│ 5│ 5│ 7│ 7│
4241 │ Layer Row ID│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4242 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4243 │ No QN57 Row ID │ 9│ 9│ 11│11│ 13│13│ 15│15│
4244 │ Layer Row ID│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4245 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4246 │ No QN61 Yes QN57 Row ID │ 17│17│ 19│19│ 21│21│ 23│23│
4247 │ Layer Row ID│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│
4248 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4249 │ No QN57 Row ID │ 25│25│ 27│27│ 29│29│ 31│31│
4250 │ Layer Row ID│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│
4251 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4256 ╭───────────────────────────────────┬───────────────────────────╮
4258 │ ├─────────────┬─────────────┤
4260 │ ├─────────────┼─────────────┤
4262 │ ├──────┬──────┼──────┬──────┤
4263 │ │ Yes │ No │ Yes │ No │
4264 │ ├──────┼──────┼──────┼──────┤
4265 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4266 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4267 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4268 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4269 │QN26 Yes QN61 Yes QN57 Row ID │ 2│ 2│ 4│ 4│ 6│ 6│ 8│ 8│
4270 │ Layer Row ID│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4271 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4272 │ No QN57 Row ID │ 10│10│ 12│12│ 14│14│ 16│16│
4273 │ Layer Row ID│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4274 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4275 │ No QN61 Yes QN57 Row ID │ 18│18│ 20│20│ 22│22│ 24│24│
4276 │ Layer Row ID│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│
4277 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4278 │ No QN57 Row ID │ 26│26│ 28│28│ 30│30│ 32│32│
4279 │ Layer Row ID│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│
4280 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4285 ╭───────────────────────────────────┬───────────────────────────╮
4287 │ ├─────────────┬─────────────┤
4289 │ ├─────────────┼─────────────┤
4291 │ ├──────┬──────┼──────┬──────┤
4292 │ │ Yes │ No │ Yes │ No │
4293 │ ├──────┼──────┼──────┼──────┤
4294 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4295 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4296 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4297 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4298 │QN26 Yes QN61 Yes QN57 Row ID │ 33│33│ 35│35│ 37│37│ 39│39│
4299 │ Layer Row ID│ 9│ 9│ 9│ 9│ 9│ 9│ 9│ 9│
4300 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4301 │ No QN57 Row ID │ 41│41│ 43│43│ 45│45│ 47│47│
4302 │ Layer Row ID│ 11│11│ 11│11│ 11│11│ 11│11│
4303 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4304 │ No QN61 Yes QN57 Row ID │ 49│49│ 51│51│ 53│53│ 55│55│
4305 │ Layer Row ID│ 13│13│ 13│13│ 13│13│ 13│13│
4306 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4307 │ No QN57 Row ID │ 57│57│ 59│59│ 61│61│ 63│63│
4308 │ Layer Row ID│ 15│15│ 15│15│ 15│15│ 15│15│
4309 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4314 ╭───────────────────────────────────┬───────────────────────────╮
4316 │ ├─────────────┬─────────────┤
4318 │ ├─────────────┼─────────────┤
4320 │ ├──────┬──────┼──────┬──────┤
4321 │ │ Yes │ No │ Yes │ No │
4322 │ ├──────┼──────┼──────┼──────┤
4323 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4324 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4325 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4326 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4327 │QN26 Yes QN61 Yes QN57 Row ID │ 34│34│ 36│36│ 38│38│ 40│40│
4328 │ Layer Row ID│ 10│10│ 10│10│ 10│10│ 10│10│
4329 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4330 │ No QN57 Row ID │ 42│42│ 44│44│ 46│46│ 48│48│
4331 │ Layer Row ID│ 12│12│ 12│12│ 12│12│ 12│12│
4332 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4333 │ No QN61 Yes QN57 Row ID │ 50│50│ 52│52│ 54│54│ 56│56│
4334 │ Layer Row ID│ 14│14│ 14│14│ 14│14│ 14│14│
4335 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4336 │ No QN57 Row ID │ 58│58│ 60│60│ 62│62│ 64│64│
4337 │ Layer Row ID│ 16│16│ 16│16│ 16│16│ 16│16│
4338 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4343 ╭──────────────────────────────────────┬───────────────────────────╮
4345 │ ├─────────────┬─────────────┤
4347 │ ├─────────────┼─────────────┤
4349 │ ├──────┬──────┼──────┬──────┤
4350 │ │ Yes │ No │ Yes │ No │
4351 │ ├──────┼──────┼──────┼──────┤
4352 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4353 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4354 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4355 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4356 │QN26 Yes QN61 Yes QN57 Column ID │ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4357 │ Layer Column ID│ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4358 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4359 │ No QN57 Column ID │ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4360 │ Layer Column ID│ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4361 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4362 │ No QN61 Yes QN57 Column ID │ 17│19│ 21│23│ 25│27│ 29│31│
4363 │ Layer Column ID│ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4364 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4365 │ No QN57 Column ID │ 17│19│ 21│23│ 25│27│ 29│31│
4366 │ Layer Column ID│ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4367 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4372 ╭──────────────────────────────────────┬───────────────────────────╮
4374 │ ├─────────────┬─────────────┤
4376 │ ├─────────────┼─────────────┤
4378 │ ├──────┬──────┼──────┬──────┤
4379 │ │ Yes │ No │ Yes │ No │
4380 │ ├──────┼──────┼──────┼──────┤
4381 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4382 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4383 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4384 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4385 │QN26 Yes QN61 Yes QN57 Column ID │ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4386 │ Layer Column ID│ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4387 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4388 │ No QN57 Column ID │ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4389 │ Layer Column ID│ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4390 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4391 │ No QN61 Yes QN57 Column ID │ 18│20│ 22│24│ 26│28│ 30│32│
4392 │ Layer Column ID│ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4393 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4394 │ No QN57 Column ID │ 18│20│ 22│24│ 26│28│ 30│32│
4395 │ Layer Column ID│ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4396 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4401 ╭──────────────────────────────────────┬───────────────────────────╮
4403 │ ├─────────────┬─────────────┤
4405 │ ├─────────────┼─────────────┤
4407 │ ├──────┬──────┼──────┬──────┤
4408 │ │ Yes │ No │ Yes │ No │
4409 │ ├──────┼──────┼──────┼──────┤
4410 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4411 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4412 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4413 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4414 │QN26 Yes QN61 Yes QN57 Column ID │ 33│35│ 37│39│ 41│43│ 45│47│
4415 │ Layer Column ID│ 17│19│ 21│23│ 25│27│ 29│31│
4416 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4417 │ No QN57 Column ID │ 33│35│ 37│39│ 41│43│ 45│47│
4418 │ Layer Column ID│ 17│19│ 21│23│ 25│27│ 29│31│
4419 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4420 │ No QN61 Yes QN57 Column ID │ 49│51│ 53│55│ 57│59│ 61│63│
4421 │ Layer Column ID│ 17│19│ 21│23│ 25│27│ 29│31│
4422 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4423 │ No QN57 Column ID │ 49│51│ 53│55│ 57│59│ 61│63│
4424 │ Layer Column ID│ 17│19│ 21│23│ 25│27│ 29│31│
4425 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4430 ╭──────────────────────────────────────┬───────────────────────────╮
4432 │ ├─────────────┬─────────────┤
4434 │ ├─────────────┼─────────────┤
4436 │ ├──────┬──────┼──────┬──────┤
4437 │ │ Yes │ No │ Yes │ No │
4438 │ ├──────┼──────┼──────┼──────┤
4439 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4440 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4441 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4442 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4443 │QN26 Yes QN61 Yes QN57 Column ID │ 34│36│ 38│40│ 42│44│ 46│48│
4444 │ Layer Column ID│ 18│20│ 22│24│ 26│28│ 30│32│
4445 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4446 │ No QN57 Column ID │ 34│36│ 38│40│ 42│44│ 46│48│
4447 │ Layer Column ID│ 18│20│ 22│24│ 26│28│ 30│32│
4448 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4449 │ No QN61 Yes QN57 Column ID │ 50│52│ 54│56│ 58│60│ 62│64│
4450 │ Layer Column ID│ 18│20│ 22│24│ 26│28│ 30│32│
4451 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4452 │ No QN57 Column ID │ 50│52│ 54│56│ 58│60│ 62│64│
4453 │ Layer Column ID│ 18│20│ 22│24│ 26│28│ 30│32│
4454 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4458 AT_SETUP([CTABLES area definitions with CLABELS COLLABELS=LAYER])
4459 AT_KEYWORDS([COLLABELS LAYER])
4460 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4461 AT_DATA([ctables.sps],
4464 /VLABELS VARIABLES=ALL DISPLAY=NAME
4465 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
4466 /SLABELS POSITION=ROW
4467 /CLABELS COLLABELS=LAYER
4468 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
4469 /SLABELS POSITION=ROW
4470 /CLABELS COLLABELS=LAYER
4471 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
4472 /SLABELS POSITION=ROW
4473 /CLABELS COLLABELS=LAYER.
4475 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
4479 ╭──────────────────────────────────────┬───────────────────╮
4481 │ ├─────────┬─────────┤
4483 │ ├─────────┼─────────┤
4485 │ ├────┬────┼────┬────┤
4486 │ │ Yes│ No │ Yes│ No │
4487 │ ├────┼────┼────┼────┤
4488 │ │QN86│QN86│QN86│QN86│
4489 ├──────────────────────────────────────┼────┼────┼────┼────┤
4490 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4491 │ Layer ID │ 1│ 1│ 1│ 1│
4492 │ Subtable ID│ 1│ 1│ 3│ 3│
4493 │ ╶───────────────┼────┼────┼────┼────┤
4494 │ No Table ID │ 1│ 1│ 1│ 1│
4495 │ Layer ID │ 1│ 1│ 1│ 1│
4496 │ Subtable ID│ 1│ 1│ 3│ 3│
4497 │ ╶────────────────────────┼────┼────┼────┼────┤
4498 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4499 │ Layer ID │ 1│ 1│ 1│ 1│
4500 │ Subtable ID│ 5│ 5│ 7│ 7│
4501 │ ╶───────────────┼────┼────┼────┼────┤
4502 │ No Table ID │ 1│ 1│ 1│ 1│
4503 │ Layer ID │ 1│ 1│ 1│ 1│
4504 │ Subtable ID│ 5│ 5│ 7│ 7│
4505 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4506 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4507 │ Layer ID │ 1│ 1│ 1│ 1│
4508 │ Subtable ID│ 9│ 9│ 11│ 11│
4509 │ ╶───────────────┼────┼────┼────┼────┤
4510 │ No Table ID │ 1│ 1│ 1│ 1│
4511 │ Layer ID │ 1│ 1│ 1│ 1│
4512 │ Subtable ID│ 9│ 9│ 11│ 11│
4513 │ ╶────────────────────────┼────┼────┼────┼────┤
4514 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4515 │ Layer ID │ 1│ 1│ 1│ 1│
4516 │ Subtable ID│ 13│ 13│ 15│ 15│
4517 │ ╶───────────────┼────┼────┼────┼────┤
4518 │ No Table ID │ 1│ 1│ 1│ 1│
4519 │ Layer ID │ 1│ 1│ 1│ 1│
4520 │ Subtable ID│ 13│ 13│ 15│ 15│
4521 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4526 ╭──────────────────────────────────────┬───────────────────╮
4528 │ ├─────────┬─────────┤
4530 │ ├─────────┼─────────┤
4532 │ ├────┬────┼────┬────┤
4533 │ │ Yes│ No │ Yes│ No │
4534 │ ├────┼────┼────┼────┤
4535 │ │QN86│QN86│QN86│QN86│
4536 ├──────────────────────────────────────┼────┼────┼────┼────┤
4537 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4538 │ Layer ID │ 2│ 2│ 2│ 2│
4539 │ Subtable ID│ 2│ 2│ 4│ 4│
4540 │ ╶───────────────┼────┼────┼────┼────┤
4541 │ No Table ID │ 1│ 1│ 1│ 1│
4542 │ Layer ID │ 2│ 2│ 2│ 2│
4543 │ Subtable ID│ 2│ 2│ 4│ 4│
4544 │ ╶────────────────────────┼────┼────┼────┼────┤
4545 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4546 │ Layer ID │ 2│ 2│ 2│ 2│
4547 │ Subtable ID│ 6│ 6│ 8│ 8│
4548 │ ╶───────────────┼────┼────┼────┼────┤
4549 │ No Table ID │ 1│ 1│ 1│ 1│
4550 │ Layer ID │ 2│ 2│ 2│ 2│
4551 │ Subtable ID│ 6│ 6│ 8│ 8│
4552 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4553 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4554 │ Layer ID │ 2│ 2│ 2│ 2│
4555 │ Subtable ID│ 10│ 10│ 12│ 12│
4556 │ ╶───────────────┼────┼────┼────┼────┤
4557 │ No Table ID │ 1│ 1│ 1│ 1│
4558 │ Layer ID │ 2│ 2│ 2│ 2│
4559 │ Subtable ID│ 10│ 10│ 12│ 12│
4560 │ ╶────────────────────────┼────┼────┼────┼────┤
4561 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4562 │ Layer ID │ 2│ 2│ 2│ 2│
4563 │ Subtable ID│ 14│ 14│ 16│ 16│
4564 │ ╶───────────────┼────┼────┼────┼────┤
4565 │ No Table ID │ 1│ 1│ 1│ 1│
4566 │ Layer ID │ 2│ 2│ 2│ 2│
4567 │ Subtable ID│ 14│ 14│ 16│ 16│
4568 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4573 ╭──────────────────────────────────────┬───────────────────╮
4575 │ ├─────────┬─────────┤
4577 │ ├─────────┼─────────┤
4579 │ ├────┬────┼────┬────┤
4580 │ │ Yes│ No │ Yes│ No │
4581 │ ├────┼────┼────┼────┤
4582 │ │QN86│QN86│QN86│QN86│
4583 ├──────────────────────────────────────┼────┼────┼────┼────┤
4584 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4585 │ Layer ID │ 3│ 3│ 3│ 3│
4586 │ Subtable ID│ 17│ 17│ 19│ 19│
4587 │ ╶───────────────┼────┼────┼────┼────┤
4588 │ No Table ID │ 1│ 1│ 1│ 1│
4589 │ Layer ID │ 3│ 3│ 3│ 3│
4590 │ Subtable ID│ 17│ 17│ 19│ 19│
4591 │ ╶────────────────────────┼────┼────┼────┼────┤
4592 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4593 │ Layer ID │ 3│ 3│ 3│ 3│
4594 │ Subtable ID│ 21│ 21│ 23│ 23│
4595 │ ╶───────────────┼────┼────┼────┼────┤
4596 │ No Table ID │ 1│ 1│ 1│ 1│
4597 │ Layer ID │ 3│ 3│ 3│ 3│
4598 │ Subtable ID│ 21│ 21│ 23│ 23│
4599 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4600 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4601 │ Layer ID │ 3│ 3│ 3│ 3│
4602 │ Subtable ID│ 25│ 25│ 27│ 27│
4603 │ ╶───────────────┼────┼────┼────┼────┤
4604 │ No Table ID │ 1│ 1│ 1│ 1│
4605 │ Layer ID │ 3│ 3│ 3│ 3│
4606 │ Subtable ID│ 25│ 25│ 27│ 27│
4607 │ ╶────────────────────────┼────┼────┼────┼────┤
4608 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4609 │ Layer ID │ 3│ 3│ 3│ 3│
4610 │ Subtable ID│ 29│ 29│ 31│ 31│
4611 │ ╶───────────────┼────┼────┼────┼────┤
4612 │ No Table ID │ 1│ 1│ 1│ 1│
4613 │ Layer ID │ 3│ 3│ 3│ 3│
4614 │ Subtable ID│ 29│ 29│ 31│ 31│
4615 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4620 ╭──────────────────────────────────────┬───────────────────╮
4622 │ ├─────────┬─────────┤
4624 │ ├─────────┼─────────┤
4626 │ ├────┬────┼────┬────┤
4627 │ │ Yes│ No │ Yes│ No │
4628 │ ├────┼────┼────┼────┤
4629 │ │QN86│QN86│QN86│QN86│
4630 ├──────────────────────────────────────┼────┼────┼────┼────┤
4631 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4632 │ Layer ID │ 4│ 4│ 4│ 4│
4633 │ Subtable ID│ 18│ 18│ 20│ 20│
4634 │ ╶───────────────┼────┼────┼────┼────┤
4635 │ No Table ID │ 1│ 1│ 1│ 1│
4636 │ Layer ID │ 4│ 4│ 4│ 4│
4637 │ Subtable ID│ 18│ 18│ 20│ 20│
4638 │ ╶────────────────────────┼────┼────┼────┼────┤
4639 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4640 │ Layer ID │ 4│ 4│ 4│ 4│
4641 │ Subtable ID│ 22│ 22│ 24│ 24│
4642 │ ╶───────────────┼────┼────┼────┼────┤
4643 │ No Table ID │ 1│ 1│ 1│ 1│
4644 │ Layer ID │ 4│ 4│ 4│ 4│
4645 │ Subtable ID│ 22│ 22│ 24│ 24│
4646 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4647 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4648 │ Layer ID │ 4│ 4│ 4│ 4│
4649 │ Subtable ID│ 26│ 26│ 28│ 28│
4650 │ ╶───────────────┼────┼────┼────┼────┤
4651 │ No Table ID │ 1│ 1│ 1│ 1│
4652 │ Layer ID │ 4│ 4│ 4│ 4│
4653 │ Subtable ID│ 26│ 26│ 28│ 28│
4654 │ ╶────────────────────────┼────┼────┼────┼────┤
4655 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4656 │ Layer ID │ 4│ 4│ 4│ 4│
4657 │ Subtable ID│ 30│ 30│ 32│ 32│
4658 │ ╶───────────────┼────┼────┼────┼────┤
4659 │ No Table ID │ 1│ 1│ 1│ 1│
4660 │ Layer ID │ 4│ 4│ 4│ 4│
4661 │ Subtable ID│ 30│ 30│ 32│ 32│
4662 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4667 ╭───────────────────────────────────────┬───────────────────╮
4669 │ ├─────────┬─────────┤
4671 │ ├─────────┼─────────┤
4673 │ ├────┬────┼────┬────┤
4674 │ │ Yes│ No │ Yes│ No │
4675 │ ├────┼────┼────┼────┤
4676 │ │QN86│QN86│QN86│QN86│
4677 ├───────────────────────────────────────┼────┼────┼────┼────┤
4678 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 1│ 1│ 3│ 3│
4679 │ Layer Row ID│ 1│ 1│ 1│ 1│
4680 │ ╶────────────────┼────┼────┼────┼────┤
4681 │ No Row ID │ 5│ 5│ 7│ 7│
4682 │ Layer Row ID│ 3│ 3│ 3│ 3│
4683 │ ╶─────────────────────────┼────┼────┼────┼────┤
4684 │ No QN57 Yes Row ID │ 9│ 9│ 11│ 11│
4685 │ Layer Row ID│ 5│ 5│ 5│ 5│
4686 │ ╶────────────────┼────┼────┼────┼────┤
4687 │ No Row ID │ 13│ 13│ 15│ 15│
4688 │ Layer Row ID│ 7│ 7│ 7│ 7│
4689 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4690 │ No QN61 Yes QN57 Yes Row ID │ 17│ 17│ 19│ 19│
4691 │ Layer Row ID│ 9│ 9│ 9│ 9│
4692 │ ╶────────────────┼────┼────┼────┼────┤
4693 │ No Row ID │ 21│ 21│ 23│ 23│
4694 │ Layer Row ID│ 11│ 11│ 11│ 11│
4695 │ ╶─────────────────────────┼────┼────┼────┼────┤
4696 │ No QN57 Yes Row ID │ 25│ 25│ 27│ 27│
4697 │ Layer Row ID│ 13│ 13│ 13│ 13│
4698 │ ╶────────────────┼────┼────┼────┼────┤
4699 │ No Row ID │ 29│ 29│ 31│ 31│
4700 │ Layer Row ID│ 15│ 15│ 15│ 15│
4701 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4706 ╭───────────────────────────────────────┬───────────────────╮
4708 │ ├─────────┬─────────┤
4710 │ ├─────────┼─────────┤
4712 │ ├────┬────┼────┬────┤
4713 │ │ Yes│ No │ Yes│ No │
4714 │ ├────┼────┼────┼────┤
4715 │ │QN86│QN86│QN86│QN86│
4716 ├───────────────────────────────────────┼────┼────┼────┼────┤
4717 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 2│ 2│ 4│ 4│
4718 │ Layer Row ID│ 2│ 2│ 2│ 2│
4719 │ ╶────────────────┼────┼────┼────┼────┤
4720 │ No Row ID │ 6│ 6│ 8│ 8│
4721 │ Layer Row ID│ 4│ 4│ 4│ 4│
4722 │ ╶─────────────────────────┼────┼────┼────┼────┤
4723 │ No QN57 Yes Row ID │ 10│ 10│ 12│ 12│
4724 │ Layer Row ID│ 6│ 6│ 6│ 6│
4725 │ ╶────────────────┼────┼────┼────┼────┤
4726 │ No Row ID │ 14│ 14│ 16│ 16│
4727 │ Layer Row ID│ 8│ 8│ 8│ 8│
4728 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4729 │ No QN61 Yes QN57 Yes Row ID │ 18│ 18│ 20│ 20│
4730 │ Layer Row ID│ 10│ 10│ 10│ 10│
4731 │ ╶────────────────┼────┼────┼────┼────┤
4732 │ No Row ID │ 22│ 22│ 24│ 24│
4733 │ Layer Row ID│ 12│ 12│ 12│ 12│
4734 │ ╶─────────────────────────┼────┼────┼────┼────┤
4735 │ No QN57 Yes Row ID │ 26│ 26│ 28│ 28│
4736 │ Layer Row ID│ 14│ 14│ 14│ 14│
4737 │ ╶────────────────┼────┼────┼────┼────┤
4738 │ No Row ID │ 30│ 30│ 32│ 32│
4739 │ Layer Row ID│ 16│ 16│ 16│ 16│
4740 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4745 ╭───────────────────────────────────────┬───────────────────╮
4747 │ ├─────────┬─────────┤
4749 │ ├─────────┼─────────┤
4751 │ ├────┬────┼────┬────┤
4752 │ │ Yes│ No │ Yes│ No │
4753 │ ├────┼────┼────┼────┤
4754 │ │QN86│QN86│QN86│QN86│
4755 ├───────────────────────────────────────┼────┼────┼────┼────┤
4756 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 33│ 33│ 35│ 35│
4757 │ Layer Row ID│ 17│ 17│ 17│ 17│
4758 │ ╶────────────────┼────┼────┼────┼────┤
4759 │ No Row ID │ 37│ 37│ 39│ 39│
4760 │ Layer Row ID│ 19│ 19│ 19│ 19│
4761 │ ╶─────────────────────────┼────┼────┼────┼────┤
4762 │ No QN57 Yes Row ID │ 41│ 41│ 43│ 43│
4763 │ Layer Row ID│ 21│ 21│ 21│ 21│
4764 │ ╶────────────────┼────┼────┼────┼────┤
4765 │ No Row ID │ 45│ 45│ 47│ 47│
4766 │ Layer Row ID│ 23│ 23│ 23│ 23│
4767 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4768 │ No QN61 Yes QN57 Yes Row ID │ 49│ 49│ 51│ 51│
4769 │ Layer Row ID│ 25│ 25│ 25│ 25│
4770 │ ╶────────────────┼────┼────┼────┼────┤
4771 │ No Row ID │ 53│ 53│ 55│ 55│
4772 │ Layer Row ID│ 27│ 27│ 27│ 27│
4773 │ ╶─────────────────────────┼────┼────┼────┼────┤
4774 │ No QN57 Yes Row ID │ 57│ 57│ 59│ 59│
4775 │ Layer Row ID│ 29│ 29│ 29│ 29│
4776 │ ╶────────────────┼────┼────┼────┼────┤
4777 │ No Row ID │ 61│ 61│ 63│ 63│
4778 │ Layer Row ID│ 31│ 31│ 31│ 31│
4779 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4784 ╭───────────────────────────────────────┬───────────────────╮
4786 │ ├─────────┬─────────┤
4788 │ ├─────────┼─────────┤
4790 │ ├────┬────┼────┬────┤
4791 │ │ Yes│ No │ Yes│ No │
4792 │ ├────┼────┼────┼────┤
4793 │ │QN86│QN86│QN86│QN86│
4794 ├───────────────────────────────────────┼────┼────┼────┼────┤
4795 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 34│ 34│ 36│ 36│
4796 │ Layer Row ID│ 18│ 18│ 18│ 18│
4797 │ ╶────────────────┼────┼────┼────┼────┤
4798 │ No Row ID │ 38│ 38│ 40│ 40│
4799 │ Layer Row ID│ 20│ 20│ 20│ 20│
4800 │ ╶─────────────────────────┼────┼────┼────┼────┤
4801 │ No QN57 Yes Row ID │ 42│ 42│ 44│ 44│
4802 │ Layer Row ID│ 22│ 22│ 22│ 22│
4803 │ ╶────────────────┼────┼────┼────┼────┤
4804 │ No Row ID │ 46│ 46│ 48│ 48│
4805 │ Layer Row ID│ 24│ 24│ 24│ 24│
4806 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4807 │ No QN61 Yes QN57 Yes Row ID │ 50│ 50│ 52│ 52│
4808 │ Layer Row ID│ 26│ 26│ 26│ 26│
4809 │ ╶────────────────┼────┼────┼────┼────┤
4810 │ No Row ID │ 54│ 54│ 56│ 56│
4811 │ Layer Row ID│ 28│ 28│ 28│ 28│
4812 │ ╶─────────────────────────┼────┼────┼────┼────┤
4813 │ No QN57 Yes Row ID │ 58│ 58│ 60│ 60│
4814 │ Layer Row ID│ 30│ 30│ 30│ 30│
4815 │ ╶────────────────┼────┼────┼────┼────┤
4816 │ No Row ID │ 62│ 62│ 64│ 64│
4817 │ Layer Row ID│ 32│ 32│ 32│ 32│
4818 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4823 ╭──────────────────────────────────────────┬───────────────────╮
4825 │ ├─────────┬─────────┤
4827 │ ├─────────┼─────────┤
4829 │ ├────┬────┼────┬────┤
4830 │ │ Yes│ No │ Yes│ No │
4831 │ ├────┼────┼────┼────┤
4832 │ │QN86│QN86│QN86│QN86│
4833 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4834 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 1│ 3│ 5│ 7│
4835 │ Layer Column ID│ 1│ 3│ 5│ 7│
4836 │ ╶───────────────────┼────┼────┼────┼────┤
4837 │ No Column ID │ 1│ 3│ 5│ 7│
4838 │ Layer Column ID│ 1│ 3│ 5│ 7│
4839 │ ╶────────────────────────────┼────┼────┼────┼────┤
4840 │ No QN57 Yes Column ID │ 9│ 11│ 13│ 15│
4841 │ Layer Column ID│ 1│ 3│ 5│ 7│
4842 │ ╶───────────────────┼────┼────┼────┼────┤
4843 │ No Column ID │ 9│ 11│ 13│ 15│
4844 │ Layer Column ID│ 1│ 3│ 5│ 7│
4845 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4846 │ No QN61 Yes QN57 Yes Column ID │ 17│ 19│ 21│ 23│
4847 │ Layer Column ID│ 1│ 3│ 5│ 7│
4848 │ ╶───────────────────┼────┼────┼────┼────┤
4849 │ No Column ID │ 17│ 19│ 21│ 23│
4850 │ Layer Column ID│ 1│ 3│ 5│ 7│
4851 │ ╶────────────────────────────┼────┼────┼────┼────┤
4852 │ No QN57 Yes Column ID │ 25│ 27│ 29│ 31│
4853 │ Layer Column ID│ 1│ 3│ 5│ 7│
4854 │ ╶───────────────────┼────┼────┼────┼────┤
4855 │ No Column ID │ 25│ 27│ 29│ 31│
4856 │ Layer Column ID│ 1│ 3│ 5│ 7│
4857 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4862 ╭──────────────────────────────────────────┬───────────────────╮
4864 │ ├─────────┬─────────┤
4866 │ ├─────────┼─────────┤
4868 │ ├────┬────┼────┬────┤
4869 │ │ Yes│ No │ Yes│ No │
4870 │ ├────┼────┼────┼────┤
4871 │ │QN86│QN86│QN86│QN86│
4872 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4873 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 2│ 4│ 6│ 8│
4874 │ Layer Column ID│ 2│ 4│ 6│ 8│
4875 │ ╶───────────────────┼────┼────┼────┼────┤
4876 │ No Column ID │ 2│ 4│ 6│ 8│
4877 │ Layer Column ID│ 2│ 4│ 6│ 8│
4878 │ ╶────────────────────────────┼────┼────┼────┼────┤
4879 │ No QN57 Yes Column ID │ 10│ 12│ 14│ 16│
4880 │ Layer Column ID│ 2│ 4│ 6│ 8│
4881 │ ╶───────────────────┼────┼────┼────┼────┤
4882 │ No Column ID │ 10│ 12│ 14│ 16│
4883 │ Layer Column ID│ 2│ 4│ 6│ 8│
4884 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4885 │ No QN61 Yes QN57 Yes Column ID │ 18│ 20│ 22│ 24│
4886 │ Layer Column ID│ 2│ 4│ 6│ 8│
4887 │ ╶───────────────────┼────┼────┼────┼────┤
4888 │ No Column ID │ 18│ 20│ 22│ 24│
4889 │ Layer Column ID│ 2│ 4│ 6│ 8│
4890 │ ╶────────────────────────────┼────┼────┼────┼────┤
4891 │ No QN57 Yes Column ID │ 26│ 28│ 30│ 32│
4892 │ Layer Column ID│ 2│ 4│ 6│ 8│
4893 │ ╶───────────────────┼────┼────┼────┼────┤
4894 │ No Column ID │ 26│ 28│ 30│ 32│
4895 │ Layer Column ID│ 2│ 4│ 6│ 8│
4896 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4901 ╭──────────────────────────────────────────┬───────────────────╮
4903 │ ├─────────┬─────────┤
4905 │ ├─────────┼─────────┤
4907 │ ├────┬────┼────┬────┤
4908 │ │ Yes│ No │ Yes│ No │
4909 │ ├────┼────┼────┼────┤
4910 │ │QN86│QN86│QN86│QN86│
4911 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4912 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 33│ 35│ 37│ 39│
4913 │ Layer Column ID│ 9│ 11│ 13│ 15│
4914 │ ╶───────────────────┼────┼────┼────┼────┤
4915 │ No Column ID │ 33│ 35│ 37│ 39│
4916 │ Layer Column ID│ 9│ 11│ 13│ 15│
4917 │ ╶────────────────────────────┼────┼────┼────┼────┤
4918 │ No QN57 Yes Column ID │ 41│ 43│ 45│ 47│
4919 │ Layer Column ID│ 9│ 11│ 13│ 15│
4920 │ ╶───────────────────┼────┼────┼────┼────┤
4921 │ No Column ID │ 41│ 43│ 45│ 47│
4922 │ Layer Column ID│ 9│ 11│ 13│ 15│
4923 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4924 │ No QN61 Yes QN57 Yes Column ID │ 49│ 51│ 53│ 55│
4925 │ Layer Column ID│ 9│ 11│ 13│ 15│
4926 │ ╶───────────────────┼────┼────┼────┼────┤
4927 │ No Column ID │ 49│ 51│ 53│ 55│
4928 │ Layer Column ID│ 9│ 11│ 13│ 15│
4929 │ ╶────────────────────────────┼────┼────┼────┼────┤
4930 │ No QN57 Yes Column ID │ 57│ 59│ 61│ 63│
4931 │ Layer Column ID│ 9│ 11│ 13│ 15│
4932 │ ╶───────────────────┼────┼────┼────┼────┤
4933 │ No Column ID │ 57│ 59│ 61│ 63│
4934 │ Layer Column ID│ 9│ 11│ 13│ 15│
4935 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4940 ╭──────────────────────────────────────────┬───────────────────╮
4942 │ ├─────────┬─────────┤
4944 │ ├─────────┼─────────┤
4946 │ ├────┬────┼────┬────┤
4947 │ │ Yes│ No │ Yes│ No │
4948 │ ├────┼────┼────┼────┤
4949 │ │QN86│QN86│QN86│QN86│
4950 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4951 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 34│ 36│ 38│ 40│
4952 │ Layer Column ID│ 10│ 12│ 14│ 16│
4953 │ ╶───────────────────┼────┼────┼────┼────┤
4954 │ No Column ID │ 34│ 36│ 38│ 40│
4955 │ Layer Column ID│ 10│ 12│ 14│ 16│
4956 │ ╶────────────────────────────┼────┼────┼────┼────┤
4957 │ No QN57 Yes Column ID │ 42│ 44│ 46│ 48│
4958 │ Layer Column ID│ 10│ 12│ 14│ 16│
4959 │ ╶───────────────────┼────┼────┼────┼────┤
4960 │ No Column ID │ 42│ 44│ 46│ 48│
4961 │ Layer Column ID│ 10│ 12│ 14│ 16│
4962 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4963 │ No QN61 Yes QN57 Yes Column ID │ 50│ 52│ 54│ 56│
4964 │ Layer Column ID│ 10│ 12│ 14│ 16│
4965 │ ╶───────────────────┼────┼────┼────┼────┤
4966 │ No Column ID │ 50│ 52│ 54│ 56│
4967 │ Layer Column ID│ 10│ 12│ 14│ 16│
4968 │ ╶────────────────────────────┼────┼────┼────┼────┤
4969 │ No QN57 Yes Column ID │ 58│ 60│ 62│ 64│
4970 │ Layer Column ID│ 10│ 12│ 14│ 16│
4971 │ ╶───────────────────┼────┼────┼────┼────┤
4972 │ No Column ID │ 58│ 60│ 62│ 64│
4973 │ Layer Column ID│ 10│ 12│ 14│ 16│
4974 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4978 AT_SETUP([CTABLES categorical summary functions])
4979 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4980 AT_DATA([ctables.sps],
4983 /TABLE region BY qnd5a[COUNT, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, TOTAL[COUNT, VALIDN, TOTALN]]
4984 /CATEGORIES VARIABLES=qnd5a TOTAL=YES MISSING=INCLUDE
4985 /SLABELS POSITION=ROW.
4987 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
4989 ╭─────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────╮
4990 │ │ D5a. What would you say is your primary ethnic background? │
4991 │ ├─────┬───────┬───────┬──────────┬──────────┬─────────┬──────────┬──────────────┬──────┬───────┬─────┤
4992 │ │ │ │ │ │ │ │ │ Multiple - │ │ │ │
4993 │ │ │ │ │ South │ Central │ Puerto │ Something│ cannot choose│ Don't│ │ │
4994 │ │Cuban│Mexican│Spanish│ American │ American │Rican, OR│ else │ one │ know │Refused│Total│
4995 ├─────────────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4996 │Region NE Count │ 6│ 8│ 8│ 11│ 7│ 39│ 23│ 2│ 0│ 1│ 105│
4997 │ Row % │ 5.7%│ 7.6%│ 7.6%│ 10.5%│ 6.7%│ 37.1%│ 21.9%│ 1.9%│ .0%│ 1.0%│ │
4998 │ Row │ 5.8%│ 7.7%│ 7.7%│ 10.6%│ 6.7%│ 37.5%│ 22.1%│ 1.9%│ .0%│ .0%│ │
4999 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
5000 │ % │ │ │ │ │ │ │ │ │ │ │ │
5001 │ Row │ .4%│ .6%│ .6%│ .8%│ .5%│ 2.8%│ 1.6%│ .1%│ .0%│ .1%│ │
5002 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
5003 │ % │ │ │ │ │ │ │ │ │ │ │ │
5004 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 104│
5005 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1409│
5006 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
5007 │ MW Count │ 3│ 24│ 1│ 4│ 5│ 9│ 6│ 0│ 0│ 1│ 53│
5008 │ Row % │ 5.7%│ 45.3%│ 1.9%│ 7.5%│ 9.4%│ 17.0%│ 11.3%│ .0%│ .0%│ 1.9%│ │
5009 │ Row │ 5.8%│ 46.2%│ 1.9%│ 7.7%│ 9.6%│ 17.3%│ 11.5%│ .0%│ .0%│ .0%│ │
5010 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
5011 │ % │ │ │ │ │ │ │ │ │ │ │ │
5012 │ Row │ .2%│ 1.5%│ .1%│ .2%│ .3%│ .5%│ .4%│ .0%│ .0%│ .1%│ │
5013 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
5014 │ % │ │ │ │ │ │ │ │ │ │ │ │
5015 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 52│
5016 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1654│
5017 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
5018 │ S Count │ 10│ 113│ 11│ 14│ 25│ 23│ 20│ 2│ 3│ 2│ 223│
5019 │ Row % │ 4.5%│ 50.7%│ 4.9%│ 6.3%│ 11.2%│ 10.3%│ 9.0%│ .9%│ 1.3%│ .9%│ │
5020 │ Row │ 4.6%│ 51.8%│ 5.0%│ 6.4%│ 11.5%│ 10.6%│ 9.2%│ .9%│ .0%│ .0%│ │
5021 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
5022 │ % │ │ │ │ │ │ │ │ │ │ │ │
5023 │ Row │ .4%│ 4.7%│ .5%│ .6%│ 1.0%│ 1.0%│ .8%│ .1%│ .1%│ .1%│ │
5024 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
5025 │ % │ │ │ │ │ │ │ │ │ │ │ │
5026 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 218│
5027 │ Total N│ │ │ │ │ │ │ │ │ │ │ 2390│
5028 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
5029 │ W Count │ 1│ 166│ 28│ 5│ 15│ 7│ 19│ 3│ 0│ 1│ 245│
5030 │ Row % │ .4%│ 67.8%│ 11.4%│ 2.0%│ 6.1%│ 2.9%│ 7.8%│ 1.2%│ .0%│ .4%│ │
5031 │ Row │ .4%│ 68.0%│ 11.5%│ 2.0%│ 6.1%│ 2.9%│ 7.8%│ 1.2%│ .0%│ .0%│ │
5032 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
5033 │ % │ │ │ │ │ │ │ │ │ │ │ │
5034 │ Row │ .1%│ 10.7%│ 1.8%│ .3%│ 1.0%│ .5%│ 1.2%│ .2%│ .0%│ .1%│ │
5035 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
5036 │ % │ │ │ │ │ │ │ │ │ │ │ │
5037 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 244│
5038 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1546│
5039 ╰─────────────────┴─────┴───────┴───────┴──────────┴──────────┴─────────┴──────────┴──────────────┴──────┴───────┴─────╯
5043 AT_SETUP([CTABLES scale summary functions])
5044 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
5045 AT_DATA([ctables.sps],
5049 * Use SPLIT FILE with FREQUENCIES to generate output equivalent to
5050 CTABLES later, to make the results easier to verify.
5051 SPLIT FILE BY REGION.
5054 /STATISTICS=MEAN SEMEAN MEDIAN MODE STDDEV VARIANCE RANGE MINIMUM MAXIMUM SUM
5055 /FORMAT NOTABLE /MISSING=INCLUDE.
5059 /VLABELS VARIABLE=qn19a DISPLAY=NONE
5060 /TABLE region BY qn19a[VALIDN, MISSING, MEAN, SEMEAN, MEDIAN, MODE, STDDEV, VARIANCE, RANGE, MINIMUM, MAXIMUM, SUM, COUNT, TOTALN, ROWPCT.SUM]
5061 /CATEGORIES VARIABLES=qn19a TOTAL=YES MISSING=INCLUDE
5062 /SLABELS POSITION=ROW
5063 /CLABELS ROWLABELS=OPPOSITE.
5065 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
5067 ╭─────────┬───────────────────────────────────╮
5069 │ ├────────┬────────┬────────┬────────┤
5070 │ │ NE │ MW │ S │ W │
5071 │ ├────────┼────────┼────────┼────────┤
5072 │ │ QN19A │ QN19A │ QN19A │ QN19A │
5073 ├─────────┼────────┼────────┼────────┼────────┤
5074 │N Valid │ 936│ 1019│ 1276│ 950│
5075 │ Missing│ 473│ 635│ 1114│ 596│
5076 ├─────────┼────────┼────────┼────────┼────────┤
5077 │Mean │ 19.33│ 19.83│ 20.29│ 19.87│
5078 ├─────────┼────────┼────────┼────────┼────────┤
5079 │S.E. Mean│ .14│ .16│ .18│ .17│
5080 ├─────────┼────────┼────────┼────────┼────────┤
5081 │Median │ 18.00│ 19.00│ 19.00│ 19.00│
5082 ├─────────┼────────┼────────┼────────┼────────┤
5083 │Mode │ 18.00│ 18.00│ 18.00│ 18.00│
5084 ├─────────┼────────┼────────┼────────┼────────┤
5085 │Std Dev │ 4.41│ 5.15│ 6.44│ 5.25│
5086 ├─────────┼────────┼────────┼────────┼────────┤
5087 │Variance │ 19.41│ 26.47│ 41.43│ 27.59│
5088 ├─────────┼────────┼────────┼────────┼────────┤
5089 │Range │ 59.00│ 71.00│ 75.00│ 61.00│
5090 ├─────────┼────────┼────────┼────────┼────────┤
5091 │Minimum │ .00│ 4.00│ 4.00│ 4.00│
5092 ├─────────┼────────┼────────┼────────┼────────┤
5093 │Maximum │ 59.00│ 75.00│ 79.00│ 65.00│
5094 ├─────────┼────────┼────────┼────────┼────────┤
5095 │Sum │18092.00│20206.00│25886.00│18877.00│
5096 ╰─────────┴────────┴────────┴────────┴────────╯
5099 ╭────────────────────────┬────────┬────────┬────────┬────────╮
5100 │ │ NE │ MW │ S │ W │
5101 ├────────────────────────┼────────┼────────┼────────┼────────┤
5102 │REGION Valid N │ 936│ 1019│ 1276│ 950│
5103 │ Missing │ 473.00│ 635.00│ 1114.00│ 596.00│
5104 │ Mean │ 19.33│ 19.83│ 20.29│ 19.87│
5105 │ Std Error of Mean│ .14│ .16│ .18│ .17│
5106 │ Median │ 18.00│ 19.00│ 19.00│ 19.00│
5107 │ Mode │ 18.00│ 18.00│ 18.00│ 18.00│
5108 │ Std Deviation │ 4.41│ 5.15│ 6.44│ 5.25│
5109 │ Variance │ 19.41│ 26.47│ 41.43│ 27.59│
5110 │ Range │ 59.00│ 71.00│ 75.00│ 61.00│
5111 │ Minimum │ .00│ 4.00│ 4.00│ 4.00│
5112 │ Maximum │ 59.00│ 75.00│ 79.00│ 65.00│
5113 │ Sum │18092.00│20206.00│25886.00│18877.00│
5114 │ Count │ 1409│ 1654│ 2390│ 1546│
5115 │ Total N │ 1409│ 1654│ 2390│ 1546│
5116 │ Row Sum % │ 21.8%│ 24.3%│ 31.2%│ 22.7%│
5117 ╰────────────────────────┴────────┴────────┴────────┴────────╯
5121 AT_SETUP([CTABLES scale summary functions - weighting])
5126 for n in 1 2 3 4 5 6 7 8 9 10; do
5127 if test $c -lt 15; then
5132 printf "$weight $a $b $cval\n"
5133 weight=$(expr \( $weight + 3 \) % 7 + 2)
5134 c=$(expr \( $c + 13 \) % 29 + 7)
5139 AT_DATA([analysis.sps],
5140 [[* Use SPLIT FILE with FREQUENCIES to generate output equivalent to
5141 CTABLES later, to make the results easier to verify.
5145 /STATISTICS=MEAN SEMEAN MEDIAN MODE STDDEV VARIANCE RANGE MINIMUM MAXIMUM SUM
5146 /FORMAT NOTABLE /MISSING=INCLUDE.
5150 /TABLE c[VALIDN, MISSING, MEAN F8.2, SEMEAN F8.2, MEDIAN F8.2, MODE, STDDEV F8.2, VARIANCE F8.2, RANGE F8.2, MINIMUM, MAXIMUM, SUM F8.2, COUNT, TOTALN, LAYERROWPCT.SUM] BY a>b
5151 /SLABELS POSITION=ROW
5152 /CATEGORIES VARIABLES=a b MISSING=INCLUDE.
5155 AT_DATA([ctables.sps],
5156 [[DATA LIST LIST NOTABLE FILE='ctables.txt'
5157 /w (F5.0) a b c (f2.0).
5158 VAR LEVEL w c (SCALE) a b (NOMINAL).
5159 MISSING VALUES a b (9).
5161 INCLUDE 'analysis.sps'.
5164 INCLUDE 'analysis.sps'.
5166 * Same as original analysis using unweighted versions of summaries.
5168 /TABLE c[UVALIDN, UMISSING, UMEAN F8.2, USEMEAN F8.2, UMEDIAN F8.2, UMODE, USTDDEV F8.2, UVARIANCE F8.2, USUM F8.2, UCOUNT, UTOTALN, ULAYERROWPCT.SUM] BY a>b
5169 /SLABELS POSITION=ROW
5170 /CATEGORIES VARIABLES=a b MISSING=INCLUDE.
5172 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
5174 ╭─────────┬──────────────────────────────────────────────────────────────╮
5176 │ ├────────────────────┬────────────────────┬────────────────────┤
5178 │ ├────────────────────┼────────────────────┼────────────────────┤
5180 │ ├──────┬──────┬──────┼──────┬──────┬──────┼──────┬──────┬──────┤
5181 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5182 │ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5183 │ │ c │ c │ c │ c │ c │ c │ c │ c │ c │
5184 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5185 │N Valid │ 7│ 6│ 8│ 7│ 7│ 8│ 7│ 7│ 8│
5186 │ Missing│ 3│ 4│ 2│ 3│ 3│ 2│ 3│ 3│ 2│
5187 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5188 │Mean │ 25.86│ 24.50│ 24.63│ 25.86│ 25.71│ 24.25│ 25.43│ 25.29│ 23.88│
5189 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5190 │S.E. Mean│ 2.44│ 2.14│ 2.58│ 2.44│ 2.18│ 2.43│ 2.36│ 2.18│ 2.47│
5191 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5192 │Median │ 25.00│ 24.50│ 25.00│ 25.00│ 27.00│ 25.00│ 25.00│ 24.00│ 23.50│
5193 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5194 │Mode │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5195 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5196 │Std Dev │ 6.47│ 5.24│ 7.31│ 6.47│ 5.77│ 6.88│ 6.24│ 5.77│ 6.98│
5197 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5198 │Variance │ 41.81│ 27.50│ 53.41│ 41.81│ 33.24│ 47.36│ 38.95│ 33.24│ 48.70│
5199 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5200 │Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5201 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5202 │Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5203 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5204 │Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5205 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5206 │Sum │181.00│147.00│197.00│181.00│180.00│194.00│178.00│177.00│191.00│
5207 ╰─────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
5210 ╭───────────────────┬──────────────────────────────────────────────────────────────╮
5212 │ ├────────────────────┬────────────────────┬────────────────────┤
5214 │ ├────────────────────┼────────────────────┼────────────────────┤
5216 │ ├──────┬──────┬──────┼──────┬──────┬──────┼──────┬──────┬──────┤
5217 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5218 ├───────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5219 │c Valid N │ 7│ 6│ 8│ 7│ 7│ 8│ 7│ 7│ 8│
5220 │ Missing │ 3│ 4│ 2│ 3│ 3│ 2│ 3│ 3│ 2│
5221 │ Mean │ 25.86│ 24.50│ 24.63│ 25.86│ 25.71│ 24.25│ 25.43│ 25.29│ 23.88│
5222 │ Std Error of Mean│ 2.44│ 2.14│ 2.58│ 2.44│ 2.18│ 2.43│ 2.36│ 2.18│ 2.47│
5223 │ Median │ 25.00│ 24.50│ 25.00│ 25.00│ 27.00│ 25.00│ 25.00│ 24.00│ 23.50│
5224 │ Mode │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5225 │ Std Deviation │ 6.47│ 5.24│ 7.31│ 6.47│ 5.77│ 6.88│ 6.24│ 5.77│ 6.98│
5226 │ Variance │ 41.81│ 27.50│ 53.41│ 41.81│ 33.24│ 47.36│ 38.95│ 33.24│ 48.70│
5227 │ Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5228 │ Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5229 │ Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5230 │ Sum │181.00│147.00│197.00│181.00│180.00│194.00│178.00│177.00│191.00│
5231 │ Count │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5232 │ Total N │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5233 │ Layer Row Sum % │ 11.1%│ 9.0%│ 12.1%│ 11.1%│ 11.1%│ 11.9%│ 10.9%│ 10.9%│ 11.7%│
5234 ╰───────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
5237 ╭─────────┬─────────────────────────────────────────────────────────────────╮
5239 │ ├─────────────────────┬─────────────────────┬─────────────────────┤
5241 │ ├─────────────────────┼─────────────────────┼─────────────────────┤
5243 │ ├───────┬──────┬──────┼──────┬───────┬──────┼──────┬──────┬───────┤
5244 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5245 │ ├───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5246 │ │ c │ c │ c │ c │ c │ c │ c │ c │ c │
5247 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5248 │N Valid │ 40│ 35│ 41│ 26│ 38│ 40│ 34│ 32│ 39│
5249 │ Missing│ 6│ 14│ 11│ 22│ 13│ 7│ 16│ 21│ 10│
5250 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5251 │Mean │ 27.23│ 24.20│ 22.63│ 27.96│ 27.21│ 23.48│ 23.71│ 25.47│ 26.03│
5252 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5253 │S.E. Mean│ .93│ .75│ 1.03│ 1.12│ .84│ .87│ 1.01│ 1.05│ 1.01│
5254 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5255 │Median │ 30.00│ 22.00│ 19.00│ 30.00│ 29.00│ 24.00│ 23.00│ 24.00│ 28.00│
5256 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5257 │Mode │ 34│ 29│ 19│ 34│ 33│ 28│ 23│ 18│ 30│
5258 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5259 │Std Dev │ 5.89│ 4.42│ 6.59│ 5.69│ 5.16│ 5.50│ 5.87│ 5.94│ 6.30│
5260 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5261 │Variance │ 34.64│ 19.52│ 43.39│ 32.36│ 26.66│ 30.20│ 34.46│ 35.29│ 39.71│
5262 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5263 │Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5264 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5265 │Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5266 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5267 │Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5268 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5269 │Sum │1089.00│847.00│928.00│727.00│1034.00│939.00│806.00│815.00│1015.00│
5270 ╰─────────┴───────┴──────┴──────┴──────┴───────┴──────┴──────┴──────┴───────╯
5273 ╭───────────────────┬─────────────────────────────────────────────────────────────────╮
5275 │ ├─────────────────────┬─────────────────────┬─────────────────────┤
5277 │ ├─────────────────────┼─────────────────────┼─────────────────────┤
5279 │ ├───────┬──────┬──────┼──────┬───────┬──────┼──────┬──────┬───────┤
5280 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5281 ├───────────────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5282 │c Valid N │ 40│ 35│ 41│ 26│ 38│ 40│ 34│ 32│ 39│
5283 │ Missing │ 6│ 14│ 11│ 22│ 13│ 7│ 16│ 21│ 10│
5284 │ Mean │ 27.22│ 24.20│ 22.63│ 27.96│ 27.21│ 23.48│ 23.71│ 25.47│ 26.03│
5285 │ Std Error of Mean│ .93│ .75│ 1.03│ 1.12│ .84│ .87│ 1.01│ 1.05│ 1.01│
5286 │ Median │ 30.00│ 22.00│ 19.00│ 30.00│ 29.00│ 24.00│ 23.00│ 24.00│ 28.00│
5287 │ Mode │ 34│ 29│ 19│ 34│ 33│ 28│ 23│ 18│ 30│
5288 │ Std Deviation │ 5.89│ 4.42│ 6.59│ 5.69│ 5.16│ 5.50│ 5.87│ 5.94│ 6.30│
5289 │ Variance │ 34.64│ 19.52│ 43.39│ 32.36│ 26.66│ 30.20│ 34.46│ 35.29│ 39.71│
5290 │ Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5291 │ Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5292 │ Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5293 │ Sum │1089.00│847.00│928.00│727.00│1034.00│939.00│806.00│815.00│1015.00│
5294 │ Count │ 46│ 49│ 52│ 48│ 51│ 47│ 50│ 53│ 49│
5295 │ Total N │ 46│ 49│ 52│ 48│ 51│ 47│ 50│ 53│ 49│
5296 │ Layer Row Sum % │ 13.3%│ 10.3%│ 11.3%│ 8.9%│ 12.6%│ 11.5%│ 9.8%│ 9.9%│ 12.4%│
5297 ╰───────────────────┴───────┴──────┴──────┴──────┴───────┴──────┴──────┴──────┴───────╯
5300 ╭──────────────────────────────┬──────────────────────────────────────────────────────────────╮
5302 │ ├────────────────────┬────────────────────┬────────────────────┤
5304 │ ├────────────────────┼────────────────────┼────────────────────┤
5306 │ ├──────┬──────┬──────┼──────┬──────┬──────┼──────┬──────┬──────┤
5307 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5308 ├──────────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5309 │c Unweighted Valid N │ 7│ 6│ 8│ 7│ 7│ 8│ 7│ 7│ 8│
5310 │ Unweighted Missing │ 3│ 4│ 2│ 3│ 3│ 2│ 3│ 3│ 2│
5311 │ Unweighted Mean │ 25.86│ 24.50│ 24.63│ 25.86│ 25.71│ 24.25│ 25.43│ 25.29│ 23.88│
5312 │ Unweighted Std Error of Mean│ 2.44│ 2.14│ 2.58│ 2.44│ 2.18│ 2.43│ 2.36│ 2.18│ 2.47│
5313 │ Unweighted Median │ 25.00│ 24.50│ 25.00│ 25.00│ 27.00│ 25.00│ 25.00│ 24.00│ 23.50│
5314 │ Unweighted Mode │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5315 │ Unweighted Std Deviation │ 6.47│ 5.24│ 7.31│ 6.47│ 5.77│ 6.88│ 6.24│ 5.77│ 6.98│
5316 │ Unweighted Variance │ 41.81│ 27.50│ 53.41│ 41.81│ 33.24│ 47.36│ 38.95│ 33.24│ 48.70│
5317 │ Unweighted Sum │181.00│147.00│197.00│181.00│180.00│194.00│178.00│177.00│191.00│
5318 │ Unweighted Count │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5319 │ Unweighted Total N │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5320 │ Unweighted Layer Row Sum % │ 11.1%│ 9.0%│ 12.1%│ 11.1%│ 11.1%│ 11.9%│ 10.9%│ 10.9%│ 11.7%│
5321 ╰──────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
5325 AT_SETUP([CTABLES hidden scale VLABELS])
5326 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
5327 AT_DATA([ctables.sps],
5330 /TABLE region BY qn19a + qn35
5331 /SLABELS POSITION=ROW.
5333 /VLABELS VARIABLE=qn19a DISPLAY=NONE
5334 /TABLE region BY qn19a + qn35
5335 /SLABELS POSITION=ROW.
5337 /VLABELS VARIABLE=qn35 DISPLAY=NONE
5338 /TABLE region BY qn19a + qn35
5339 /SLABELS POSITION=ROW.
5341 * This one in particular caused a crash because no categories were
5342 created on the column axis, so passing in 0 for the index was still
5343 too big for that number of categories. It was fixed by creating a
5344 name-only category for each variable despite the "NONE" request,
5345 then hiding the entire dimension's labels if all its labels were
5348 /VLABELS VARIABLE=qn19a qn35 DISPLAY=NONE
5349 /TABLE region BY qn19a + qn35
5350 /SLABELS POSITION=ROW.
5352 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
5354 ╭──────────────┬────────────────────────────┬─────────────────────────────────╮
5355 │ │ 19a. About how old were you│ 35. In the past thirty days, how│
5356 │ │ when you first starting │ many times have you driven a │
5357 │ │ drinking alcohol, not │ motor vehicle WITHIN TWO HOURS │
5358 │ │ counting small tastes or │ AFTER drinking alcoholic │
5359 │ │ sips of alcohol. │ beverages? │
5360 ├──────────────┼────────────────────────────┼─────────────────────────────────┤
5361 │Region NE Mean│ 19.33│ 2│
5362 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5363 │ MW Mean│ 19.83│ 2│
5364 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5366 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5368 ╰──────────────┴────────────────────────────┴─────────────────────────────────╯
5371 ╭──────────────┬─────┬────────────────────────────────────────────────────────╮
5372 │ │ │ 35. In the past thirty days, how many times have you │
5373 │ │ │ driven a motor vehicle WITHIN TWO HOURS AFTER drinking │
5374 │ │QN19A│ alcoholic beverages? │
5375 ├──────────────┼─────┼────────────────────────────────────────────────────────┤
5376 │Region NE Mean│19.33│ 2│
5377 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5379 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5381 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5383 ╰──────────────┴─────┴────────────────────────────────────────────────────────╯
5386 ╭──────────────┬─────────────────────────────────────────────────────────┬────╮
5387 │ │ 19a. About how old were you when you first starting │ │
5388 │ │ drinking alcohol, not counting small tastes or sips of │ │
5390 ├──────────────┼─────────────────────────────────────────────────────────┼────┤
5391 │Region NE Mean│ 19.33│ 2│
5392 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5393 │ MW Mean│ 19.83│ 2│
5394 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5396 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5398 ╰──────────────┴─────────────────────────────────────────────────────────┴────╯
5401 ╭──────────────┬───────╮
5402 │Region NE Mean│19.33 2│
5409 ╰──────────────┴───────╯
5413 AT_SETUP([CTABLES with SPLIT FILE])
5414 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
5415 AT_DATA([ctables.sps],
5418 SORT CASES BY qns3a.
5420 CTABLES /TABLE qn105ba.
5422 * Layered split has no effect on output.
5423 SPLIT FILE BY qns3a.
5424 CTABLES /TABLE qn105ba.
5426 * Add column variable qns3a to compare against separate splits.
5427 CTABLES /TABLE qn105ba BY qns3a.
5429 * Separate splits are truly output separately.
5430 SPLIT FILE SEPARATE BY qns3a.
5431 CTABLES /TABLE qn105ba.
5433 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
5435 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5437 ├────────────────────────────────────────────────────────────────────────┼─────┤
5438 │105b. How likely is it that drivers who have had too much Almost │ 700│
5439 │to drink to drive safely will A. Get stopped by the police? certain │ │
5440 │ Very likely │ 1502│
5447 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5450 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5452 ├────────────────────────────────────────────────────────────────────────┼─────┤
5453 │105b. How likely is it that drivers who have had too much Almost │ 700│
5454 │to drink to drive safely will A. Get stopped by the police? certain │ │
5455 │ Very likely │ 1502│
5462 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5465 ╭─────────────────────────────────────────────────────────────────┬────────────╮
5471 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
5472 │105b. How likely is it that drivers who have had too Almost │ 297│ 403│
5473 │much to drink to drive safely will A. Get stopped by certain │ │ │
5474 │the police? Very likely │ 660│ 842│
5475 │ Somewhat │ 1174│ 1589│
5477 │ Somewhat │ 640│ 667│
5481 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
5484 ╭────────────┬─────╮
5486 ├────────────┼─────┤
5487 │S3a. GENDER:│Male │
5488 ╰────────────┴─────╯
5491 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5493 ├────────────────────────────────────────────────────────────────────────┼─────┤
5494 │105b. How likely is it that drivers who have had too much Almost │ 297│
5495 │to drink to drive safely will A. Get stopped by the police? certain │ │
5496 │ Very likely │ 660│
5503 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5506 ╭────────────┬──────╮
5508 ├────────────┼──────┤
5509 │S3a. GENDER:│Female│
5510 ╰────────────┴──────╯
5513 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5515 ├────────────────────────────────────────────────────────────────────────┼─────┤
5516 │105b. How likely is it that drivers who have had too much Almost │ 403│
5517 │to drink to drive safely will A. Get stopped by the police? certain │ │
5518 │ Very likely │ 842│
5525 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5529 AT_SETUP([CTABLES variable level inference])
5530 AT_DATA([data.txt], [dnl
5531 dnl n1 has 10 unique small values -> nominal.
5532 dnl n2 has 23 unique small values -> nominal.
5533 dnl n3 is all missing -> nominal.
5534 dnl s1 has 24 unique small values -> scale.
5535 dnl s2 has one negative value -> scale.
5536 dnl s3 has one non-integer value -> scale.
5537 dnl s4 has no valid values less than 10 -> scale.
5538 dnl s5 has no valid values less than 10,000 -> scale.
5539 1 1 . 1 1 1 10 10001
5540 2 2 . 2 2 2 11 10002
5541 3 3 . 3 3 3 12 10003
5542 4 4 . 4 4 4 13 10004
5543 5 5 . 5 5 5 14 10005
5544 6 6 . 6 6 6 15 10006
5545 7 7 . 7 7 7 16 10007
5546 8 8 . 8 8 8 17 10008
5547 9 9 . 9 9 9 18 10009
5548 10 10 . 10 10 10.5 19 110000
5549 1 11 . 11 -1 1 11 10001
5550 2 12 . 12 2 2 12 10002
5551 3 13 . 13 3 3 13 10003
5552 4 14 . 14 4 4 14 10004
5553 5 15 . 15 5 5 15 10005
5554 6 16 . 16 6 6 16 10006
5555 7 17 . 17 7 7 17 10007
5556 8 18 . 18 8 8 18 10008
5557 9 19 . 19 9 9 19 10009
5558 1 20 . 20 1 1 20 10001
5559 2 21 . 21 2 2 21 10002
5560 3 22 . 22 3 3 22 10003
5561 4 23 . 23 4 4 23 10004
5562 5 23 . 24 5 5 24 10005
5563 6 23 . 24 6 6 25 10006
5566 AT_DATA([ctables.sps], [dnl
5567 DATA LIST LIST file='data.txt' NOTABLE /n1 to n3 s1 to s5.
5569 * Nominal formats (copied from data that will default to scale).
5572 FORMATS n4(WKDAY5) n5(MONTH5).
5574 * Scale formats (copied from data that will default to nominal).
5578 FORMATS s6(DOLLAR6.2) s7(CCA8.2) s8(DATETIME17).
5583 CTABLES /TABLE n1 + n2 + n3 + string + s1 + s2 + s3 + s4 + s5.
5587 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
5589 ╭──────┬────────┬──────────────┬─────┬─────┬─────────┬────────────┬────────────╮
5590 │ │ │ Measurement │ │ │ │ │ │
5591 │Name │Position│ Level │ Role│Width│Alignment│Print Format│Write Format│
5592 ├──────┼────────┼──────────────┼─────┼─────┼─────────┼────────────┼────────────┤
5593 │n1 │ 1│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5594 │n2 │ 2│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5595 │n3 │ 3│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5596 │s1 │ 4│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5597 │s2 │ 5│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5598 │s3 │ 6│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5599 │s4 │ 7│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5600 │s5 │ 8│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5601 │n4 │ 9│Unknown │Input│ 8│Right │WKDAY5 │WKDAY5 │
5602 │n5 │ 10│Unknown │Input│ 8│Right │MONTH5 │MONTH5 │
5603 │s6 │ 11│Unknown │Input│ 8│Right │DOLLAR6.2 │DOLLAR6.2 │
5604 │s7 │ 12│Unknown │Input│ 8│Right │CCA8.2 │CCA8.2 │
5605 │s8 │ 13│Unknown │Input│ 8│Right │DATETIME17.0│DATETIME17.0│
5606 │string│ 14│Nominal │Input│ 8│Left │A8 │A8 │
5607 ╰──────┴────────┴──────────────┴─────┴─────┴─────────┴────────────┴────────────╯
5610 ╭────────────┬─────┬────────╮
5612 ├────────────┼─────┼────────┤
5623 ├────────────┼─────┼────────┤
5647 ├────────────┼─────┼────────┤
5649 ├────────────┼─────┼────────┤
5651 ├────────────┼─────┼────────┤
5653 ├────────────┼─────┼────────┤
5655 ├────────────┼─────┼────────┤
5657 ├────────────┼─────┼────────┤
5659 ╰────────────┴─────┴────────╯
5662 ╭──────┬────────┬──────────────┬─────┬─────┬─────────┬────────────┬────────────╮
5663 │ │ │ Measurement │ │ │ │ │ │
5664 │Name │Position│ Level │ Role│Width│Alignment│Print Format│Write Format│
5665 ├──────┼────────┼──────────────┼─────┼─────┼─────────┼────────────┼────────────┤
5666 │n1 │ 1│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5667 │n2 │ 2│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5668 │n3 │ 3│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5669 │s1 │ 4│Scale │Input│ 8│Right │F8.2 │F8.2 │
5670 │s2 │ 5│Scale │Input│ 8│Right │F8.2 │F8.2 │
5671 │s3 │ 6│Scale │Input│ 8│Right │F8.2 │F8.2 │
5672 │s4 │ 7│Scale │Input│ 8│Right │F8.2 │F8.2 │
5673 │s5 │ 8│Scale │Input│ 8│Right │F8.2 │F8.2 │
5674 │n4 │ 9│Nominal │Input│ 8│Right │WKDAY5 │WKDAY5 │
5675 │n5 │ 10│Nominal │Input│ 8│Right │MONTH5 │MONTH5 │
5676 │s6 │ 11│Scale │Input│ 8│Right │DOLLAR6.2 │DOLLAR6.2 │
5677 │s7 │ 12│Scale │Input│ 8│Right │CCA8.2 │CCA8.2 │
5678 │s8 │ 13│Scale │Input│ 8│Right │DATETIME17.0│DATETIME17.0│
5679 │string│ 14│Nominal │Input│ 8│Left │A8 │A8 │
5680 ╰──────┴────────┴──────────────┴─────┴─────┴─────────┴────────────┴────────────╯