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.26-12.29: error: CTABLES: Output format F0.1 specifies width 0,
266 but F requires a width between 1 and 40.
267 12 | CTABLES /TABLE qn1 [MEAN F0.1].
270 ctables.sps:13.26-13.36: error: CTABLES: Output format NEGPAREN requires width 2
272 13 | CTABLES /TABLE qn1 [MEAN NEGPAREN1.2].
275 ctables.sps:14.26-14.36: error: CTABLES: Output format NEGPAREN requires width
276 greater than decimals.
277 14 | CTABLES /TABLE qn1 [MEAN NEGPAREN3.4].
280 ctables.sps:15.21-15.24: error: CTABLES: Summary function MEAN applies only to
282 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
285 ctables.sps:15.16-15.18: note: CTABLES: 'QN1' is not a scale variable.
286 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
289 ctables.sps:15.32: error: CTABLES: Syntax error expecting `@<:@'.
290 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
293 ctables.sps:16.21-16.24: error: CTABLES: Summary function MEAN applies only to
295 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
298 ctables.sps:16.16-16.18: note: CTABLES: 'QN1' is not a scale variable.
299 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
302 ctables.sps:16.40: error: CTABLES: Syntax error expecting `@:>@'.
303 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
306 ctables.sps:17.56: error: CTABLES: Syntax error expecting string.
307 17 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [SUBTOTAL=x].
310 ctables.sps:18.50-18.51: error: CTABLES: Syntax error expecting THRU.
311 18 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [LO **].
314 ctables.sps:19.55: error: CTABLES: Syntax error expecting number.
315 19 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [LO THRU x].
318 ctables.sps:20.54-20.55: error: CTABLES: Syntax error expecting number.
319 20 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1 THRU **].
322 ctables.sps:21.56-21.57: error: CTABLES: Syntax error expecting string.
323 21 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['x' THRU **].
326 ctables.sps:22.48-22.49: error: CTABLES: Syntax error expecting identifier.
327 22 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&**].
330 ctables.sps:23.47-23.48: error: CTABLES: Unknown postcompute &x.
331 23 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&x].
334 ctables.sps:24.61-24.63: error: CTABLES: Syntax error expecting number between 0
336 24 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=PTILE(qn1, 101).
339 ctables.sps:25.58: error: CTABLES: Syntax error expecting `@:}@'.
340 25 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1.
343 ctables.sps:26.54: error: CTABLES: Syntax error expecting `@{:@'.
344 26 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=MEAN.
347 ctables.sps:27.54-27.55: error: CTABLES: Syntax error expecting INCLUDE or
349 27 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 MISSING=**.
352 ctables.sps:28.52-28.53: error: CTABLES: Syntax error expecting YES or NO.
353 28 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 TOTAL=**.
356 ctables.sps:29.52-29.53: error: CTABLES: Syntax error expecting string.
357 29 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 LABEL=**.
360 ctables.sps:30.55-30.56: error: CTABLES: Syntax error expecting BEFORE or AFTER.
361 30 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 POSITION=**.
364 ctables.sps:31.52-31.53: error: CTABLES: Syntax error expecting INCLUDE or
366 31 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 EMPTY=**.
369 ctables.sps:32.46-32.47: error: CTABLES: Syntax error expecting ORDER, KEY,
370 MISSING, TOTAL, LABEL, POSITION, or EMPTY.
371 32 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 **.
374 ctables.sps:33.54-33.55: error: CTABLES: Syntax error expecting TOTAL, LABEL,
376 33 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1,2,3] **.
379 ctables.sps:34.36: error: CTABLES: Syntax error expecting positive integer for
381 34 | CTABLES /PCOMPUTE &k=EXPR(SUBTOTAL[0]).
384 ctables.sps:35.37-35.38: error: CTABLES: Syntax error expecting `@:>@'.
385 35 | CTABLES /PCOMPUTE &k=EXPR(SUBTOTAL[1**]).
388 ctables.sps:36.31-36.32: error: CTABLES: Syntax error expecting THRU.
389 36 | CTABLES /PCOMPUTE &k=EXPR([LO **]).
392 ctables.sps:37.36-37.37: error: CTABLES: Syntax error expecting number.
393 37 | CTABLES /PCOMPUTE &k=EXPR([LO THRU **]).
396 ctables.sps:38.35-38.36: error: CTABLES: Syntax error expecting number.
397 38 | CTABLES /PCOMPUTE &k=EXPR([1 THRU **]).
400 ctables.sps:39.29-39.30: error: CTABLES: Syntax error expecting `@:>@'.
401 39 | CTABLES /PCOMPUTE &k=EXPR([1**]).
404 ctables.sps:40.29: error: CTABLES: Syntax error expecting `@:}@'.
405 40 | CTABLES /PCOMPUTE &k=EXPR((1x)).
408 ctables.sps:41.19-41.20: error: CTABLES: Syntax error expecting &.
409 41 | CTABLES /PCOMPUTE **k.
412 ctables.sps:42.20: error: CTABLES: Syntax error expecting identifier.
413 42 | CTABLES /PCOMPUTE &1.
416 ctables.sps:43.21-43.22: error: CTABLES: Syntax error expecting `=EXPR@{:@'.
417 43 | CTABLES /PCOMPUTE &k**.
420 ctables.sps:44.21-44.23: error: CTABLES: Syntax error expecting `=EXPR@{:@'.
421 44 | CTABLES /PCOMPUTE &k=**.
424 ctables.sps:45.21-45.27: error: CTABLES: Syntax error expecting `=EXPR@{:@'.
425 45 | CTABLES /PCOMPUTE &k=EXPR**.
428 ctables.sps:46.28: error: CTABLES: Syntax error expecting `@:}@'.
429 46 | CTABLES /PCOMPUTE &k=EXPR(1x).
432 ctables.sps:47.31-47.49: warning: CTABLES: New definition of &k will override
433 the previous definition.
434 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
435 | ^~~~~~~~~~~~~~~~~~~
437 ctables.sps:47.10-47.28: note: CTABLES: This is the previous definition.
438 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
439 | ^~~~~~~~~~~~~~~~~~~
441 ctables.sps:47.50: error: CTABLES: Syntax error expecting `/'.
442 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
445 ctables.sps:48.53-48.64: error: CTABLES: Syntax error expecting summary function
447 48 | CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k FORMAT=NOTAFUNCTION.
450 ctables.sps:49.59-49.60: error: CTABLES: Syntax error expecting number between 0
452 49 | CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k FORMAT=PTILE **.
455 ctables.sps:50.52-50.53: error: CTABLES: Syntax error expecting string.
456 50 | CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k LABEL=**.
459 ctables.sps:51.61-51.62: error: CTABLES: Syntax error expecting YES or NO.
460 51 | CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k HIDESOURCECATS=**.
463 ctables.sps:52.46-52.47: error: CTABLES: Syntax error expecting LABEL, FORMAT,
465 52 | CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k **.
468 ctables.sps:53.23-53.24: error: CTABLES: Syntax error expecting string.
469 53 | CTABLES /FORMAT EMPTY=**.
472 ctables.sps:54.25-54.26: error: CTABLES: Syntax error expecting string.
473 54 | CTABLES /FORMAT MISSING=**.
476 ctables.sps:55.17-55.18: error: CTABLES: Syntax error expecting MINCOLWIDTH,
477 MAXCOLWIDTH, UNITS, EMPTY, or MISSING.
478 55 | CTABLES /FORMAT **.
481 ctables.sps:56.17-56.45: error: CTABLES: MINCOLWIDTH must not be greater than
483 56 | CTABLES /FORMAT MINCOLWIDTH=20 MAXCOLWIDTH=10/.
484 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
486 ctables.sps:57.18-57.19: error: CTABLES: Syntax error expecting VARIABLES.
487 57 | CTABLES /VLABELS **.
490 ctables.sps:58.28-58.34: error: CTABLES: NOTAVAR is not a variable name.
491 58 | CTABLES /VLABELS VARIABLES=NOTAVAR.
494 ctables.sps:59.32-59.33: error: CTABLES: Syntax error expecting DISPLAY.
495 59 | CTABLES /VLABELS VARIABLES=qn1 **.
498 ctables.sps:60.40-60.41: error: CTABLES: Syntax error expecting DEFAULT, NAME,
499 LABEL, BOTH, or NONE.
500 60 | CTABLES /VLABELS VARIABLES=qn1 DISPLAY=**.
503 ctables.sps:61.17-61.18: error: CTABLES: Syntax error expecting COUNTDUPLICATES.
504 61 | CTABLES /MRSETS **.
507 ctables.sps:62.33-62.34: error: CTABLES: Syntax error expecting YES or NO.
508 62 | CTABLES /MRSETS COUNTDUPLICATES=**.
511 ctables.sps:63.19-63.20: error: CTABLES: Syntax error expecting VARIABLE or
513 63 | CTABLES /SMISSING **.
516 ctables.sps:64.17-64.18: error: CTABLES: Syntax error expecting VARIABLE.
517 64 | CTABLES /WEIGHT **.
520 ctables.sps:65.26-65.32: error: CTABLES: NOTAVAR is not a variable name.
521 65 | CTABLES /WEIGHT VARIABLE=NOTAVAR.
524 ctables.sps:66.32: error: CTABLES: Syntax error expecting integer 2 or greater
525 for HIDESMALLCOUNTS COUNT.
526 66 | CTABLES /HIDESMALLCOUNTS COUNT=1.
529 ctables.sps:67.10-67.13: error: CTABLES: Syntax error expecting one of the
530 following: FORMAT, VLABELS, MRSETS, SMISSING, PCOMPUTE, PPROPERTIES, WEIGHT,
531 HIDESMALLCOUNTS, TABLE.
535 ctables.sps:68.33: error: CTABLES: Syntax error expecting `/'.
536 68 | CTABLES /HIDESMALLCOUNTS COUNT=2.
539 ctables.sps:69.19-69.20: error: CTABLES: Syntax error expecting `/'.
540 69 | CTABLES /TABLE qn1**.
543 ctables.sps:70.38-70.39: error: CTABLES: Syntax error expecting COLUMN, ROW, or
545 70 | CTABLES /TABLE qn1 /SLABELS POSITION=**.
548 ctables.sps:71.37-71.38: error: CTABLES: Syntax error expecting YES or NO.
549 71 | CTABLES /TABLE qn1 /SLABELS VISIBLE=**.
552 ctables.sps:72.29-72.30: error: CTABLES: Syntax error expecting POSITION or
554 72 | CTABLES /TABLE qn1 /SLABELS **.
557 ctables.sps:73.39-73.40: error: CTABLES: Syntax error expecting OPPOSITE or
559 73 | CTABLES /TABLE qn1 /CLABELS ROWLABELS=**.
562 ctables.sps:74.39-74.40: error: CTABLES: Syntax error expecting OPPOSITE or
564 74 | CTABLES /TABLE qn1 /CLABELS COLLABELS=**.
567 ctables.sps:75.29-75.30: error: CTABLES: Syntax error expecting AUTO, ROWLABELS,
569 75 | CTABLES /TABLE qn1 /CLABELS **.
572 ctables.sps:76.30-76.31: error: CTABLES: Syntax error expecting CILEVEL.
573 76 | CTABLES /TABLE qn1 /CRITERIA **.
576 ctables.sps:77.38-77.40: error: CTABLES: Syntax error expecting number in
577 @<:@0,100@:}@ for CILEVEL.
578 77 | CTABLES /TABLE qn1 /CRITERIA CILEVEL=101.
581 ctables.sps:78.28-78.29: error: CTABLES: Syntax error expecting CAPTION, CORNER,
583 78 | CTABLES /TABLE qn1 /TITLES **.
586 ctables.sps:79.34-79.35: error: CTABLES: Syntax error expecting CHISQUARE.
587 79 | CTABLES /TABLE qn1 /SIGTEST TYPE=**.
590 ctables.sps:80.35-80.36: error: CTABLES: Syntax error expecting number in @<:@0,1@:}@
592 80 | CTABLES /TABLE qn1 /SIGTEST ALPHA=**.
595 ctables.sps:81.43-81.44: error: CTABLES: Syntax error expecting YES or NO.
596 81 | CTABLES /TABLE qn1 /SIGTEST INCLUDEMRSETS=**.
599 ctables.sps:82.40-82.41: error: CTABLES: Syntax error expecting ALLVISIBLE or
601 82 | CTABLES /TABLE qn1 /SIGTEST CATEGORIES=**.
604 ctables.sps:83.29-83.30: error: CTABLES: Syntax error expecting TYPE, ALPHA,
605 INCLUDEMRSETS, or CATEGORIES.
606 83 | CTABLES /TABLE qn1 /SIGTEST **.
609 ctables.sps:84.38-84.39: error: CTABLES: Syntax error expecting PROP or MEAN.
610 84 | CTABLES /TABLE qn1 /COMPARETEST TYPE=**.
613 ctables.sps:85.39-85.40: error: CTABLES: Syntax error expecting number in (0,1)
615 85 | CTABLES /TABLE qn1 /COMPARETEST ALPHA=**.
618 ctables.sps:86.39: error: CTABLES: Syntax error expecting number in (0,1) for
620 86 | CTABLES /TABLE qn1 /COMPARETEST ALPHA=0,5.
623 ctables.sps:87.40-87.41: error: CTABLES: Syntax error expecting BONFERRONI, BH,
625 87 | CTABLES /TABLE qn1 /COMPARETEST ADJUST=**.
628 ctables.sps:88.47-88.48: error: CTABLES: Syntax error expecting YES or NO.
629 88 | CTABLES /TABLE qn1 /COMPARETEST INCLUDEMRSETS=**.
632 ctables.sps:89.47-89.48: error: CTABLES: Syntax error expecting ALLCATS or
634 89 | CTABLES /TABLE qn1 /COMPARETEST MEANSVARIANCE=**.
637 ctables.sps:90.44-90.45: error: CTABLES: Syntax error expecting ALLVISIBLE or
639 90 | CTABLES /TABLE qn1 /COMPARETEST CATEGORIES=**.
642 ctables.sps:91.39-91.40: error: CTABLES: Syntax error expecting YES or NO.
643 91 | CTABLES /TABLE qn1 /COMPARETEST MERGE=**.
646 ctables.sps:92.39-92.40: error: CTABLES: Syntax error expecting APA or SIMPLE.
647 92 | CTABLES /TABLE qn1 /COMPARETEST STYLE=**.
650 ctables.sps:93.41-93.42: error: CTABLES: Syntax error expecting YES or NO.
651 93 | CTABLES /TABLE qn1 /COMPARETEST SHOWSIG=**.
654 ctables.sps:94.33-94.34: error: CTABLES: Syntax error expecting one of the
655 following: TYPE, ALPHA, ADJUST, INCLUDEMRSETS, MEANSVARIANCE, CATEGORIES, MERGE,
657 94 | CTABLES /TABLE qn1 /COMPARETEST **.
660 ctables.sps:95.21-95.26: error: CTABLES: Syntax error expecting TABLE, SLABELS,
661 CLABELS, CRITERIA, CATEGORIES, TITLES, SIGTEST, or COMPARETEST.
662 95 | CTABLES /TABLE qn1 /FORMAT.
665 ctables.sps:95.21-95.26: note: CTABLES: This subcommand must appear before
667 95 | CTABLES /TABLE qn1 /FORMAT.
670 ctables.sps:96: error: CTABLES: ROWLABELS and COLLABELS may not both be
673 ctables.sps:96.21-96.46: note: CTABLES: This is the first specification.
674 96 | CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CLABELS
676 | ^~~~~~~~~~~~~~~~~~~~~~~~~~
678 ctables.sps:96.49-96.74: note: CTABLES: This is the second specification.
679 96 | CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CLABELS
682 ^~~~~~~~~~~~~~~~~~~~~~~~~~
684 ctables.sps:97.16-97.26: error: CTABLES: Cannot nest scale variables.
685 97 | CTABLES /TABLE qn20 > qnd1.
688 ctables.sps:97.16-97.19: note: CTABLES: This is an outer scale variable.
689 97 | CTABLES /TABLE qn20 > qnd1.
692 ctables.sps:97.23-97.26: note: CTABLES: This is an inner scale variable.
693 97 | CTABLES /TABLE qn20 > qnd1.
696 ctables.sps:98.16-98.35: error: CTABLES: Summaries may only be requested for
697 categorical variables at the innermost nesting level.
698 98 | CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
699 | ^~~~~~~~~~~~~~~~~~~~
701 ctables.sps:98.16-98.18: note: CTABLES: This outer categorical variable has a
703 98 | CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
706 ctables.sps:100.52-100.56: error: CTABLES: Failed to parse category
707 specification as format DATETIME: Day (123) must be between 1 and 31..
708 100 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=datetime ['123'].
713 AT_SETUP([CTABLES parsing - more negative])
714 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
715 AT_DATA([ctables.sps],
717 CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
718 CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
719 CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
722 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['string'].
723 CTABLES /TABLE string /CATEGORIES VARIABLES=string [1].
725 CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1).
727 CTABLES /TABLE qnd1 /CLABELS ROWLABELS=OPPOSITE.
728 CTABLES /TABLE qn1 + string /CLABELS ROWLABELS=OPPOSITE.
729 CTABLES /TABLE qn1 + qnsa1 /CLABELS ROWLABELS=OPPOSITE.
730 CTABLES /TABLE qn105ba + qn105bb /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn105ba [1,2,3].
732 CTABLES /PCOMPUTE &x=EXPR(1**2**3).
733 CTABLES /PCOMPUTE &x=EXPR([**]).
734 CTABLES /PCOMPUTE &x=EXPR(**).
738 CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
740 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=PTILE(qn1, 50).
742 CTABLES /TABLE $mrset.
744 CTABLES /TABLE qn113 /SIGTEST TYPE=CHISQUARE.
745 CTABLES /TABLE qn113 /COMPARETEST TYPE=PROP.
747 CTABLES /TABLE qn113 [COUNT.UCL].
749 CTABLES /TABLE qn1 /CATEGORIES **.
753 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [1],
754 [[ctables.sps:2.76-2.78: error: CTABLES: Computed category &pc references a category not included in the category list.
755 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
758 ctables.sps:2.28-2.35: note: CTABLES: This is the missing category.
759 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
762 ctables.sps:2.76-2.79: note: CTABLES: To fix the problem, add subtotals to the list of categories here.
763 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
766 ctables.sps:3.73-3.75: error: CTABLES: Computed category &pc references a category not included in the category list.
767 3 | CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
770 ctables.sps:3.28-3.32: note: CTABLES: This is the missing category.
771 3 | CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
774 ctables.sps:3: note: CTABLES: To fix the problem, add TOTAL=YES to the variable's CATEGORIES specification.
776 ctables.sps:4.76-4.99: error: CTABLES: These categories include 2 instances of SUBTOTAL or HSUBTOTAL, so references from
777 computed categories must refer to subtotals by position, e.g. SUBTOTAL[1].
778 4 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
779 | ^~~~~~~~~~~~~~~~~~~~~~~~
781 ctables.sps:4.28-4.35: note: CTABLES: This is the reference that lacks a position.
782 4 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
785 ctables.sps:7.47-7.54: error: CTABLES: This category specification may be applied only to string variables, but this
786 subcommand tries to apply it to numeric variable QN1.
787 7 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['string'].
790 ctables.sps:8.53: error: CTABLES: This category specification may be applied only to numeric variables, but this
791 subcommand tries to apply it to string variable string.
792 8 | CTABLES /TABLE string /CATEGORIES VARIABLES=string [1].
795 ctables.sps:10.74-10.86: error: CTABLES: Data-dependent sorting is not implemented.
796 10 | CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1).
799 ctables.sps:12: error: CTABLES: To move category labels from one axis to another, the variables whose labels are to be
800 moved must be categorical, but qnd1 is scale.
802 ctables.sps:12.22-12.47: note: CTABLES: This syntax moves category labels to another axis.
803 12 | CTABLES /TABLE qnd1 /CLABELS ROWLABELS=OPPOSITE.
804 | ^~~~~~~~~~~~~~~~~~~~~~~~~~
806 ctables.sps:13: error: CTABLES: To move category labels from one axis to another, the variables whose labels are to be
807 moved must all have the same width, but QN1 has width 0 and string has width 8.
809 ctables.sps:13.30-13.55: note: CTABLES: This syntax moves category labels to another axis.
810 13 | CTABLES /TABLE qn1 + string /CLABELS ROWLABELS=OPPOSITE.
811 | ^~~~~~~~~~~~~~~~~~~~~~~~~~
813 ctables.sps:14: error: CTABLES: To move category labels from one axis to another, the variables whose labels are to be
814 moved must all have the same value labels, but QN1 and QNSA1 have different value labels.
816 ctables.sps:14.29-14.54: note: CTABLES: This syntax moves category labels to another axis.
817 14 | CTABLES /TABLE qn1 + qnsa1 /CLABELS ROWLABELS=OPPOSITE.
818 | ^~~~~~~~~~~~~~~~~~~~~~~~~~
820 ctables.sps:15: error: CTABLES: To move category labels from one axis to another, the variables whose labels are to be
821 moved must all have the same category specifications, but QN105BA and QN105BB have different category specifications.
823 ctables.sps:15.35-15.60: note: CTABLES: This syntax moves category labels to another axis.
824 15 | CTABLES /TABLE qn105ba + qn105bb /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn105ba [1,2,3].
825 | ^~~~~~~~~~~~~~~~~~~~~~~~~~
827 ctables.sps:17.27-17.33: warning: CTABLES: The exponentiation operator (`**') is left-associative: `a**b**c' equals
828 `(a**b)**c', not `a**(b**c)'. To disable this warning, insert parentheses.
829 17 | CTABLES /PCOMPUTE &x=EXPR(1**2**3).
832 ctables.sps:17.35: error: CTABLES: Syntax error expecting `/'.
833 17 | CTABLES /PCOMPUTE &x=EXPR(1**2**3).
836 ctables.sps:18.28-18.29: error: CTABLES: Syntax error expecting number or string or range.
837 18 | CTABLES /PCOMPUTE &x=EXPR([**]).
840 ctables.sps:19.27-19.28: error: CTABLES: Syntax error in postcompute expression.
841 19 | CTABLES /PCOMPUTE &x=EXPR(**).
844 ctables.sps:21.15: error: CTABLES: At least one variable must be specified.
848 ctables.sps:23: error: CTABLES: Summaries may appear only on one axis.
850 ctables.sps:23.50-23.54: note: CTABLES: This variable on the layers axis has a summary.
851 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
854 ctables.sps:23.16-23.20: note: CTABLES: This variable on the rows axis has a summary.
855 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
858 ctables.sps:23.33-23.37: note: CTABLES: This variable on the columns axis has a summary.
859 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
862 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
863 explicitly specify one.
864 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
867 ctables.sps:25.46-25.63: error: CTABLES: Data-dependent sorting is not implemented.
868 25 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=PTILE(qn1, 50).
871 ctables.sps:27.16-27.21: error: CTABLES: Multiple response set support not implemented.
872 27 | CTABLES /TABLE $mrset.
875 ctables.sps:29.23-29.44: error: CTABLES: Support for SIGTEST not yet implemented.
876 29 | CTABLES /TABLE qn113 /SIGTEST TYPE=CHISQUARE.
877 | ^~~~~~~~~~~~~~~~~~~~~~
879 ctables.sps:30.23-30.43: error: CTABLES: Support for COMPARETEST not yet implemented.
880 30 | CTABLES /TABLE qn113 /COMPARETEST TYPE=PROP.
881 | ^~~~~~~~~~~~~~~~~~~~~
883 ctables.sps:32.23-32.31: error: CTABLES: Support for LCL, UCL, and SE summary functions is not yet implemented.
884 32 | CTABLES /TABLE qn113 [COUNT.UCL].
887 ctables.sps:34.32-34.33: error: CTABLES: Syntax error expecting VARIABLES.
888 34 | CTABLES /TABLE qn1 /CATEGORIES **.
891 ctables.sps:36.10-36.15: error: CTABLES: Syntax error expecting one of the following: FORMAT, VLABELS, MRSETS, SMISSING,
892 PCOMPUTE, PPROPERTIES, WEIGHT, HIDESMALLCOUNTS, TABLE.
893 36 | CTABLES /TITLES.
896 ctables.sps:36.10-36.15: note: CTABLES: TABLE must appear before this subcommand.
897 36 | CTABLES /TITLES.
902 AT_SETUP([CTABLES one categorical variable])
903 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
904 AT_DATA([ctables.sps],
907 CTABLES /TABLE BY qn1.
908 CTABLES /TABLE BY BY qn1.
910 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
912 ╭────────────────────────────────────────────────────────────────────────┬─────╮
914 ├────────────────────────────────────────────────────────────────────────┼─────┤
915 │ 1. How often do you usually drive a car or other Every day │ 4667│
916 │motor vehicle? Several days a week │ 1274│
917 │ Once a week or less │ 361│
918 │ Only certain times a │ 130│
921 ╰────────────────────────────────────────────────────────────────────────┴─────╯
924 ╭──────────────────────────────────────────────────────────────────────────────╮
925 │ 1. How often do you usually drive a car or other motor vehicle? │
926 ├─────────┬──────────────────┬──────────────────┬────────────────────────┬─────┤
927 │ │ Several days a │ Once a week or │ Only certain times a │ │
928 │Every day│ week │ less │ year │Never│
929 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
930 │ Count │ Count │ Count │ Count │Count│
931 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
932 │ 4667│ 1274│ 361│ 130│ 540│
933 ╰─────────┴──────────────────┴──────────────────┴────────────────────────┴─────╯
945 AT_SETUP([CTABLES one string variable])
946 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
947 AT_DATA([ctables.sps],
950 MISSING VALUES licensed('DontKnow', 'Refused').
951 RECODE qnd7a(1='Yes')(2='No')(3='DontKnow')(4='Refused') INTO licensed.
952 CTABLES /TABLE licensed.
953 CTABLES /TABLE licensed [COUNT, TOTALS[COUNT, VALIDN]] /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
954 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['Yes', 'No'] TOTAL=YES.
955 * Notice that the string matching is case-sensitive.
956 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['Yes', 'no'] TOTAL=YES.
957 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['No' THRU 'yes'] TOTAL=YES.
959 /PCOMPUTE ¬yes=EXPR(['No']+['DontKnow']+['Refused'])
960 /PPROPERTIES ¬yes LABEL='Not Yes' HIDESOURCECATS=YES
962 /CATEGORIES VARIABLES=licensed ['Yes', ¬yes, 'No', 'DontKnow', 'Refused'].
964 /PCOMPUTE ¬yes=EXPR(['DontKnow' THRU 'No'] + ['Refused'])
965 /PPROPERTIES ¬yes LABEL='Not Yes' HIDESOURCECATS=YES
967 /CATEGORIES VARIABLES=licensed ['Yes', ¬yes, 'DontKnow' THRU 'No', 'Refused'].
969 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
979 ╭─────────────────┬─────┬───────╮
981 ├─────────────────┼─────┼───────┤
982 │licensed DontKnow│ 4│ │
986 │ Total │ 6999│ 6951│
987 ╰─────────────────┴─────┴───────╯
990 ╭──────────────┬─────╮
992 ├──────────────┼─────┤
993 │licensed Yes │ 6379│
996 ╰──────────────┴─────╯
999 ╭──────────────┬─────╮
1001 ├──────────────┼─────┤
1002 │licensed Yes │ 6379│
1005 ╰──────────────┴─────╯
1008 ╭────────────────┬─────╮
1010 ├────────────────┼─────┤
1015 ╰────────────────┴─────╯
1018 ╭────────────────┬─────╮
1020 ├────────────────┼─────┤
1021 │licensed Yes │ 6379│
1023 ╰────────────────┴─────╯
1026 ╭────────────────┬─────╮
1028 ├────────────────┼─────┤
1029 │licensed Yes │ 6379│
1031 ╰────────────────┴─────╯
1035 AT_SETUP([CTABLES one scale variable])
1036 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1037 AT_DATA([ctables.sps],
1040 CTABLES /TABLE qnd1[COUNT, VALIDN, TOTALN, MEAN, STDDEV, MINIMUM, MAXIMUM].
1041 CTABLES /TABLE BY qnd1.
1042 CTABLES /TABLE BY BY qnd1.
1044 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1045 Descriptive Statistics
1046 ╭──────────────────────────┬────┬─────┬───────┬───────┬───────────╮
1047 │ │ N │ Mean│Std Dev│Minimum│ Maximum │
1048 ├──────────────────────────┼────┼─────┼───────┼───────┼───────────┤
1049 │D1. AGE: What is your age?│6930│48.26│ 19.01│ 16│86 or older│
1050 │Valid N (listwise) │6999│ │ │ │ │
1051 │Missing N (listwise) │ 69│ │ │ │ │
1052 ╰──────────────────────────┴────┴─────┴───────┴───────┴───────────╯
1055 ╭──────────────────────┬─────┬───────┬───────┬────┬────────────┬───────┬───────╮
1056 │ │ │ │ │ │ Std │ │ │
1057 │ │Count│Valid N│Total N│Mean│ Deviation │Minimum│Maximum│
1058 ├──────────────────────┼─────┼───────┼───────┼────┼────────────┼───────┼───────┤
1059 │D1. AGE: What is your │ 6999│ 6930│ 6999│ 48│ 19│ 16│ 86│
1060 │age? │ │ │ │ │ │ │ │
1061 ╰──────────────────────┴─────┴───────┴───────┴────┴────────────┴───────┴───────╯
1064 ╭──────────────────────────╮
1065 │D1. AGE: What is your age?│
1066 ├──────────────────────────┤
1068 ├──────────────────────────┤
1070 ╰──────────────────────────╯
1073 D1. AGE: What is your age?
1082 AT_SETUP([CTABLES simple stacking])
1083 AT_KEYWORDS([stack stacked])
1084 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1085 AT_DATA([ctables.sps],
1087 CTABLES /TABLE qn105ba + qn105bb + qn105bc + qn105bd BY qns3a [COLPCT PCT8.0].
1089 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1091 ╭───────────────────────────────────────────────────────────────┬──────────────╮
1098 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
1099 │105b. How likely is it that drivers who have had Almost │ 10%│ 11%│
1100 │too much to drink to drive safely will A. Get certain │ │ │
1101 │stopped by the police? Very likely │ 21%│ 22%│
1102 │ Somewhat │ 38%│ 42%│
1104 │ Somewhat │ 21%│ 18%│
1108 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
1109 │105b. How likely is it that drivers who have had Almost │ 14%│ 18%│
1110 │too much to drink to drive safely will B. Have an certain │ │ │
1111 │accident? Very likely │ 36%│ 45%│
1112 │ Somewhat │ 39%│ 32%│
1114 │ Somewhat │ 9%│ 4%│
1118 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
1119 │105b. How likely is it that drivers who have had Almost │ 18%│ 16%│
1120 │too much to drink to drive safely will C. Be certain │ │ │
1121 │convicted for drunk driving? Very likely │ 32%│ 28%│
1122 │ Somewhat │ 27%│ 32%│
1124 │ Somewhat │ 15%│ 15%│
1128 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
1129 │105b. How likely is it that drivers who have had Almost │ 16%│ 16%│
1130 │too much to drink to drive safely will D. Be certain │ │ │
1131 │arrested for drunk driving? Very likely │ 26%│ 27%│
1132 │ Somewhat │ 32%│ 35%│
1134 │ Somewhat │ 17%│ 15%│
1138 ╰───────────────────────────────────────────────────────────────┴──────┴───────╯
1142 AT_SETUP([CTABLES show or hide empty categories])
1143 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1144 AT_DATA([ctables.sps],
1146 IF (qn105ba = 2) qn105ba = 1.
1147 IF (qns3a = 1) qns3a = 2.
1148 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0].
1149 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
1150 /CATEGORIES VAR=qn105ba EMPTY=EXCLUDE.
1151 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
1152 /CATEGORIES VAR=qns3a EMPTY=EXCLUDE.
1153 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
1154 /CATEGORIES VAR=ALL EMPTY=EXCLUDE.
1156 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1158 ╭──────────────────────────────────────────────────────────────┬───────────────╮
1165 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
1166 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
1167 │too much to drink to drive safely will A. Get certain │ │ │
1168 │stopped by the police? Very likely│ .│ 0%│
1169 │ Somewhat │ .│ 40%│
1171 │ Somewhat │ .│ 19%│
1175 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
1178 ╭──────────────────────────────────────────────────────────────┬───────────────╮
1185 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
1186 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
1187 │too much to drink to drive safely will A. Get certain │ │ │
1188 │stopped by the police? Somewhat │ .│ 40%│
1190 │ Somewhat │ .│ 19%│
1194 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
1197 ╭────────────────────────────────────────────────────────────────────┬─────────╮
1204 ├────────────────────────────────────────────────────────────────────┼─────────┤
1205 │105b. How likely is it that drivers who have had too Almost │ 32%│
1206 │much to drink to drive safely will A. Get stopped by certain │ │
1207 │the police? Very likely │ 0%│
1214 ╰────────────────────────────────────────────────────────────────────┴─────────╯
1217 ╭────────────────────────────────────────────────────────────────────┬─────────╮
1224 ├────────────────────────────────────────────────────────────────────┼─────────┤
1225 │105b. How likely is it that drivers who have had too Almost │ 32%│
1226 │much to drink to drive safely will A. Get stopped by certain │ │
1227 │the police? Somewhat │ 40%│
1233 ╰────────────────────────────────────────────────────────────────────┴─────────╯
1237 AT_SETUP([CTABLES sorting categories])
1238 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1239 AT_DATA([ctables.sps],
1241 IF (QND5A=6) QND5A=-1.
1242 IF (QND5A=5) QND5A=-2.
1243 CTABLES /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=VALUE ORDER=A
1244 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=VALUE ORDER=D
1245 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=LABEL ORDER=A
1246 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=LABEL ORDER=D.
1248 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1250 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1252 ├────────────────────────────────────────────────────────────────────────┼─────┤
1253 │D5a. What would you say is your primary ethnic -2.00 │ 52│
1254 │background? -1.00 │ 78│
1258 │ South American │ 34│
1259 │ Central American │ 0│
1260 │ Puerto Rican, OR │ 0│
1261 │ Something else │ 68│
1262 │ Multiple - cannot choose│ 7│
1264 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1267 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1269 ├────────────────────────────────────────────────────────────────────────┼─────┤
1270 │D5a. What would you say is your primary ethnic Multiple - cannot choose│ 7│
1271 │background? one │ │
1272 │ Something else │ 68│
1273 │ Puerto Rican, OR │ 0│
1274 │ Central American │ 0│
1275 │ South American │ 34│
1281 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1284 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1286 ├────────────────────────────────────────────────────────────────────────┼─────┤
1287 │D5a. What would you say is your primary ethnic Central American │ 0│
1288 │background? Cuban │ 20│
1290 │ Multiple - cannot choose│ 7│
1292 │ Puerto Rican, OR │ 0│
1293 │ Something else │ 68│
1294 │ South American │ 34│
1298 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1301 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1303 ├────────────────────────────────────────────────────────────────────────┼─────┤
1304 │D5a. What would you say is your primary ethnic Spanish │ 48│
1305 │background? South American │ 34│
1306 │ Something else │ 68│
1307 │ Puerto Rican, OR │ 0│
1308 │ Multiple - cannot choose│ 7│
1312 │ Central American │ 0│
1315 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1319 AT_SETUP([CTABLES simple nesting])
1320 AT_KEYWORDS([nest nested])
1321 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1322 AT_DATA([ctables.sps],
1324 CTABLES /TABLE (qn105ba + qn105bb + qn105bc + qn105bd) > qns3a [COUNT, TABLEPCT PCT8.0]
1325 /CATEGORIES VARIABLES=qns3a TOTAL=YES.
1326 CTABLES /TABLE qns3a > (qn105ba + qn105bb + qn105bc + qn105bd) [TABLEPCT PCT8.0]
1327 /CATEGORIES VARIABLES=qns3a TOTAL=YES
1328 /CLABELS ROW=OPPOSITE.
1330 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1332 ╭─────────────────────────────────────────────────────────────────┬─────┬──────╮
1335 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1336 │105b. How likely is it that drivers Almost S3a. Male │ 297│ 4%│
1337 │who have had too much to drink to certain GENDER: Female│ 403│ 6%│
1338 │drive safely will A. Get stopped by Total │ 700│ 10%│
1339 │the police? ╶──────────────────────────┼─────┼──────┤
1340 │ Very S3a. Male │ 660│ 10%│
1341 │ likely GENDER: Female│ 842│ 12%│
1342 │ Total │ 1502│ 22%│
1343 │ ╶──────────────────────────┼─────┼──────┤
1344 │ Somewhat S3a. Male │ 1174│ 17%│
1345 │ likely GENDER: Female│ 1589│ 23%│
1346 │ Total │ 2763│ 40%│
1347 │ ╶──────────────────────────┼─────┼──────┤
1348 │ Somewhat S3a. Male │ 640│ 9%│
1349 │ unlikely GENDER: Female│ 667│ 10%│
1350 │ Total │ 1307│ 19%│
1351 │ ╶──────────────────────────┼─────┼──────┤
1352 │ Very S3a. Male │ 311│ 5%│
1353 │ unlikely GENDER: Female│ 298│ 4%│
1355 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1356 │105b. How likely is it that drivers Almost S3a. Male │ 429│ 6%│
1357 │who have had too much to drink to certain GENDER: Female│ 671│ 10%│
1358 │drive safely will B. Have an accident? Total │ 1100│ 16%│
1359 │ ╶──────────────────────────┼─────┼──────┤
1360 │ Very S3a. Male │ 1104│ 16%│
1361 │ likely GENDER: Female│ 1715│ 25%│
1362 │ Total │ 2819│ 41%│
1363 │ ╶──────────────────────────┼─────┼──────┤
1364 │ Somewhat S3a. Male │ 1203│ 17%│
1365 │ likely GENDER: Female│ 1214│ 18%│
1366 │ Total │ 2417│ 35%│
1367 │ ╶──────────────────────────┼─────┼──────┤
1368 │ Somewhat S3a. Male │ 262│ 4%│
1369 │ unlikely GENDER: Female│ 168│ 2%│
1371 │ ╶──────────────────────────┼─────┼──────┤
1372 │ Very S3a. Male │ 81│ 1%│
1373 │ unlikely GENDER: Female│ 59│ 1%│
1375 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1376 │105b. How likely is it that drivers Almost S3a. Male │ 539│ 8%│
1377 │who have had too much to drink to certain GENDER: Female│ 610│ 9%│
1378 │drive safely will C. Be convicted for Total │ 1149│ 17%│
1379 │drunk driving? ╶──────────────────────────┼─────┼──────┤
1380 │ Very S3a. Male │ 988│ 14%│
1381 │ likely GENDER: Female│ 1049│ 15%│
1382 │ Total │ 2037│ 30%│
1383 │ ╶──────────────────────────┼─────┼──────┤
1384 │ Somewhat S3a. Male │ 822│ 12%│
1385 │ likely GENDER: Female│ 1210│ 18%│
1386 │ Total │ 2032│ 30%│
1387 │ ╶──────────────────────────┼─────┼──────┤
1388 │ Somewhat S3a. Male │ 446│ 7%│
1389 │ unlikely GENDER: Female│ 548│ 8%│
1391 │ ╶──────────────────────────┼─────┼──────┤
1392 │ Very S3a. Male │ 268│ 4%│
1393 │ unlikely GENDER: Female│ 354│ 5%│
1395 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1396 │105b. How likely is it that drivers Almost S3a. Male │ 498│ 7%│
1397 │who have had too much to drink to certain GENDER: Female│ 603│ 9%│
1398 │drive safely will D. Be arrested for Total │ 1101│ 16%│
1399 │drunk driving? ╶──────────────────────────┼─────┼──────┤
1400 │ Very S3a. Male │ 805│ 12%│
1401 │ likely GENDER: Female│ 1029│ 15%│
1402 │ Total │ 1834│ 27%│
1403 │ ╶──────────────────────────┼─────┼──────┤
1404 │ Somewhat S3a. Male │ 975│ 14%│
1405 │ likely GENDER: Female│ 1332│ 19%│
1406 │ Total │ 2307│ 34%│
1407 │ ╶──────────────────────────┼─────┼──────┤
1408 │ Somewhat S3a. Male │ 535│ 8%│
1409 │ unlikely GENDER: Female│ 560│ 8%│
1410 │ Total │ 1095│ 16%│
1411 │ ╶──────────────────────────┼─────┼──────┤
1412 │ Very S3a. Male │ 270│ 4%│
1413 │ unlikely GENDER: Female│ 279│ 4%│
1415 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
1418 ╭─────────────────────────────────┬────────┬──────┬─────────┬─────────┬────────╮
1419 │ │ Almost │ Very │ Somewhat│ Somewhat│ Very │
1420 │ │ certain│likely│ likely │ unlikely│unlikely│
1421 │ ├────────┼──────┼─────────┼─────────┼────────┤
1423 │ │ Table %│ % │ Table % │ Table % │ Table %│
1424 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1425 │S3a. Male 105b. How likely │ 4%│ 10%│ 17%│ 9%│ 5%│
1426 │GENDER: is it that drivers│ │ │ │ │ │
1427 │ who have had too │ │ │ │ │ │
1428 │ much to drink to │ │ │ │ │ │
1429 │ drive safely will │ │ │ │ │ │
1430 │ A. Get stopped by │ │ │ │ │ │
1431 │ the police? │ │ │ │ │ │
1432 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1433 │ Female 105b. How likely │ 6%│ 12%│ 23%│ 10%│ 4%│
1434 │ is it that drivers│ │ │ │ │ │
1435 │ who have had too │ │ │ │ │ │
1436 │ much to drink to │ │ │ │ │ │
1437 │ drive safely will │ │ │ │ │ │
1438 │ A. Get stopped by │ │ │ │ │ │
1439 │ the police? │ │ │ │ │ │
1440 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1441 │ Total 105b. How likely │ 10%│ 22%│ 40%│ 19%│ 9%│
1442 │ is it that drivers│ │ │ │ │ │
1443 │ who have had too │ │ │ │ │ │
1444 │ much to drink to │ │ │ │ │ │
1445 │ drive safely will │ │ │ │ │ │
1446 │ A. Get stopped by │ │ │ │ │ │
1447 │ the police? │ │ │ │ │ │
1448 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1449 │S3a. Male 105b. How likely │ 6%│ 16%│ 17%│ 4%│ 1%│
1450 │GENDER: is it that drivers│ │ │ │ │ │
1451 │ who have had too │ │ │ │ │ │
1452 │ much to drink to │ │ │ │ │ │
1453 │ drive safely will │ │ │ │ │ │
1454 │ B. Have an │ │ │ │ │ │
1455 │ accident? │ │ │ │ │ │
1456 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1457 │ Female 105b. How likely │ 10%│ 25%│ 18%│ 2%│ 1%│
1458 │ is it that drivers│ │ │ │ │ │
1459 │ who have had too │ │ │ │ │ │
1460 │ much to drink to │ │ │ │ │ │
1461 │ drive safely will │ │ │ │ │ │
1462 │ B. Have an │ │ │ │ │ │
1463 │ accident? │ │ │ │ │ │
1464 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1465 │ Total 105b. How likely │ 16%│ 41%│ 35%│ 6%│ 2%│
1466 │ is it that drivers│ │ │ │ │ │
1467 │ who have had too │ │ │ │ │ │
1468 │ much to drink to │ │ │ │ │ │
1469 │ drive safely will │ │ │ │ │ │
1470 │ B. Have an │ │ │ │ │ │
1471 │ accident? │ │ │ │ │ │
1472 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1473 │S3a. Male 105b. How likely │ 8%│ 14%│ 12%│ 7%│ 4%│
1474 │GENDER: is it that drivers│ │ │ │ │ │
1475 │ who have had too │ │ │ │ │ │
1476 │ much to drink to │ │ │ │ │ │
1477 │ drive safely will │ │ │ │ │ │
1478 │ C. Be convicted │ │ │ │ │ │
1479 │ for drunk driving?│ │ │ │ │ │
1480 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1481 │ Female 105b. How likely │ 9%│ 15%│ 18%│ 8%│ 5%│
1482 │ is it that drivers│ │ │ │ │ │
1483 │ who have had too │ │ │ │ │ │
1484 │ much to drink to │ │ │ │ │ │
1485 │ drive safely will │ │ │ │ │ │
1486 │ C. Be convicted │ │ │ │ │ │
1487 │ for drunk driving?│ │ │ │ │ │
1488 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1489 │ Total 105b. How likely │ 17%│ 30%│ 30%│ 15%│ 9%│
1490 │ is it that drivers│ │ │ │ │ │
1491 │ who have had too │ │ │ │ │ │
1492 │ much to drink to │ │ │ │ │ │
1493 │ drive safely will │ │ │ │ │ │
1494 │ C. Be convicted │ │ │ │ │ │
1495 │ for drunk driving?│ │ │ │ │ │
1496 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1497 │S3a. Male 105b. How likely │ 7%│ 12%│ 14%│ 8%│ 4%│
1498 │GENDER: is it that drivers│ │ │ │ │ │
1499 │ who have had too │ │ │ │ │ │
1500 │ much to drink to │ │ │ │ │ │
1501 │ drive safely will │ │ │ │ │ │
1502 │ D. Be arrested for│ │ │ │ │ │
1503 │ drunk driving? │ │ │ │ │ │
1504 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1505 │ Female 105b. How likely │ 9%│ 15%│ 19%│ 8%│ 4%│
1506 │ is it that drivers│ │ │ │ │ │
1507 │ who have had too │ │ │ │ │ │
1508 │ much to drink to │ │ │ │ │ │
1509 │ drive safely will │ │ │ │ │ │
1510 │ D. Be arrested for│ │ │ │ │ │
1511 │ drunk driving? │ │ │ │ │ │
1512 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1513 │ Total 105b. How likely │ 16%│ 27%│ 34%│ 16%│ 8%│
1514 │ is it that drivers│ │ │ │ │ │
1515 │ who have had too │ │ │ │ │ │
1516 │ much to drink to │ │ │ │ │ │
1517 │ drive safely will │ │ │ │ │ │
1518 │ D. Be arrested for│ │ │ │ │ │
1519 │ drunk driving? │ │ │ │ │ │
1520 ╰─────────────────────────────────┴────────┴──────┴─────────┴─────────┴────────╯
1524 AT_SETUP([CTABLES nesting and scale variables])
1525 AT_KEYWORDS([nest nested])
1526 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1527 AT_DATA([ctables.sps],
1529 CTABLES /TABLE=qnd1 > qn1 BY qns3a.
1530 CTABLES /TABLE=qnd1 [MINIMUM, MAXIMUM, MEAN] > qns3a > (qn26 + qn27).
1531 CTABLES /TABLE=qnsa1 > qn105ba [COLPCT] BY qns1
1532 /CATEGORIES VAR=qnsa1 EMPTY=EXCLUDE.
1533 CTABLES /TABLE=AgeGroup > qn20 [MEAN F8.1, STDDEV F8.1].
1535 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1537 ╭─────────────────────────────────────────────────────────────────┬────────────╮
1543 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1544 │D1. AGE: What 1. How often do you usually drive Every day │ 46│ 46│
1545 │is your age? a car or other motor vehicle? Several days a │ 51│ 59│
1547 │ Once a week or │ 44│ 54│
1549 │ Only certain │ 34│ 41│
1550 │ times a year │ │ │
1552 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
1555 ╭─────────────────────────────────────────────────────────┬───────┬───────┬────╮
1556 │ │Minimum│Maximum│Mean│
1557 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
1558 │D1. AGE: S3a. Male 26. During the last 12 Yes│ 16│ 86│ 42│
1559 │What is GENDER: months, has there been a │ │ │ │
1560 │your time when you felt you │ │ │ │
1561 │age? should cut down on your No │ 16│ 86│ 46│
1563 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
1564 │ Female 26. During the last 12 Yes│ 16│ 86│ 43│
1565 │ months, has there been a │ │ │ │
1566 │ time when you felt you │ │ │ │
1567 │ should cut down on your No │ 16│ 86│ 48│
1569 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
1570 │D1. AGE: S3a. Male 27. During the last 12 Yes│ 16│ 86│ 38│
1571 │What is GENDER: months, has there been a │ │ │ │
1572 │your time when people criticized No │ 16│ 86│ 46│
1573 │age? your drinking? │ │ │ │
1574 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
1575 │ Female 27. During the last 12 Yes│ 17│ 69│ 37│
1576 │ months, has there been a │ │ │ │
1577 │ time when people criticized No │ 16│ 86│ 48│
1578 │ your drinking? │ │ │ │
1579 ╰─────────────────────────────────────────────────────────┴───────┴───────┴────╯
1582 ╭─────────────────────────────┬────────────────────────────────────────────────╮
1583 │ │S1. Including yourself, how many members of this│
1584 │ │ household are age 16 or older? │
1585 │ ├──────┬──────┬──────┬──────┬──────┬──────┬──────┤
1586 │ │ │ │ │ │ │ │ 6 or │
1587 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
1588 │ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
1589 │ │Column│Column│Column│Column│Column│Column│Column│
1590 │ │ % │ % │ % │ % │ % │ % │ % │
1591 ├─────────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
1592 │Sa1. RDD 105b. Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
1593 │SAMPLE How certain │ │ │ │ │ │ │ │
1594 │SOURCE: likely │ │ │ │ │ │ │ │
1595 │ is it Very │ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
1596 │ that likely │ │ │ │ │ │ │ │
1597 │ drivers │ │ │ │ │ │ │ │
1598 │ who have │ │ │ │ │ │ │ │
1599 │ had too Somewhat│ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
1600 │ much to likely │ │ │ │ │ │ │ │
1601 │ drink to │ │ │ │ │ │ │ │
1602 │ drive │ │ │ │ │ │ │ │
1603 │ safely Somewhat│ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
1604 │ will A. unlikely│ │ │ │ │ │ │ │
1605 │ Get │ │ │ │ │ │ │ │
1606 │ stopped Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
1607 │ by the unlikely│ │ │ │ │ │ │ │
1608 │ police? │ │ │ │ │ │ │ │
1609 ╰─────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
1612 ╭──────────────────────────────────────────────────────────────┬────┬──────────╮
1615 ├──────────────────────────────────────────────────────────────┼────┼──────────┤
1616 │Age 16 to 25 20. On how many of the thirty days in this │ 5.2│ 6.0│
1617 │group typical month did you have one or more │ │ │
1618 │ alcoholic beverages to drink? │ │ │
1619 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1620 │ 26 to 35 20. On how many of the thirty days in this │ 4.7│ 5.9│
1621 │ typical month did you have one or more │ │ │
1622 │ alcoholic beverages to drink? │ │ │
1623 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1624 │ 36 to 45 20. On how many of the thirty days in this │ 5.5│ 6.8│
1625 │ typical month did you have one or more │ │ │
1626 │ alcoholic beverages to drink? │ │ │
1627 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1628 │ 46 to 55 20. On how many of the thirty days in this │ 5.8│ 7.7│
1629 │ typical month did you have one or more │ │ │
1630 │ alcoholic beverages to drink? │ │ │
1631 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1632 │ 56 to 65 20. On how many of the thirty days in this │ 6.3│ 8.2│
1633 │ typical month did you have one or more │ │ │
1634 │ alcoholic beverages to drink? │ │ │
1635 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1636 │ 66 or 20. On how many of the thirty days in this │ 7.1│ 9.2│
1637 │ older typical month did you have one or more │ │ │
1638 │ alcoholic beverages to drink? │ │ │
1639 ╰──────────────────────────────────────────────────────────────┴────┴──────────╯
1644 AT_SETUP([CTABLES SLABELS])
1645 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1646 AT_DATA([ctables.sps],
1648 CTABLES /TABLE qn1 [COUNT COLPCT].
1649 CTABLES /TABLE qn1 [COUNT COLPCT]
1650 /SLABELS POSITION=ROW.
1651 CTABLES /TABLE qn1 [COUNT COLPCT]
1652 /SLABELS POSITION=ROW VISIBLE=NO.
1654 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1656 ╭────────────────────────────────────────────────────────────────┬─────┬───────╮
1659 ├────────────────────────────────────────────────────────────────┼─────┼───────┤
1660 │ 1. How often do you usually drive a car or Every day │ 4667│ 66.9%│
1661 │other motor vehicle? Several days a week│ 1274│ 18.3%│
1662 │ Once a week or less│ 361│ 5.2%│
1663 │ Only certain times │ 130│ 1.9%│
1665 │ Never │ 540│ 7.7%│
1666 ╰────────────────────────────────────────────────────────────────┴─────┴───────╯
1669 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1670 │ 1. How often do you usually drive a car or Every day Count │ 4667│
1671 │other motor vehicle? Column │66.9%│
1673 │ ╶───────────────────────────┼─────┤
1674 │ Several days a week Count │ 1274│
1677 │ ╶───────────────────────────┼─────┤
1678 │ Once a week or less Count │ 361│
1681 │ ╶───────────────────────────┼─────┤
1682 │ Only certain times Count │ 130│
1683 │ a year Column │ 1.9%│
1685 │ ╶───────────────────────────┼─────┤
1686 │ Never Count │ 540│
1689 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1692 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1693 │ 1. How often do you usually drive a car or other Every day │ 4667│
1694 │motor vehicle? │66.9%│
1695 │ Several days a week │ 1274│
1697 │ Once a week or less │ 361│
1699 │ Only certain times a │ 130│
1703 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1707 AT_SETUP([CTABLES simple totals])
1708 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1709 AT_DATA([ctables.sps],
1712 /CATEGORIES VARIABLES=qn17 TOTAL=YES LABEL='Number responding'.
1713 DESCRIPTIVES qn18/STATISTICS=MEAN.
1714 CTABLES /TABLE=region > qn18 [MEAN, COUNT, VALIDN, TOTALN]
1715 /CATEGORIES VARIABLES=region TOTAL=YES LABEL='All regions'.
1717 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1719 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1721 ├────────────────────────────────────────────────────────────────────────┼─────┤
1722 │17. When you drink alcoholic beverages, which ONE of OR, something else│ 2│
1723 │the following beverages do you drink MOST OFTEN? Beer │ 1073│
1726 │ Wine coolers │ 137│
1727 │ Hard liquor or │ 888│
1729 │ Flavored malt │ 83│
1731 │ Number responding │ 4221│
1732 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1734 Descriptive Statistics
1735 ╭────────────────────────────────────────────────────────────────────┬────┬────╮
1737 ├────────────────────────────────────────────────────────────────────┼────┼────┤
1738 │18. When you drink ANSWERFROM(QN17R1), about how many │4218│4.62│
1739 │ANSWERFROM(QN17R2) do you usually drink per sitting? │ │ │
1740 │Valid N (listwise) │6999│ │
1741 │Missing N (listwise) │2781│ │
1742 ╰────────────────────────────────────────────────────────────────────┴────┴────╯
1745 ╭──────────────────────────────────────────────────────┬────┬─────┬──────┬─────╮
1746 │ │ │ │ Valid│Total│
1747 │ │Mean│Count│ N │ N │
1748 ├──────────────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1749 │Region NE 18. When you drink ANSWERFROM(QN17R1),│4.36│ 1409│ 949│ 1409│
1750 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1751 │ you usually drink per sitting? │ │ │ │ │
1752 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1753 │ MW 18. When you drink ANSWERFROM(QN17R1),│4.67│ 1654│ 1027│ 1654│
1754 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1755 │ you usually drink per sitting? │ │ │ │ │
1756 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1757 │ S 18. When you drink ANSWERFROM(QN17R1),│4.71│ 2390│ 1287│ 2390│
1758 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1759 │ you usually drink per sitting? │ │ │ │ │
1760 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1761 │ W 18. When you drink ANSWERFROM(QN17R1),│4.69│ 1546│ 955│ 1546│
1762 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1763 │ you usually drink per sitting? │ │ │ │ │
1764 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1765 │ All 18. When you drink ANSWERFROM(QN17R1),│4.62│ 6999│ 4218│ 6999│
1766 │ regions about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1767 │ you usually drink per sitting? │ │ │ │ │
1768 ╰──────────────────────────────────────────────────────┴────┴─────┴──────┴─────╯
1772 AT_SETUP([CTABLES subtotals])
1773 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1774 AT_DATA([ctables.sps],
1776 CTABLES /TABLE=qn105ba BY qns1
1777 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
1778 CTABLES /TABLE=qn105ba [COLPCT] BY qns1
1779 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL].
1780 CTABLES /TABLE=qn105ba BY qns1
1781 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL]
1782 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
1784 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1786 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
1787 │ │ S1. Including yourself, how many members of this household │
1788 │ │ are age 16 or older? │
1789 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
1790 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
1791 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1792 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1793 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1794 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
1795 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
1796 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
1797 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
1798 │ likely │ │ │ │ │ │ │ │
1799 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
1800 │ unlikely │ │ │ │ │ │ │ │
1801 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
1802 │ unlikely │ │ │ │ │ │ │ │
1803 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
1806 ╭────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────╮
1807 │ │ S1. Including yourself, how many members of this household │
1808 │ │ are age 16 or older? │
1809 │ ├────────┬────────┬────────┬────────┬───────┬────────┬────────┤
1810 │ │ │ │ │ │ │ │ 6 or │
1811 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
1812 │ ├────────┼────────┼────────┼────────┼───────┼────────┼────────┤
1813 │ │ │ │ │ │ Column│ │ │
1814 │ │Column %│Column %│Column %│Column %│ % │Column %│Column %│
1815 ├────────────────────────────────────────────────────────┼────────┼────────┼────────┼────────┼───────┼────────┼────────┤
1816 │105b. How likely is it that drivers who have Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
1817 │had too much to drink to drive safely will certain │ │ │ │ │ │ │ │
1818 │A. Get stopped by the police? Very likely│ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
1819 │ Somewhat │ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
1820 │ likely │ │ │ │ │ │ │ │
1821 │ Subtotal │ │ 72.8%│ 68.6%│ 75.0%│ 74.0%│ 81.8%│ 81.0%│
1822 │ Somewhat │ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
1823 │ unlikely │ │ │ │ │ │ │ │
1824 │ Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
1825 │ unlikely │ │ │ │ │ │ │ │
1826 │ Subtotal │ │ 27.2%│ 31.4%│ 25.0%│ 26.0%│ 18.2%│ 19.0%│
1827 ╰────────────────────────────────────────────────────────┴────────┴────────┴────────┴────────┴───────┴────────┴────────╯
1830 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
1831 │ │ S1. Including yourself, how many members of this household │
1832 │ │ are age 16 or older? │
1833 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
1834 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
1835 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1836 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1837 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1838 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
1839 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
1840 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
1841 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
1842 │ likely │ │ │ │ │ │ │ │
1843 │ Subtotal │ 1121│ 2047│ 3168│ 375│ 142│ 45│ 562│
1844 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
1845 │ unlikely │ │ │ │ │ │ │ │
1846 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
1847 │ unlikely │ │ │ │ │ │ │ │
1848 │ Subtotal │ 419│ 937│ 1356│ 125│ 50│ 10│ 185│
1849 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
1853 AT_SETUP([CTABLES PCOMPUTE])
1854 AT_KEYWORDS([postcompute])
1855 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1856 AT_DATA([ctables.sps],
1859 /PCOMPUTE &x=EXPR([3] + [4])
1860 /PCOMPUTE &y=EXPR([4] + [5])
1861 /PPROPERTIES &x LABEL='3+4' FORMAT=COUNT F8.2
1862 /PPROPERTIES &y LABEL=')LABEL[5]+)LABEL[6]'
1863 /TABLE=qn105ba [COUNT, ROWPCT] BY qns1
1864 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, &x, &y, SUBTOTAL] TOTAL=YES
1866 * Adding HIDESOURCECATS=YES for one PPROPERTIES.
1868 /PCOMPUTE &x=EXPR([3] + [4])
1869 /PCOMPUTE &y=EXPR([4] + [5])
1870 /PPROPERTIES &x LABEL='3+4' FORMAT=COUNT F8.2
1871 /PPROPERTIES &y LABEL=')LABEL[5]+)LABEL[6]' HIDESOURCECATS=YES
1872 /TABLE=qn105ba [COUNT, ROWPCT] BY qns1
1873 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, &x, &y, SUBTOTAL] TOTAL=YES
1875 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1877 ╭───────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
1878 │ │ S1. Including yourself, how many members of this household are age 16 or older? │
1879 │ ├───────────┬───────────┬───────────┬───────────┬──────────┬──────────┬────────────┬──────────┬───────────┬────────────┤
1880 │ │ 1 │ 2 │ Subtotal │ 3 │ 4 │ 5 │ 3+4 │ 4+5 │ Subtotal │ Total │
1881 │ ├─────┬─────┼─────┬─────┼─────┬─────┼─────┬─────┼─────┬────┼─────┬────┼──────┬─────┼─────┬────┼─────┬─────┼─────┬──────┤
1882 │ │ │ │ │ │ │ │ │ │ │ Row│ │ Row│ │ │ │ Row│ │ │ │ │
1883 │ │Count│Row %│Count│Row %│Count│Row %│Count│Row %│Count│ % │Count│ % │ Count│Row %│Count│ % │Count│Row %│Count│ Row %│
1884 ├───────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼────┼─────┼────┼──────┼─────┼─────┼────┼─────┼─────┼─────┼──────┤
1885 │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%│
1886 │likely is certain │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1887 │it that │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1888 │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%│
1889 │who have likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1890 │had too │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1891 │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%│
1892 │drink to likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1893 │drive │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1894 │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%│
1895 │will A. unlikely│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1896 │Get │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1897 │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%│
1898 │the unlikely│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1899 │police? │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1900 ╰───────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴────┴─────┴────┴──────┴─────┴─────┴────┴─────┴─────┴─────┴──────╯
1903 ╭─────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────╮
1904 │ │ S1. Including yourself, how many members of this household are age 16 or older? │
1905 │ ├───────────┬───────────┬───────────┬───────────┬────────────┬──────────┬───────────┬────────────┤
1906 │ │ 1 │ 2 │ Subtotal │ 3 │ 3+4 │ 4+5 │ Subtotal │ Total │
1907 │ ├─────┬─────┼─────┬─────┼─────┬─────┼─────┬─────┼──────┬─────┼─────┬────┼─────┬─────┼─────┬──────┤
1908 │ │ │ │ │ │ │ │ │ │ │ │ │ Row│ │ │ │ │
1909 │ │Count│Row %│Count│Row %│Count│Row %│Count│Row %│ Count│Row %│Count│ % │Count│Row %│Count│ Row %│
1910 ├─────────────────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼──────┼─────┼─────┼────┼─────┼─────┼─────┼──────┤
1911 │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%│
1912 │drivers who have had too much certain │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1913 │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%│
1914 │A. Get stopped by the police? likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1915 │ 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%│
1916 │ likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1917 │ 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%│
1918 │ unlikely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1919 │ 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%│
1920 │ unlikely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1921 ╰─────────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴──────┴─────┴─────┴────┴─────┴─────┴─────┴──────╯
1925 AT_SETUP([CTABLES PCOMPUTE - OTHERNM and MISSING])
1926 AT_KEYWORDS([postcompute])
1927 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1928 AT_DATA([ctables.sps],
1931 /PCOMPUTE &x=EXPR(OTHERNM)
1932 /PCOMPUTE &y=EXPR(MISSING)
1933 /PPROPERTIES &x LABEL='Drivers'
1934 /PPROPERTIES &y LABEL='Missing Values 2'
1936 /CATEGORIES VARIABLES=qn1 [OTHERNM, 5, &x, SUBTOTAL='Valid Values', MISSING, SUBTOTAL='Missing Values', &y]
1938 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1940 ╭──────────────────────────────────────────────────────────────────────────────────────────┬────────────╮
1946 ├──────────────────────────────────────────────────────────────────────────────────────────┼─────┼──────┤
1947 │ 1. How often do you usually drive a car or other motor vehicle? Every day │ 2305│ 2362│
1948 │ Several days a week │ 440│ 834│
1949 │ Once a week or less │ 125│ 236│
1950 │ Only certain times a year│ 58│ 72│
1952 │ Drivers │ 2928│ 3504│
1953 │ Valid Values │ 3120│ 3852│
1954 │ Don't know │ 3│ 5│
1956 │ Missing Values │ 12│ 15│
1957 │ Missing Values 2 │ 12│ 15│
1958 ╰──────────────────────────────────────────────────────────────────────────────────────────┴─────┴──────╯
1962 AT_SETUP([CTABLES PCOMPUTE - THRU])
1963 AT_KEYWORDS([postcompute])
1964 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1965 AT_DATA([ctables.sps],
1968 /PCOMPUTE &x=EXPR([1 THRU 2])
1969 /PCOMPUTE &y=EXPR([3 THRU 4])
1970 /PCOMPUTE &z=EXPR([5] + MISSING)
1971 /PPROPERTIES &x LABEL='Frequent Drivers'
1972 /PPROPERTIES &y LABEL='Infrequent Drivers'
1973 /PPROPERTIES &z LABEL='Not Drivers or Missing'
1975 /CATEGORIES VARIABLES=qn1 [1 THRU 2, &x, 3 THRU 4, &y, SUBTOTAL='Drivers', 5, MISSING, &z]
1977 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1979 ╭──────────────────────────────────────────────────────────────────────────────────────────┬────────────╮
1985 ├──────────────────────────────────────────────────────────────────────────────────────────┼─────┼──────┤
1986 │ 1. How often do you usually drive a car or other motor vehicle? Every day │ 2305│ 2362│
1987 │ Several days a week │ 440│ 834│
1988 │ Frequent Drivers │ 2745│ 3196│
1989 │ Once a week or less │ 125│ 236│
1990 │ Only certain times a year│ 58│ 72│
1991 │ Infrequent Drivers │ 183│ 308│
1992 │ Drivers │ 2928│ 3504│
1994 │ Don't know │ 3│ 5│
1996 │ Not Drivers or Missing │ 204│ 363│
1997 ╰──────────────────────────────────────────────────────────────────────────────────────────┴─────┴──────╯
2001 dnl I'm not sure that this is the correct behavior (see
2002 dnl https://mail.gnu.org/archive/html/pspp-users/2022-07/msg00002.html)
2003 dnl but at least this test will notify us if the behavior changes.
2004 AT_SETUP([CTABLES intersecting PCOMPUTEs])
2005 AT_KEYWORDS([PCOMPUTE postcompute])
2006 AT_DATA([ctables.sps],
2007 [[DATA LIST LIST NOTABLE/x y z.
2010 VARIABLE LEVEL x y (NOMINAL).
2024 /PCOMPUTE &a = EXPR([1] + [2])
2025 /PCOMPUTE &b = EXPR([2] + [3])
2026 /PCOMPUTE &c = EXPR([4] * [5])
2027 /PCOMPUTE &d = EXPR([5] * [6])
2029 /CATEGORIES VARIABLES=x [1, &a, 2, &b, 3]
2030 /CATEGORIES VARIABLES=y [4, &c, 5, &d, 6].
2032 AT_CHECK([pspp ctables.sps -O box=unicode], [0],
2034 ╭───────────┬─────────────────────────────────────╮
2036 │ ├─────┬─────────┬─────┬─────────┬─────┤
2037 │ │ 4 │[4] * [5]│ 5 │[5] * [6]│ 6 │
2038 │ ├─────┼─────────┼─────┼─────────┼─────┤
2039 │ │Count│ Count │Count│ Count │Count│
2040 ├───────────┼─────┼─────────┼─────┼─────────┼─────┤
2041 │x 1 │ 5│ 10│ 2│ 18│ 9│
2042 │ [1] + [2]│ 7│ .│ 5│ .│ 13│
2043 │ 2 │ 2│ 6│ 3│ 12│ 4│
2044 │ [2] + [3]│ 3│ .│ 9│ .│ 5│
2045 │ 3 │ 1│ 6│ 6│ 6│ 1│
2046 ╰───────────┴─────┴─────────┴─────┴─────────┴─────╯
2050 AT_SETUP([CTABLES string and date and time])
2053 for gender in F M; do
2054 for month in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec; do
2055 for wkday in Sun Mon Tue Wed Thu Fri Sat Sun; do
2056 printf "$weight $gender $month $wkday\n"
2057 weight=$(expr \( $weight + 3 \) % 7 + 2)
2062 AT_DATA([ctables.sps],
2063 [[DATA LIST LIST NOTABLE FILE='ctables.txt'
2064 /w (F5.0) gender (A1) fmon (MONTH3) fday (WKDAY3).
2066 VARIABLE LEVEL w (SCALE).
2067 VARIABLE LEVEL gender fmon fday (NOMINAL).
2070 fmon 'Favorite month'
2071 fday 'Favorite day of the week'.
2072 VALUE LABELS /gender 'M' 'Male' 'F' 'Female'.
2074 /PCOMPUTE &q2 = EXPR(['APR' THRU 'June'])
2075 /PPROPERTIES &q2 LABEL='Q2'
2076 /PCOMPUTE &weekend = EXPR(['sun'] + ['Sat'])
2077 /PPROPERTIES &weekend LABEL='Weekend'
2078 /TABLE fmon BY gender > fday
2079 /CATEGORIES VARIABLES=fmon ['JAN', 'FEB', 'Mar', SUBTOTAL="Q1",
2081 'JUL' THRU 'sep', SUBTOTAL="Q3",
2082 OTHERNM, SUBTOTAL='Q4']
2083 /CATEGORIES VARIABLES=gender ['M', 'F']
2084 /CATEGORIES VARIABLE=fday ['Sun', 2 THRU 6, 'Sat', &weekend] TOTAL=YES
2085 /SLABELS VISIBLE=NO.
2087 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
2089 ╭──────────────────┬───────────────────────────────────────────────────────────────────────────────────╮
2091 │ ├─────────────────────────────────────────┬─────────────────────────────────────────┤
2093 │ ├─────────────────────────────────────────┼─────────────────────────────────────────┤
2094 │ │ Favorite day of the week │ Favorite day of the week │
2095 │ ├───┬───┬───┬───┬───┬───┬───┬───────┬─────┼───┬───┬───┬───┬───┬───┬───┬───────┬─────┤
2096 │ │SUN│MON│TUE│WED│THU│FRI│SAT│Weekend│Total│SUN│MON│TUE│WED│THU│FRI│SAT│Weekend│Total│
2097 ├──────────────────┼───┼───┼───┼───┼───┼───┼───┼───────┼─────┼───┼───┼───┼───┼───┼───┼───┼───────┼─────┤
2098 │Favorite month JAN│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│ 9│ 6│ 4│ 2│ 7│ 5│ 3│ 12│ 36│
2099 │ FEB│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│
2100 │ MAR│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│
2101 │ Q1 │ 32│ 17│ 18│ 12│ 13│ 14│ 15│ │ │ 29│ 12│ 13│ 14│ 15│ 16│ 17│ │ │
2102 │ APR│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│
2103 │ MAY│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│
2104 │ JUN│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│
2105 │ Q2 │ 24│ 13│ 14│ 15│ 16│ 17│ 18│ .│ │ 28│ 15│ 16│ 17│ 18│ 12│ 13│ .│ │
2106 │ JUL│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│
2107 │ AUG│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│
2108 │ SEP│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│
2109 │ Q3 │ 54│ 29│ 31│ 33│ 28│ 30│ 32│ │ │ 62│ 33│ 28│ 30│ 32│ 27│ 29│ │ │
2110 │ OCT│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│
2111 │ NOV│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│
2112 │ DEC│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│
2113 │ Q4 │ 36│ 12│ 13│ 14│ 15│ 16│ 17│ │ │ 26│ 14│ 15│ 16│ 17│ 18│ 12│ │ │
2114 ╰──────────────────┴───┴───┴───┴───┴───┴───┴───┴───────┴─────┴───┴───┴───┴───┴───┴───┴───┴───────┴─────╯
2118 AT_SETUP([CTABLES CLABELS])
2119 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2120 AT_DATA([ctables.sps],
2122 CTABLES /TABLE AgeGroup BY qns3a.
2123 CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=OPPOSITE.
2124 CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=OPPOSITE.
2125 CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=LAYER.
2126 CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=LAYER.
2128 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
2130 ╭───────────────────────┬────────────╮
2136 ├───────────────────────┼─────┼──────┤
2137 │Age group 15 or younger│ 0│ 0│
2138 │ 16 to 25 │ 594│ 505│
2139 │ 26 to 35 │ 476│ 491│
2140 │ 36 to 45 │ 489│ 548│
2141 │ 46 to 55 │ 526│ 649│
2142 │ 56 to 65 │ 516│ 731│
2143 │ 66 or older │ 531│ 943│
2144 ╰───────────────────────┴─────┴──────╯
2147 ╭───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
2149 │ ├──────────────────────────────────────────────────────┬───────────────────────────────────────────────────────┤
2151 │ ├─────────┬───────┬──────┬──────┬──────┬───────┬───────┼──────────┬──────┬───────┬──────┬──────┬──────┬────────┤
2152 │ │ 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 │
2153 │ │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │
2154 │ ├─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
2155 │ │ Count │ Count │ Count│ Count│ Count│ Count │ Count │ Count │ Count│ Count │ Count│ Count│ Count│ Count │
2156 ├───────┼─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
2157 │Age │ 0│ 594│ 476│ 489│ 526│ 516│ 531│ 0│ 505│ 491│ 548│ 649│ 731│ 943│
2158 │group │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
2159 ╰───────┴─────────┴───────┴──────┴──────┴──────┴───────┴───────┴──────────┴──────┴───────┴──────┴──────┴──────┴────────╯
2162 ╭──────────────────────────────┬────────────╮
2166 ├──────────────────────────────┼────────────┤
2167 │Age group 15 or younger Male │ 0│
2169 │ ╶────────────────────┼────────────┤
2170 │ 16 to 25 Male │ 594│
2172 │ ╶────────────────────┼────────────┤
2173 │ 26 to 35 Male │ 476│
2175 │ ╶────────────────────┼────────────┤
2176 │ 36 to 45 Male │ 489│
2178 │ ╶────────────────────┼────────────┤
2179 │ 46 to 55 Male │ 526│
2181 │ ╶────────────────────┼────────────┤
2182 │ 56 to 65 Male │ 516│
2184 │ ╶────────────────────┼────────────┤
2185 │ 66 or older Male │ 531│
2187 ╰──────────────────────────────┴────────────╯
2191 ╭─────────┬────────────╮
2197 ├─────────┼─────┼──────┤
2199 ╰─────────┴─────┴──────╯
2203 ╭─────────┬────────────╮
2209 ├─────────┼─────┼──────┤
2210 │Age group│ 594│ 505│
2211 ╰─────────┴─────┴──────╯
2215 ╭─────────┬────────────╮
2221 ├─────────┼─────┼──────┤
2222 │Age group│ 476│ 491│
2223 ╰─────────┴─────┴──────╯
2227 ╭─────────┬────────────╮
2233 ├─────────┼─────┼──────┤
2234 │Age group│ 489│ 548│
2235 ╰─────────┴─────┴──────╯
2239 ╭─────────┬────────────╮
2245 ├─────────┼─────┼──────┤
2246 │Age group│ 526│ 649│
2247 ╰─────────┴─────┴──────╯
2251 ╭─────────┬────────────╮
2257 ├─────────┼─────┼──────┤
2258 │Age group│ 516│ 731│
2259 ╰─────────┴─────┴──────╯
2263 ╭─────────┬────────────╮
2269 ├─────────┼─────┼──────┤
2270 │Age group│ 531│ 943│
2271 ╰─────────┴─────┴──────╯
2275 ╭───────────────────────┬────────────╮
2279 ├───────────────────────┼────────────┤
2280 │Age group 15 or younger│ 0│
2286 │ 66 or older │ 531│
2287 ╰───────────────────────┴────────────╯
2291 ╭───────────────────────┬────────────╮
2295 ├───────────────────────┼────────────┤
2296 │Age group 15 or younger│ 0│
2302 │ 66 or older │ 943│
2303 ╰───────────────────────┴────────────╯
2307 AT_SETUP([CTABLES missing values])
2308 AT_DATA([ctables.sps],
2309 [[DATA LIST LIST NOTABLE/x y.
2348 MISSING VALUES x (1, 2) y (2, 3).
2349 VARIABLE LEVEL ALL (NOMINAL).
2351 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN,
2352 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
2353 /CATEGORIES VARIABLES=ALL TOTAL=YES.
2354 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN,
2355 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
2356 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
2357 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2358 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2359 /CATEGORIES VARIABLES=ALL TOTAL=YES
2360 /SLABELS POSITION=ROW.
2361 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2362 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2363 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE
2364 /SLABELS POSITION=ROW.
2365 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2366 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2367 /CATEGORIES VARIABLES=x [1, 2, 3, 4] TOTAL=YES
2368 /CATEGORIES VARIABLES=y [1, 3, 4, 5] TOTAL=YES
2369 /SLABELS POSITION=ROW.
2371 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
2373 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
2374 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
2375 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
2376 │x 3.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2377 │ 4.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2378 │ 5.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2379 │ Total│ 18│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
2380 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
2381 dnl Note that Column Total N % doesn't add up to 100 because missing
2382 dnl values are included in the total but not shown as a category and this
2383 dnl is expected behavior.
2386 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
2387 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
2388 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
2389 │x 1.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
2390 │ 2.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
2391 │ 3.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2392 │ 4.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2393 │ 5.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2394 │ Total│ 30│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
2395 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
2396 dnl Note that Column Total N % doesn't add up to 100 because system-missing
2397 dnl values are included in the total but not shown as a category and this
2398 dnl is expected behavior.
2401 ╭────────────────────────┬───────────────────────────╮
2403 │ ├──────┬──────┬──────┬──────┤
2404 │ │ 1.00 │ 4.00 │ 5.00 │ Total│
2405 ├────────────────────────┼──────┼──────┼──────┼──────┤
2406 │x 3.00 Count │ 1│ 1│ 1│ 3│
2407 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2408 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2409 │ Column Total N %│ 33.3%│ 33.3%│ 33.3%│ .│
2410 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2411 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2412 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2413 │ Valid N │ │ │ │ 3│
2414 │ Total N │ │ │ │ 6│
2415 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2416 │ 4.00 Count │ 1│ 1│ 1│ 3│
2417 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2418 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2419 │ Column Total N %│ 33.3%│ 33.3%│ 33.3%│ .│
2420 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2421 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2422 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2423 │ Valid N │ │ │ │ 3│
2424 │ Total N │ │ │ │ 6│
2425 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2426 │ 5.00 Count │ 1│ 1│ 1│ 3│
2427 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2428 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2429 │ Column Total N %│ 33.3%│ 33.3%│ 33.3%│ .│
2430 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2431 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2432 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2433 │ Valid N │ │ │ │ 3│
2434 │ Total N │ │ │ │ 6│
2435 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2436 │ Total Count │ 3│ 3│ 3│ 9│
2437 │ Column % │100.0%│100.0%│100.0%│ .│
2438 │ Column Valid N %│100.0%│100.0%│100.0%│ .│
2439 │ Column Total N %│100.0%│100.0%│100.0%│ .│
2440 │ Row % │ .│ .│ .│ .│
2441 │ Row Valid N % │ .│ .│ .│ .│
2442 │ Row Total N % │ .│ .│ .│ .│
2443 │ Valid N │ 3│ 3│ 3│ 9│
2444 │ Total N │ 3│ 3│ 3│ 18│
2445 ╰────────────────────────┴──────┴──────┴──────┴──────╯
2448 ╭────────────────────────┬─────────────────────────────────────────╮
2450 │ ├──────┬──────┬──────┬──────┬──────┬──────┤
2451 │ │ 1.00 │ 2.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
2452 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2453 │x 1.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2454 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2455 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2456 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2457 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2458 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2459 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2460 │ Valid N │ │ │ │ │ │ 3│
2461 │ Total N │ │ │ │ │ │ 6│
2462 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2463 │ 2.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2464 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2465 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2466 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2467 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2468 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2469 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2470 │ Valid N │ │ │ │ │ │ 3│
2471 │ Total N │ │ │ │ │ │ 6│
2472 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2473 │ 3.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2474 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2475 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2476 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2477 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2478 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2479 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2480 │ Valid N │ │ │ │ │ │ 3│
2481 │ Total N │ │ │ │ │ │ 6│
2482 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2483 │ 4.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2484 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2485 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2486 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2487 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2488 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2489 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2490 │ Valid N │ │ │ │ │ │ 3│
2491 │ Total N │ │ │ │ │ │ 6│
2492 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2493 │ 5.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2494 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2495 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2496 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2497 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2498 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2499 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2500 │ Valid N │ │ │ │ │ │ 3│
2501 │ Total N │ │ │ │ │ │ 6│
2502 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2503 │ Total Count │ 5│ 5│ 5│ 5│ 5│ 25│
2504 │ Column % │100.0%│100.0%│100.0%│100.0%│100.0%│ .│
2505 │ Column Valid N %│100.0%│ .│ .│100.0%│100.0%│ .│
2506 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│100.0%│ .│
2507 │ Row % │ .│ .│ .│ .│ .│ .│
2508 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
2509 │ Row Total N % │ .│ .│ .│ .│ .│ .│
2510 │ Valid N │ 5│ 0│ 0│ 5│ 5│ 15│
2511 │ Total N │ 5│ 5│ 5│ 5│ 5│ 30│
2512 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────╯
2515 ╭────────────────────────┬──────────────────────────────────╮
2517 │ ├──────┬──────┬──────┬──────┬──────┤
2518 │ │ 1.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
2519 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┤
2520 │x 1.00 Count │ 1│ 1│ 1│ 1│ 4│
2521 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2522 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2523 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2524 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2525 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2526 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2527 │ Valid N │ │ │ │ │ 3│
2528 │ Total N │ │ │ │ │ 6│
2529 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2530 │ 2.00 Count │ 1│ 1│ 1│ 1│ 4│
2531 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2532 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2533 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2534 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2535 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2536 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2537 │ Valid N │ │ │ │ │ 3│
2538 │ Total N │ │ │ │ │ 6│
2539 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2540 │ 3.00 Count │ 1│ 1│ 1│ 1│ 4│
2541 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2542 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2543 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2544 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2545 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2546 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2547 │ Valid N │ │ │ │ │ 3│
2548 │ Total N │ │ │ │ │ 6│
2549 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2550 │ 4.00 Count │ 1│ 1│ 1│ 1│ 4│
2551 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2552 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2553 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2554 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2555 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2556 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2557 │ Valid N │ │ │ │ │ 3│
2558 │ Total N │ │ │ │ │ 6│
2559 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2560 │ Total Count │ 4│ 4│ 4│ 4│ 16│
2561 │ Column % │100.0%│100.0%│100.0%│100.0%│ .│
2562 │ Column Valid N %│100.0%│ .│100.0%│100.0%│ .│
2563 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│ .│
2564 │ Row % │ .│ .│ .│ .│ .│
2565 │ Row Valid N % │ .│ .│ .│ .│ .│
2566 │ Row Total N % │ .│ .│ .│ .│ .│
2567 │ Valid N │ 4│ 0│ 4│ 4│ 12│
2568 │ Total N │ 4│ 4│ 4│ 4│ 24│
2569 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────╯
2573 AT_SETUP([CTABLES SMISSING=LISTWISE])
2574 AT_KEYWORDS([SMISSING LISTWISE])
2575 AT_DATA([ctables.sps],
2576 [[DATA LIST LIST NOTABLE/x y z.
2584 VARIABLE LEVEL x (NOMINAL).
2586 CTABLES /TABLE (y + z) > x.
2587 CTABLES /SMISSING LISTWISE /TABLE (y + z) > x.
2589 * The following doesn't come out as listwise because the tables are
2590 separate, not linked by an > operator.
2591 CTABLES /SMISSING LISTWISE /TABLE (y > x) + (z > x).
2593 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
2623 AT_SETUP([CTABLES VLABELS - variables on different axes])
2624 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2625 AT_DATA([ctables.sps],
2627 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=DEFAULT /TABLE qnd5a BY qns3a.
2628 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NAME /TABLE qnd5a BY qns3a.
2629 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=LABEL /TABLE qnd5a BY qns3a.
2630 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=BOTH /TABLE qnd5a BY qns3a.
2631 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a BY qns3a.
2633 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2635 ╭────────────────────────────────────────────────────────────────┬────────────╮
2641 ├────────────────────────────────────────────────────────────────┼─────┼──────┤
2642 │D5a. What would you say is your primary Cuban │ 13│ 7│
2643 │ethnic background? Mexican │ 175│ 136│
2645 │ South American │ 21│ 13│
2646 │ Central American │ 27│ 25│
2647 │ Puerto Rican, OR │ 37│ 41│
2648 │ Something else │ 35│ 33│
2649 │ Multiple - cannot │ 2│ 5│
2651 ╰────────────────────────────────────────────────────────────────┴─────┴──────╯
2654 ╭──────────────────────────────────┬────────────╮
2660 ├──────────────────────────────────┼─────┼──────┤
2661 │QND5A Cuban │ 13│ 7│
2662 │ Mexican │ 175│ 136│
2664 │ South American │ 21│ 13│
2665 │ Central American │ 27│ 25│
2666 │ Puerto Rican, OR │ 37│ 41│
2667 │ Something else │ 35│ 33│
2668 │ Multiple - cannot choose one│ 2│ 5│
2669 ╰──────────────────────────────────┴─────┴──────╯
2672 ╭────────────────────────────────────────────────────────────────┬────────────╮
2678 ├────────────────────────────────────────────────────────────────┼─────┼──────┤
2679 │D5a. What would you say is your primary Cuban │ 13│ 7│
2680 │ethnic background? Mexican │ 175│ 136│
2682 │ South American │ 21│ 13│
2683 │ Central American │ 27│ 25│
2684 │ Puerto Rican, OR │ 37│ 41│
2685 │ Something else │ 35│ 33│
2686 │ Multiple - cannot │ 2│ 5│
2688 ╰────────────────────────────────────────────────────────────────┴─────┴──────╯
2691 ╭────────────────────────────────────────────────────────────┬────────────────╮
2694 │ ├───────┬────────┤
2696 │ ├───────┼────────┤
2698 ├────────────────────────────────────────────────────────────┼───────┼────────┤
2699 │QND5A D5a. What would you say is your Cuban │ 13│ 7│
2700 │primary ethnic background? Mexican │ 175│ 136│
2702 │ South American │ 21│ 13│
2703 │ Central American │ 27│ 25│
2704 │ Puerto Rican, OR │ 37│ 41│
2705 │ Something else │ 35│ 33│
2706 │ Multiple - cannot │ 2│ 5│
2708 ╰────────────────────────────────────────────────────────────┴───────┴────────╯
2711 ╭────────────────────────────┬─────┬──────╮
2715 ├────────────────────────────┼─────┼──────┤
2717 │Mexican │ 175│ 136│
2719 │South American │ 21│ 13│
2720 │Central American │ 27│ 25│
2721 │Puerto Rican, OR │ 37│ 41│
2722 │Something else │ 35│ 33│
2723 │Multiple - cannot choose one│ 2│ 5│
2724 ╰────────────────────────────┴─────┴──────╯
2728 AT_SETUP([CTABLES VLABELS - stacked variables])
2729 AT_KEYWORDS([stack stacking])
2730 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2731 AT_DATA([ctables.sps],
2733 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NAME /TABLE qnd5a + qns3a.
2734 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NAME /TABLE qnd5a + qns3a.
2735 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NONE /TABLE qnd5a + qns3a.
2736 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NONE /TABLE qnd5a + qns3a.
2737 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a + qns3a.
2739 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2741 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2743 ├───────────────────────────────────────────────────────────────────────┼─────┤
2744 │D5a. What would you say is your primary ethnic Cuban │ 20│
2745 │background? Mexican │ 311│
2747 │ South American │ 34│
2748 │ Central American │ 52│
2749 │ Puerto Rican, OR │ 78│
2750 │ Something else │ 68│
2751 │ Multiple - cannot │ 7│
2753 ├───────────────────────────────────────────────────────────────────────┼─────┤
2756 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2759 ╭─────────────────────────────────────────┬─────╮
2761 ├─────────────────────────────────────────┼─────┤
2765 │ South American │ 34│
2766 │ Central American │ 52│
2767 │ Puerto Rican, OR │ 78│
2768 │ Something else │ 68│
2769 │ Multiple - cannot choose one│ 7│
2770 ├─────────────────────────────────────────┼─────┤
2771 │S3a. GENDER: Male │ 3132│
2773 ╰─────────────────────────────────────────┴─────╯
2776 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2778 ├───────────────────────────────────────────────────────────────────────┼─────┤
2779 │D5a. What would you say is your primary ethnic Cuban │ 20│
2780 │background? Mexican │ 311│
2782 │ South American │ 34│
2783 │ Central American │ 52│
2784 │ Puerto Rican, OR │ 78│
2785 │ Something else │ 68│
2786 │ Multiple - cannot │ 7│
2788 ├───────────────────────────────────────────────────────────────────────┼─────┤
2790 ├───────────────────────────────────────────────────────────────────────┼─────┤
2792 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2795 ╭─────────────────────────────┬─────╮
2797 ├─────────────────────────────┼─────┤
2799 ├─────────────────────────────┼─────┤
2801 ├─────────────────────────────┼─────┤
2803 ├─────────────────────────────┼─────┤
2804 │South American │ 34│
2805 ├─────────────────────────────┼─────┤
2806 │Central American │ 52│
2807 ├─────────────────────────────┼─────┤
2808 │Puerto Rican, OR │ 78│
2809 ├─────────────────────────────┼─────┤
2810 │Something else │ 68│
2811 ├─────────────────────────────┼─────┤
2812 │Multiple - cannot choose one │ 7│
2813 ├─────────────────────────────┼─────┤
2814 │S3a. GENDER: Male │ 3132│
2816 ╰─────────────────────────────┴─────╯
2819 ╭────────────────────────────┬─────╮
2821 ├────────────────────────────┼─────┤
2825 │South American │ 34│
2826 │Central American │ 52│
2827 │Puerto Rican, OR │ 78│
2828 │Something else │ 68│
2829 │Multiple - cannot choose one│ 7│
2832 ╰────────────────────────────┴─────╯
2836 AT_SETUP([CTABLES VLABELS - nested variables])
2837 AT_KEYWORDS([nest nesting])
2838 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2839 AT_DATA([ctables.sps],
2841 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NAME /TABLE qnd5a > qns3a.
2842 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NAME /TABLE qnd5a > qns3a.
2843 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NONE /TABLE qnd5a > qns3a.
2844 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NONE /TABLE qnd5a > qns3a.
2845 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a > qns3a.
2847 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2849 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2851 ├───────────────────────────────────────────────────────────────────────┼─────┤
2852 │D5a. What would you say is your Cuban QNS3A Male │ 13│
2853 │primary ethnic background? Female│ 7│
2854 │ ╶─────────────────────────────────┼─────┤
2855 │ Mexican QNS3A Male │ 175│
2857 │ ╶─────────────────────────────────┼─────┤
2858 │ Spanish QNS3A Male │ 20│
2860 │ ╶─────────────────────────────────┼─────┤
2861 │ South American QNS3A Male │ 21│
2863 │ ╶─────────────────────────────────┼─────┤
2864 │ Central American QNS3A Male │ 27│
2866 │ ╶─────────────────────────────────┼─────┤
2867 │ Puerto Rican, OR QNS3A Male │ 37│
2869 │ ╶─────────────────────────────────┼─────┤
2870 │ Something else QNS3A Male │ 35│
2872 │ ╶─────────────────────────────────┼─────┤
2873 │ Multiple - cannot QNS3A Male │ 2│
2874 │ choose one Female│ 5│
2875 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2878 ╭──────────────────────────────────────────────────────┬─────╮
2880 ├──────────────────────────────────────────────────────┼─────┤
2881 │QND5A Cuban S3a. GENDER: Male │ 13│
2883 │ ╶────────────────────────────────────────────────┼─────┤
2884 │ Mexican S3a. GENDER: Male │ 175│
2886 │ ╶────────────────────────────────────────────────┼─────┤
2887 │ Spanish S3a. GENDER: Male │ 20│
2889 │ ╶────────────────────────────────────────────────┼─────┤
2890 │ South American S3a. GENDER: Male │ 21│
2892 │ ╶────────────────────────────────────────────────┼─────┤
2893 │ Central American S3a. GENDER: Male │ 27│
2895 │ ╶────────────────────────────────────────────────┼─────┤
2896 │ Puerto Rican, OR S3a. GENDER: Male │ 37│
2898 │ ╶────────────────────────────────────────────────┼─────┤
2899 │ Something else S3a. GENDER: Male │ 35│
2901 │ ╶────────────────────────────────────────────────┼─────┤
2902 │ Multiple - cannot choose one S3a. GENDER: Male │ 2│
2904 ╰──────────────────────────────────────────────────────┴─────╯
2907 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2909 ├───────────────────────────────────────────────────────────────────────┼─────┤
2910 │D5a. What would you say is your primary Cuban Male │ 13│
2911 │ethnic background? Female│ 7│
2912 │ ╶────────────────────────────┼─────┤
2913 │ Mexican Male │ 175│
2915 │ ╶────────────────────────────┼─────┤
2916 │ Spanish Male │ 20│
2918 │ ╶────────────────────────────┼─────┤
2919 │ South American Male │ 21│
2921 │ ╶────────────────────────────┼─────┤
2922 │ Central American Male │ 27│
2924 │ ╶────────────────────────────┼─────┤
2925 │ Puerto Rican, OR Male │ 37│
2927 │ ╶────────────────────────────┼─────┤
2928 │ Something else Male │ 35│
2930 │ ╶────────────────────────────┼─────┤
2931 │ Multiple - cannot Male │ 2│
2932 │ choose one Female│ 5│
2933 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2936 ╭────────────────────────────────────────────────┬─────╮
2938 ├────────────────────────────────────────────────┼─────┤
2939 │Cuban S3a. GENDER: Male │ 13│
2941 ├────────────────────────────────────────────────┼─────┤
2942 │Mexican S3a. GENDER: Male │ 175│
2944 ├────────────────────────────────────────────────┼─────┤
2945 │Spanish S3a. GENDER: Male │ 20│
2947 ├────────────────────────────────────────────────┼─────┤
2948 │South American S3a. GENDER: Male │ 21│
2950 ├────────────────────────────────────────────────┼─────┤
2951 │Central American S3a. GENDER: Male │ 27│
2953 ├────────────────────────────────────────────────┼─────┤
2954 │Puerto Rican, OR S3a. GENDER: Male │ 37│
2956 ├────────────────────────────────────────────────┼─────┤
2957 │Something else S3a. GENDER: Male │ 35│
2959 ├────────────────────────────────────────────────┼─────┤
2960 │Multiple - cannot choose one S3a. GENDER: Male │ 2│
2962 ╰────────────────────────────────────────────────┴─────╯
2965 ╭───────────────────────────────────┬─────╮
2967 ├───────────────────────────────────┼─────┤
2970 ├───────────────────────────────────┼─────┤
2971 │Mexican Male │ 175│
2973 ├───────────────────────────────────┼─────┤
2976 ├───────────────────────────────────┼─────┤
2977 │South American Male │ 21│
2979 ├───────────────────────────────────┼─────┤
2980 │Central American Male │ 27│
2982 ├───────────────────────────────────┼─────┤
2983 │Puerto Rican, OR Male │ 37│
2985 ├───────────────────────────────────┼─────┤
2986 │Something else Male │ 35│
2988 ├───────────────────────────────────┼─────┤
2989 │Multiple - cannot choose one Male │ 2│
2991 ╰───────────────────────────────────┴─────╯
2995 AT_SETUP([CTABLES FORMAT EMPTY])
2996 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2997 AT_DATA([ctables.sps],
2999 CTABLES /FORMAT EMPTY=ZERO /TABLE qnd5a BY qnd5.
3000 CTABLES /FORMAT EMPTY=BLANK /TABLE qnd5a BY qnd5.
3001 CTABLES /FORMAT EMPTY='n/a' /TABLE qnd5a BY qnd5.
3003 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
3005 ╭─────────────────────────────────────────────┬───────────────────────────────╮
3006 │ │ D5. ETHNICITY: Are you of │
3007 │ │ Hispanic or Latino origin or │
3009 │ ├───────────────┬───────────────┤
3011 │ ├───────────────┼───────────────┤
3013 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
3014 │D5a. What would you say is Cuban │ 20│ 0│
3015 │your primary ethnic Mexican │ 311│ 0│
3016 │background? Spanish │ 48│ 0│
3017 │ South American │ 34│ 0│
3018 │ Central American│ 52│ 0│
3019 │ Puerto Rican, OR│ 78│ 0│
3020 │ Something else │ 68│ 0│
3021 │ Multiple - │ 7│ 0│
3022 │ cannot choose │ │ │
3024 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
3027 ╭─────────────────────────────────────────────┬───────────────────────────────╮
3028 │ │ D5. ETHNICITY: Are you of │
3029 │ │ Hispanic or Latino origin or │
3031 │ ├───────────────┬───────────────┤
3033 │ ├───────────────┼───────────────┤
3035 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
3036 │D5a. What would you say is Cuban │ 20│ │
3037 │your primary ethnic Mexican │ 311│ │
3038 │background? Spanish │ 48│ │
3039 │ South American │ 34│ │
3040 │ Central American│ 52│ │
3041 │ Puerto Rican, OR│ 78│ │
3042 │ Something else │ 68│ │
3044 │ cannot choose │ │ │
3046 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
3049 ╭─────────────────────────────────────────────┬───────────────────────────────╮
3050 │ │ D5. ETHNICITY: Are you of │
3051 │ │ Hispanic or Latino origin or │
3053 │ ├───────────────┬───────────────┤
3055 │ ├───────────────┼───────────────┤
3057 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
3058 │D5a. What would you say is Cuban │ 20│n/a │
3059 │your primary ethnic Mexican │ 311│n/a │
3060 │background? Spanish │ 48│n/a │
3061 │ South American │ 34│n/a │
3062 │ Central American│ 52│n/a │
3063 │ Puerto Rican, OR│ 78│n/a │
3064 │ Something else │ 68│n/a │
3065 │ Multiple - │ 7│n/a │
3066 │ cannot choose │ │ │
3068 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
3072 AT_SETUP([CTABLES FORMAT MISSING])
3073 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3074 AT_DATA([ctables.sps],
3076 CTABLES /FORMAT MISSING='(no data)' /TABLE qnd5a[COLPCT] BY qnd5.
3078 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
3080 ╭─────────────────────────────────────────────┬───────────────────────────────╮
3081 │ │ D5. ETHNICITY: Are you of │
3082 │ │ Hispanic or Latino origin or │
3084 │ ├───────────────┬───────────────┤
3086 │ ├───────────────┼───────────────┤
3087 │ │ Column % │ Column % │
3088 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
3089 │D5a. What would you say is Cuban │ 3.2%│(no data) │
3090 │your primary ethnic Mexican │ 50.3%│(no data) │
3091 │background? Spanish │ 7.8%│(no data) │
3092 │ South American │ 5.5%│(no data) │
3093 │ Central American│ 8.4%│(no data) │
3094 │ Puerto Rican, OR│ 12.6%│(no data) │
3095 │ Something else │ 11.0%│(no data) │
3096 │ Multiple - │ 1.1%│(no data) │
3097 │ cannot choose │ │ │
3099 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
3103 AT_SETUP([CTABLES HIDESMALLCOUNTS])
3104 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3105 AT_DATA([ctables.sps],
3107 CTABLES /TABLE qn38[c][COUNT, COLPCT].
3108 CTABLES /HIDESMALLCOUNTS /TABLE qn38[c][COUNT, COLPCT].
3109 CTABLES /HIDESMALLCOUNTS COUNT=10 /TABLE qn38[c][COUNT, COLPCT].
3111 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
3113 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
3115 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
3116 │38. How many drinks did you have on that Less than one│ 7│ .5%│
3117 │occasion? 1 │ 491│ 34.9%│
3137 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
3140 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
3142 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
3143 │38. How many drinks did you have on that Less than one│ 7│ .5%│
3144 │occasion? 1 │ 491│ 34.9%│
3164 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
3167 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
3169 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
3170 │38. How many drinks did you have on that Less than one│<10 │ .5%│
3171 │occasion? 1 │ 491│ 34.9%│
3191 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
3195 AT_SETUP([CTABLES FORMAT MINCOLWIDTH MAXCOLWIDTH])
3196 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3197 AT_DATA([ctables.sps],
3199 CTABLES /FORMAT MINCOLWIDTH=1 MAXCOLWIDTH=2 UNITS=INCHES /TABLE BY qns3a.
3201 AT_CHECK([pspp ctables.sps -o - -O box=unicode -o pspp.spv], [0], [dnl
3213 AT_CHECK([pspp-output get-table-look pspp.spv pspp.stt])
3214 AT_CHECK([sed 's/ /\n/g' pspp.stt | grep ColumnWidth | sort], [0], [dnl
3215 maximumColumnWidth="192"
3216 minimumColumnWidth="96"
3220 AT_SETUP([CTABLES special formats])
3221 AT_KEYWORDS([NEGPAREN NEQUAL PAREN PCTPAREN])
3222 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3223 AT_DATA([ctables.sps],
3225 COMPUTE x = qnd3 - 4.
3226 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].
3228 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
3230 ╭─┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────╮
3231 │ │Minimum│Minimum│Minimum│Minimum│Maximum│Maximum│Maximum│Maximum│
3232 ├─┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
3233 │x│(3.0) │N=-3.0 │(-3.0) │(-3.0%)│8.0 │N=8.0 │(8.0) │(8.0%) │
3234 ╰─┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────╯
3238 AT_SETUP([CTABLES TITLES])
3239 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3240 AT_DATA([ctables.sps],
3243 /VLABELS VARIABLES=qn1 DISPLAY=NONE
3244 /TABLE ((qn1[c][COUNT])) BY qns3a[c] > qnd5
3245 /TITLES TITLE='How often do you drive?'
3246 CAPTION='Generated )TIME on )DATE'
3249 AT_CHECK([pspp ctables.sps -O box=unicode | sed 's/..:..:../HH:MM:SS/
3250 s&../../..&MM/DD/YY&'], [0], [dnl
3251 How often do you drive?
3252 ╭───────────────────────────────────┬─────────────────────────────────────────╮
3254 │ ├────────────────────┬────────────────────┤
3256 │ ├────────────────────┼────────────────────┤
3257 │ │ D5. ETHNICITY: Are │ D5. ETHNICITY: Are │
3258 │ │ you of Hispanic or │ you of Hispanic or │
3259 │ │ Latino origin or │ Latino origin or │
3260 │( ( 1. How often do you usually │ descent? │ descent? │
3261 │drive a car or other motor ├─────────┬──────────┼─────────┬──────────┤
3262 │vehicle?) ) BY S3a. GENDER: > D5. │ Yes │ No │ Yes │ No │
3263 │ETHNICITY: Are you of Hispanic or ├─────────┼──────────┼─────────┼──────────┤
3264 │Latino origin or descent? │ Count │ Count │ Count │ Count │
3265 ├───────────────────────────────────┼─────────┼──────────┼─────────┼──────────┤
3266 │Every day │ 218│ 2066│ 166│ 2175│
3267 │Several days a week │ 44│ 391│ 45│ 782│
3268 │Once a week or less │ 16│ 109│ 12│ 223│
3269 │Only certain times a year │ 15│ 41│ 11│ 61│
3270 │Never │ 39│ 150│ 56│ 278│
3271 ╰───────────────────────────────────┴─────────┴──────────┴─────────┴──────────╯
3272 Generated HH:MM:SS on MM/DD/YY
3276 AT_SETUP([CTABLES area definitions])
3277 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3278 AT_DATA([ctables.sps],
3281 /VLABELS VARIABLES=ALL DISPLAY=NAME
3282 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3283 /SLABELS POSITION=ROW
3284 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[ROWID, LAYERROWID]
3285 /SLABELS POSITION=ROW
3286 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[COLID, LAYERCOLID]
3287 /SLABELS POSITION=ROW.
3289 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=80], [0], [dnl
3292 ╭─────────────────────────────┬─────────────┬──────╮
3294 │ ├──────┬──────┼───┬──┤
3296 │ ├──────┼──────┤ │ │
3297 │ │ QN86 │ QN86 │ │ │
3298 │ ├───┬──┼───┬──┤ │ │
3299 │ │Yes│No│Yes│No│Yes│No│
3300 ├─────────────────────────────┼───┼──┼───┼──┼───┼──┤
3301 │QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3302 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3303 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│
3304 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3305 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3306 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3307 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│
3308 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┤
3309 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3310 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3311 │ Subtable ID│ 4│ 4│ 5│ 5│ 6│ 6│
3312 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3313 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3314 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3315 │ Subtable ID│ 4│ 4│ 5│ 5│ 6│ 6│
3316 ╰─────────────────────────────┴───┴──┴───┴──┴───┴──╯
3320 ╭─────────────────────────────┬─────────────┬──────╮
3322 │ ├──────┬──────┼───┬──┤
3324 │ ├──────┼──────┤ │ │
3325 │ │ QN86 │ QN86 │ │ │
3326 │ ├───┬──┼───┬──┤ │ │
3327 │ │Yes│No│Yes│No│Yes│No│
3328 ├─────────────────────────────┼───┼──┼───┼──┼───┼──┤
3329 │QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3330 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3331 │ Subtable ID│ 7│ 7│ 8│ 8│ 9│ 9│
3332 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3333 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3334 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3335 │ Subtable ID│ 7│ 7│ 8│ 8│ 9│ 9│
3336 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┤
3337 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3338 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3339 │ Subtable ID│ 10│10│ 11│11│ 12│12│
3340 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3341 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3342 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3343 │ Subtable ID│ 10│10│ 11│11│ 12│12│
3344 ╰─────────────────────────────┴───┴──┴───┴──┴───┴──╯
3348 ╭──────────────────────────────┬─────────────┬──────╮
3350 │ ├──────┬──────┼───┬──┤
3352 │ ├──────┼──────┤ │ │
3353 │ │ QN86 │ QN86 │ │ │
3354 │ ├───┬──┼───┬──┤ │ │
3355 │ │Yes│No│Yes│No│Yes│No│
3356 ├──────────────────────────────┼───┼──┼───┼──┼───┼──┤
3357 │QN61 Yes QN57 Yes Row ID │ 1│ 1│ 2│ 2│ 3│ 3│
3358 │ Layer Row ID│ 1│ 1│ 1│ 1│ 2│ 2│
3359 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3360 │ No Row ID │ 4│ 4│ 5│ 5│ 6│ 6│
3361 │ Layer Row ID│ 3│ 3│ 3│ 3│ 4│ 4│
3362 │ ╶─────────────────────────┼───┼──┼───┼──┼───┼──┤
3363 │ No QN57 Yes Row ID │ 7│ 7│ 8│ 8│ 9│ 9│
3364 │ Layer Row ID│ 5│ 5│ 5│ 5│ 6│ 6│
3365 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3366 │ No Row ID │ 10│10│ 11│11│ 12│12│
3367 │ Layer Row ID│ 7│ 7│ 7│ 7│ 8│ 8│
3368 ╰──────────────────────────────┴───┴──┴───┴──┴───┴──╯
3372 ╭──────────────────────────────┬─────────────┬──────╮
3374 │ ├──────┬──────┼───┬──┤
3376 │ ├──────┼──────┤ │ │
3377 │ │ QN86 │ QN86 │ │ │
3378 │ ├───┬──┼───┬──┤ │ │
3379 │ │Yes│No│Yes│No│Yes│No│
3380 ├──────────────────────────────┼───┼──┼───┼──┼───┼──┤
3381 │QN61 Yes QN57 Yes Row ID │ 13│13│ 14│14│ 15│15│
3382 │ Layer Row ID│ 9│ 9│ 9│ 9│ 10│10│
3383 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3384 │ No Row ID │ 16│16│ 17│17│ 18│18│
3385 │ Layer Row ID│ 11│11│ 11│11│ 12│12│
3386 │ ╶─────────────────────────┼───┼──┼───┼──┼───┼──┤
3387 │ No QN57 Yes Row ID │ 19│19│ 20│20│ 21│21│
3388 │ Layer Row ID│ 13│13│ 13│13│ 14│14│
3389 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3390 │ No Row ID │ 22│22│ 23│23│ 24│24│
3391 │ Layer Row ID│ 15│15│ 15│15│ 16│16│
3392 ╰──────────────────────────────┴───┴──┴───┴──┴───┴──╯
3396 ╭─────────────────────────────────┬─────────────┬──────╮
3398 │ ├──────┬──────┼───┬──┤
3400 │ ├──────┼──────┤ │ │
3401 │ │ QN86 │ QN86 │ │ │
3402 │ ├───┬──┼───┬──┤ │ │
3403 │ │Yes│No│Yes│No│Yes│No│
3404 ├─────────────────────────────────┼───┼──┼───┼──┼───┼──┤
3405 │QN61 Yes QN57 Yes Column ID │ 1│ 2│ 3│ 4│ 5│ 6│
3406 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3407 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3408 │ No Column ID │ 1│ 2│ 3│ 4│ 5│ 6│
3409 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3410 │ ╶────────────────────────────┼───┼──┼───┼──┼───┼──┤
3411 │ No QN57 Yes Column ID │ 7│ 8│ 9│10│ 11│12│
3412 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3413 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3414 │ No Column ID │ 7│ 8│ 9│10│ 11│12│
3415 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3416 ╰─────────────────────────────────┴───┴──┴───┴──┴───┴──╯
3420 ╭─────────────────────────────────┬─────────────┬──────╮
3422 │ ├──────┬──────┼───┬──┤
3424 │ ├──────┼──────┤ │ │
3425 │ │ QN86 │ QN86 │ │ │
3426 │ ├───┬──┼───┬──┤ │ │
3427 │ │Yes│No│Yes│No│Yes│No│
3428 ├─────────────────────────────────┼───┼──┼───┼──┼───┼──┤
3429 │QN61 Yes QN57 Yes Column ID │ 13│14│ 15│16│ 17│18│
3430 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3431 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3432 │ No Column ID │ 13│14│ 15│16│ 17│18│
3433 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3434 │ ╶────────────────────────────┼───┼──┼───┼──┼───┼──┤
3435 │ No QN57 Yes Column ID │ 19│20│ 21│22│ 23│24│
3436 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3437 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3438 │ No Column ID │ 19│20│ 21│22│ 23│24│
3439 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3440 ╰─────────────────────────────────┴───┴──┴───┴──┴───┴──╯
3444 AT_SETUP([CTABLES area definitions with CLABELS ROWLABELS=OPPOSITE])
3445 AT_KEYWORDS([ROWLABELS OPPOSITE])
3446 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3447 AT_DATA([ctables.sps],
3450 /VLABELS VARIABLES=ALL DISPLAY=NAME
3451 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3452 /SLABELS POSITION=ROW
3453 /CLABELS ROWLABELS=OPPOSITE
3454 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3455 /SLABELS POSITION=ROW
3456 /CLABELS ROWLABELS=OPPOSITE
3457 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3458 /SLABELS POSITION=ROW
3459 /CLABELS ROWLABELS=OPPOSITE.
3461 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3464 ╭──────────────────────────────────┬───────────────────────────────────────────────────────╮
3466 │ ├───────────────────────────┬───────────────────────────┤
3468 │ ├───────────────────────────┼───────────────────────────┤
3470 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3471 │ │ Yes │ No │ Yes │ No │
3472 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3473 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3474 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3475 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3476 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3477 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3478 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3479 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3480 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3481 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3482 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3483 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3484 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3485 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3486 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3487 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3488 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3489 │ Subtable ID│ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3490 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3491 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3492 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3493 │ Subtable ID│ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3494 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3498 ╭──────────────────────────────────┬───────────────────────────────────────────────────────╮
3500 │ ├───────────────────────────┬───────────────────────────┤
3502 │ ├───────────────────────────┼───────────────────────────┤
3504 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3505 │ │ Yes │ No │ Yes │ No │
3506 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3507 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3508 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3509 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3510 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3511 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3512 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3513 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3514 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3515 │ Subtable ID│ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3516 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3517 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3518 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3519 │ Subtable ID│ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3520 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3521 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3522 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3523 │ Subtable ID│ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3524 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3525 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3526 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3527 │ Subtable ID│ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3528 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3532 ╭───────────────────────────────────┬───────────────────────────────────────────────────────╮
3534 │ ├───────────────────────────┬───────────────────────────┤
3536 │ ├───────────────────────────┼───────────────────────────┤
3538 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3539 │ │ Yes │ No │ Yes │ No │
3540 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3541 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3542 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3543 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3544 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3545 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3546 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3547 │QN26 Yes QN61 Yes QN57 Row ID │ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3548 │ Layer Row ID│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3549 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3550 │ No QN57 Row ID │ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3551 │ Layer Row ID│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3552 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3553 │ No QN61 Yes QN57 Row ID │ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3554 │ Layer Row ID│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3555 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3556 │ No QN57 Row ID │ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3557 │ Layer Row ID│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3558 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3562 ╭───────────────────────────────────┬───────────────────────────────────────────────────────╮
3564 │ ├───────────────────────────┬───────────────────────────┤
3566 │ ├───────────────────────────┼───────────────────────────┤
3568 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3569 │ │ Yes │ No │ Yes │ No │
3570 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3571 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3572 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3573 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3574 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3575 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3576 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3577 │QN26 Yes QN61 Yes QN57 Row ID │ 33│33│ 34│34│ 35│35│ 36│36│ 37│37│ 38│38│ 39│39│ 40│40│
3578 │ Layer Row ID│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│
3579 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3580 │ No QN57 Row ID │ 41│41│ 42│42│ 43│43│ 44│44│ 45│45│ 46│46│ 47│47│ 48│48│
3581 │ Layer Row ID│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│
3582 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3583 │ No QN61 Yes QN57 Row ID │ 49│49│ 50│50│ 51│51│ 52│52│ 53│53│ 54│54│ 55│55│ 56│56│
3584 │ Layer Row ID│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│
3585 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3586 │ No QN57 Row ID │ 57│57│ 58│58│ 59│59│ 60│60│ 61│61│ 62│62│ 63│63│ 64│64│
3587 │ Layer Row ID│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│
3588 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3592 ╭──────────────────────────────────────┬───────────────────────────────────────────────────────╮
3594 │ ├───────────────────────────┬───────────────────────────┤
3596 │ ├───────────────────────────┼───────────────────────────┤
3598 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3599 │ │ Yes │ No │ Yes │ No │
3600 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3601 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3602 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3603 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3604 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3605 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3606 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3607 │QN26 Yes QN61 Yes QN57 Column ID │ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3608 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3609 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3610 │ No QN57 Column ID │ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3611 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3612 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3613 │ No QN61 Yes QN57 Column ID │ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3614 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3615 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3616 │ No QN57 Column ID │ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3617 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3618 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3622 ╭──────────────────────────────────────┬───────────────────────────────────────────────────────╮
3624 │ ├───────────────────────────┬───────────────────────────┤
3626 │ ├───────────────────────────┼───────────────────────────┤
3628 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3629 │ │ Yes │ No │ Yes │ No │
3630 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3631 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3632 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3633 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3634 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3635 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3636 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3637 │QN26 Yes QN61 Yes QN57 Column ID │ 33│34│ 35│36│ 37│38│ 39│40│ 41│42│ 43│44│ 45│46│ 47│48│
3638 │ Layer Column ID│ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3639 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3640 │ No QN57 Column ID │ 33│34│ 35│36│ 37│38│ 39│40│ 41│42│ 43│44│ 45│46│ 47│48│
3641 │ Layer Column ID│ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3642 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3643 │ No QN61 Yes QN57 Column ID │ 49│50│ 51│52│ 53│54│ 55│56│ 57│58│ 59│60│ 61│62│ 63│64│
3644 │ Layer Column ID│ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3645 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3646 │ No QN57 Column ID │ 49│50│ 51│52│ 53│54│ 55│56│ 57│58│ 59│60│ 61│62│ 63│64│
3647 │ Layer Column ID│ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3648 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3652 AT_SETUP([CTABLES area definitions with CLABELS COLLABELS=OPPOSITE])
3653 AT_KEYWORDS([COLLABELS OPPOSITE])
3654 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3655 AT_DATA([ctables.sps],
3658 /VLABELS VARIABLES=ALL DISPLAY=NAME
3659 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3660 /SLABELS POSITION=ROW
3661 /CLABELS COLLABELS=OPPOSITE
3662 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3663 /SLABELS POSITION=ROW
3664 /CLABELS COLLABELS=OPPOSITE
3665 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3666 /SLABELS POSITION=ROW
3667 /CLABELS COLLABELS=OPPOSITE.
3669 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3672 ╭──────────────────────────────────────────┬───────────────────╮
3674 │ ├─────────┬─────────┤
3676 │ ├─────────┼─────────┤
3678 │ ├────┬────┼────┬────┤
3679 │ │ Yes│ No │ Yes│ No │
3680 │ ├────┼────┼────┼────┤
3681 │ │QN86│QN86│QN86│QN86│
3682 ├──────────────────────────────────────────┼────┼────┼────┼────┤
3683 │QN26 Yes QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3684 │ Layer ID │ 1│ 1│ 1│ 1│
3685 │ Subtable ID│ 1│ 1│ 2│ 2│
3686 │ ╶───────────────┼────┼────┼────┼────┤
3687 │ No Table ID │ 1│ 1│ 1│ 1│
3688 │ Layer ID │ 1│ 1│ 1│ 1│
3689 │ Subtable ID│ 1│ 1│ 2│ 2│
3690 │ ╶───────────────────┼────┼────┼────┼────┤
3691 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3692 │ Layer ID │ 1│ 1│ 1│ 1│
3693 │ Subtable ID│ 3│ 3│ 4│ 4│
3694 │ ╶───────────────┼────┼────┼────┼────┤
3695 │ No Table ID │ 1│ 1│ 1│ 1│
3696 │ Layer ID │ 1│ 1│ 1│ 1│
3697 │ Subtable ID│ 3│ 3│ 4│ 4│
3698 │ ╶────────────────────────────┼────┼────┼────┼────┤
3699 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3700 │ Layer ID │ 1│ 1│ 1│ 1│
3701 │ Subtable ID│ 5│ 5│ 6│ 6│
3702 │ ╶───────────────┼────┼────┼────┼────┤
3703 │ No Table ID │ 1│ 1│ 1│ 1│
3704 │ Layer ID │ 1│ 1│ 1│ 1│
3705 │ Subtable ID│ 5│ 5│ 6│ 6│
3706 │ ╶───────────────────┼────┼────┼────┼────┤
3707 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3708 │ Layer ID │ 1│ 1│ 1│ 1│
3709 │ Subtable ID│ 7│ 7│ 8│ 8│
3710 │ ╶───────────────┼────┼────┼────┼────┤
3711 │ No Table ID │ 1│ 1│ 1│ 1│
3712 │ Layer ID │ 1│ 1│ 1│ 1│
3713 │ Subtable ID│ 7│ 7│ 8│ 8│
3714 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
3715 │ No QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3716 │ Layer ID │ 1│ 1│ 1│ 1│
3717 │ Subtable ID│ 9│ 9│ 10│ 10│
3718 │ ╶───────────────┼────┼────┼────┼────┤
3719 │ No Table ID │ 1│ 1│ 1│ 1│
3720 │ Layer ID │ 1│ 1│ 1│ 1│
3721 │ Subtable ID│ 9│ 9│ 10│ 10│
3722 │ ╶───────────────────┼────┼────┼────┼────┤
3723 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3724 │ Layer ID │ 1│ 1│ 1│ 1│
3725 │ Subtable ID│ 11│ 11│ 12│ 12│
3726 │ ╶───────────────┼────┼────┼────┼────┤
3727 │ No Table ID │ 1│ 1│ 1│ 1│
3728 │ Layer ID │ 1│ 1│ 1│ 1│
3729 │ Subtable ID│ 11│ 11│ 12│ 12│
3730 │ ╶────────────────────────────┼────┼────┼────┼────┤
3731 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3732 │ Layer ID │ 1│ 1│ 1│ 1│
3733 │ Subtable ID│ 13│ 13│ 14│ 14│
3734 │ ╶───────────────┼────┼────┼────┼────┤
3735 │ No Table ID │ 1│ 1│ 1│ 1│
3736 │ Layer ID │ 1│ 1│ 1│ 1│
3737 │ Subtable ID│ 13│ 13│ 14│ 14│
3738 │ ╶───────────────────┼────┼────┼────┼────┤
3739 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3740 │ Layer ID │ 1│ 1│ 1│ 1│
3741 │ Subtable ID│ 15│ 15│ 16│ 16│
3742 │ ╶───────────────┼────┼────┼────┼────┤
3743 │ No Table ID │ 1│ 1│ 1│ 1│
3744 │ Layer ID │ 1│ 1│ 1│ 1│
3745 │ Subtable ID│ 15│ 15│ 16│ 16│
3746 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
3750 ╭──────────────────────────────────────────┬───────────────────╮
3752 │ ├─────────┬─────────┤
3754 │ ├─────────┼─────────┤
3756 │ ├────┬────┼────┬────┤
3757 │ │ Yes│ No │ Yes│ No │
3758 │ ├────┼────┼────┼────┤
3759 │ │QN86│QN86│QN86│QN86│
3760 ├──────────────────────────────────────────┼────┼────┼────┼────┤
3761 │QN26 Yes QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3762 │ Layer ID │ 2│ 2│ 2│ 2│
3763 │ Subtable ID│ 17│ 17│ 18│ 18│
3764 │ ╶───────────────┼────┼────┼────┼────┤
3765 │ No Table ID │ 1│ 1│ 1│ 1│
3766 │ Layer ID │ 2│ 2│ 2│ 2│
3767 │ Subtable ID│ 17│ 17│ 18│ 18│
3768 │ ╶───────────────────┼────┼────┼────┼────┤
3769 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3770 │ Layer ID │ 2│ 2│ 2│ 2│
3771 │ Subtable ID│ 19│ 19│ 20│ 20│
3772 │ ╶───────────────┼────┼────┼────┼────┤
3773 │ No Table ID │ 1│ 1│ 1│ 1│
3774 │ Layer ID │ 2│ 2│ 2│ 2│
3775 │ Subtable ID│ 19│ 19│ 20│ 20│
3776 │ ╶────────────────────────────┼────┼────┼────┼────┤
3777 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3778 │ Layer ID │ 2│ 2│ 2│ 2│
3779 │ Subtable ID│ 21│ 21│ 22│ 22│
3780 │ ╶───────────────┼────┼────┼────┼────┤
3781 │ No Table ID │ 1│ 1│ 1│ 1│
3782 │ Layer ID │ 2│ 2│ 2│ 2│
3783 │ Subtable ID│ 21│ 21│ 22│ 22│
3784 │ ╶───────────────────┼────┼────┼────┼────┤
3785 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3786 │ Layer ID │ 2│ 2│ 2│ 2│
3787 │ Subtable ID│ 23│ 23│ 24│ 24│
3788 │ ╶───────────────┼────┼────┼────┼────┤
3789 │ No Table ID │ 1│ 1│ 1│ 1│
3790 │ Layer ID │ 2│ 2│ 2│ 2│
3791 │ Subtable ID│ 23│ 23│ 24│ 24│
3792 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
3793 │ No QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3794 │ Layer ID │ 2│ 2│ 2│ 2│
3795 │ Subtable ID│ 25│ 25│ 26│ 26│
3796 │ ╶───────────────┼────┼────┼────┼────┤
3797 │ No Table ID │ 1│ 1│ 1│ 1│
3798 │ Layer ID │ 2│ 2│ 2│ 2│
3799 │ Subtable ID│ 25│ 25│ 26│ 26│
3800 │ ╶───────────────────┼────┼────┼────┼────┤
3801 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3802 │ Layer ID │ 2│ 2│ 2│ 2│
3803 │ Subtable ID│ 27│ 27│ 28│ 28│
3804 │ ╶───────────────┼────┼────┼────┼────┤
3805 │ No Table ID │ 1│ 1│ 1│ 1│
3806 │ Layer ID │ 2│ 2│ 2│ 2│
3807 │ Subtable ID│ 27│ 27│ 28│ 28│
3808 │ ╶────────────────────────────┼────┼────┼────┼────┤
3809 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3810 │ Layer ID │ 2│ 2│ 2│ 2│
3811 │ Subtable ID│ 29│ 29│ 30│ 30│
3812 │ ╶───────────────┼────┼────┼────┼────┤
3813 │ No Table ID │ 1│ 1│ 1│ 1│
3814 │ Layer ID │ 2│ 2│ 2│ 2│
3815 │ Subtable ID│ 29│ 29│ 30│ 30│
3816 │ ╶───────────────────┼────┼────┼────┼────┤
3817 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3818 │ Layer ID │ 2│ 2│ 2│ 2│
3819 │ Subtable ID│ 31│ 31│ 32│ 32│
3820 │ ╶───────────────┼────┼────┼────┼────┤
3821 │ No Table ID │ 1│ 1│ 1│ 1│
3822 │ Layer ID │ 2│ 2│ 2│ 2│
3823 │ Subtable ID│ 31│ 31│ 32│ 32│
3824 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
3828 ╭───────────────────────────────────────────┬───────────────────╮
3830 │ ├─────────┬─────────┤
3832 │ ├─────────┼─────────┤
3834 │ ├────┬────┼────┬────┤
3835 │ │ Yes│ No │ Yes│ No │
3836 │ ├────┼────┼────┼────┤
3837 │ │QN86│QN86│QN86│QN86│
3838 ├───────────────────────────────────────────┼────┼────┼────┼────┤
3839 │QN26 Yes QN61 Yes QN57 Yes Yes Row ID │ 1│ 1│ 3│ 3│
3840 │ Layer Row ID│ 1│ 1│ 1│ 1│
3841 │ ╶────────────────┼────┼────┼────┼────┤
3842 │ No Row ID │ 2│ 2│ 4│ 4│
3843 │ Layer Row ID│ 2│ 2│ 2│ 2│
3844 │ ╶────────────────────┼────┼────┼────┼────┤
3845 │ No Yes Row ID │ 5│ 5│ 7│ 7│
3846 │ Layer Row ID│ 3│ 3│ 3│ 3│
3847 │ ╶────────────────┼────┼────┼────┼────┤
3848 │ No Row ID │ 6│ 6│ 8│ 8│
3849 │ Layer Row ID│ 4│ 4│ 4│ 4│
3850 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3851 │ No QN57 Yes Yes Row ID │ 9│ 9│ 11│ 11│
3852 │ Layer Row ID│ 5│ 5│ 5│ 5│
3853 │ ╶────────────────┼────┼────┼────┼────┤
3854 │ No Row ID │ 10│ 10│ 12│ 12│
3855 │ Layer Row ID│ 6│ 6│ 6│ 6│
3856 │ ╶────────────────────┼────┼────┼────┼────┤
3857 │ No Yes Row ID │ 13│ 13│ 15│ 15│
3858 │ Layer Row ID│ 7│ 7│ 7│ 7│
3859 │ ╶────────────────┼────┼────┼────┼────┤
3860 │ No Row ID │ 14│ 14│ 16│ 16│
3861 │ Layer Row ID│ 8│ 8│ 8│ 8│
3862 │ ╶──────────────────────────────────────┼────┼────┼────┼────┤
3863 │ No QN61 Yes QN57 Yes Yes Row ID │ 17│ 17│ 19│ 19│
3864 │ Layer Row ID│ 9│ 9│ 9│ 9│
3865 │ ╶────────────────┼────┼────┼────┼────┤
3866 │ No Row ID │ 18│ 18│ 20│ 20│
3867 │ Layer Row ID│ 10│ 10│ 10│ 10│
3868 │ ╶────────────────────┼────┼────┼────┼────┤
3869 │ No Yes Row ID │ 21│ 21│ 23│ 23│
3870 │ Layer Row ID│ 11│ 11│ 11│ 11│
3871 │ ╶────────────────┼────┼────┼────┼────┤
3872 │ No Row ID │ 22│ 22│ 24│ 24│
3873 │ Layer Row ID│ 12│ 12│ 12│ 12│
3874 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3875 │ No QN57 Yes Yes Row ID │ 25│ 25│ 27│ 27│
3876 │ Layer Row ID│ 13│ 13│ 13│ 13│
3877 │ ╶────────────────┼────┼────┼────┼────┤
3878 │ No Row ID │ 26│ 26│ 28│ 28│
3879 │ Layer Row ID│ 14│ 14│ 14│ 14│
3880 │ ╶────────────────────┼────┼────┼────┼────┤
3881 │ No Yes Row ID │ 29│ 29│ 31│ 31│
3882 │ Layer Row ID│ 15│ 15│ 15│ 15│
3883 │ ╶────────────────┼────┼────┼────┼────┤
3884 │ No Row ID │ 30│ 30│ 32│ 32│
3885 │ Layer Row ID│ 16│ 16│ 16│ 16│
3886 ╰───────────────────────────────────────────┴────┴────┴────┴────╯
3890 ╭───────────────────────────────────────────┬───────────────────╮
3892 │ ├─────────┬─────────┤
3894 │ ├─────────┼─────────┤
3896 │ ├────┬────┼────┬────┤
3897 │ │ Yes│ No │ Yes│ No │
3898 │ ├────┼────┼────┼────┤
3899 │ │QN86│QN86│QN86│QN86│
3900 ├───────────────────────────────────────────┼────┼────┼────┼────┤
3901 │QN26 Yes QN61 Yes QN57 Yes Yes Row ID │ 33│ 33│ 35│ 35│
3902 │ Layer Row ID│ 17│ 17│ 17│ 17│
3903 │ ╶────────────────┼────┼────┼────┼────┤
3904 │ No Row ID │ 34│ 34│ 36│ 36│
3905 │ Layer Row ID│ 18│ 18│ 18│ 18│
3906 │ ╶────────────────────┼────┼────┼────┼────┤
3907 │ No Yes Row ID │ 37│ 37│ 39│ 39│
3908 │ Layer Row ID│ 19│ 19│ 19│ 19│
3909 │ ╶────────────────┼────┼────┼────┼────┤
3910 │ No Row ID │ 38│ 38│ 40│ 40│
3911 │ Layer Row ID│ 20│ 20│ 20│ 20│
3912 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3913 │ No QN57 Yes Yes Row ID │ 41│ 41│ 43│ 43│
3914 │ Layer Row ID│ 21│ 21│ 21│ 21│
3915 │ ╶────────────────┼────┼────┼────┼────┤
3916 │ No Row ID │ 42│ 42│ 44│ 44│
3917 │ Layer Row ID│ 22│ 22│ 22│ 22│
3918 │ ╶────────────────────┼────┼────┼────┼────┤
3919 │ No Yes Row ID │ 45│ 45│ 47│ 47│
3920 │ Layer Row ID│ 23│ 23│ 23│ 23│
3921 │ ╶────────────────┼────┼────┼────┼────┤
3922 │ No Row ID │ 46│ 46│ 48│ 48│
3923 │ Layer Row ID│ 24│ 24│ 24│ 24│
3924 │ ╶──────────────────────────────────────┼────┼────┼────┼────┤
3925 │ No QN61 Yes QN57 Yes Yes Row ID │ 49│ 49│ 51│ 51│
3926 │ Layer Row ID│ 25│ 25│ 25│ 25│
3927 │ ╶────────────────┼────┼────┼────┼────┤
3928 │ No Row ID │ 50│ 50│ 52│ 52│
3929 │ Layer Row ID│ 26│ 26│ 26│ 26│
3930 │ ╶────────────────────┼────┼────┼────┼────┤
3931 │ No Yes Row ID │ 53│ 53│ 55│ 55│
3932 │ Layer Row ID│ 27│ 27│ 27│ 27│
3933 │ ╶────────────────┼────┼────┼────┼────┤
3934 │ No Row ID │ 54│ 54│ 56│ 56│
3935 │ Layer Row ID│ 28│ 28│ 28│ 28│
3936 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3937 │ No QN57 Yes Yes Row ID │ 57│ 57│ 59│ 59│
3938 │ Layer Row ID│ 29│ 29│ 29│ 29│
3939 │ ╶────────────────┼────┼────┼────┼────┤
3940 │ No Row ID │ 58│ 58│ 60│ 60│
3941 │ Layer Row ID│ 30│ 30│ 30│ 30│
3942 │ ╶────────────────────┼────┼────┼────┼────┤
3943 │ No Yes Row ID │ 61│ 61│ 63│ 63│
3944 │ Layer Row ID│ 31│ 31│ 31│ 31│
3945 │ ╶────────────────┼────┼────┼────┼────┤
3946 │ No Row ID │ 62│ 62│ 64│ 64│
3947 │ Layer Row ID│ 32│ 32│ 32│ 32│
3948 ╰───────────────────────────────────────────┴────┴────┴────┴────╯
3952 ╭──────────────────────────────────────────────┬───────────────────╮
3954 │ ├─────────┬─────────┤
3956 │ ├─────────┼─────────┤
3958 │ ├────┬────┼────┬────┤
3959 │ │ Yes│ No │ Yes│ No │
3960 │ ├────┼────┼────┼────┤
3961 │ │QN86│QN86│QN86│QN86│
3962 ├──────────────────────────────────────────────┼────┼────┼────┼────┤
3963 │QN26 Yes QN61 Yes QN57 Yes Yes Column ID │ 1│ 2│ 3│ 4│
3964 │ Layer Column ID│ 1│ 2│ 3│ 4│
3965 │ ╶───────────────────┼────┼────┼────┼────┤
3966 │ No Column ID │ 1│ 2│ 3│ 4│
3967 │ Layer Column ID│ 1│ 2│ 3│ 4│
3968 │ ╶───────────────────────┼────┼────┼────┼────┤
3969 │ No Yes Column ID │ 5│ 6│ 7│ 8│
3970 │ Layer Column ID│ 1│ 2│ 3│ 4│
3971 │ ╶───────────────────┼────┼────┼────┼────┤
3972 │ No Column ID │ 5│ 6│ 7│ 8│
3973 │ Layer Column ID│ 1│ 2│ 3│ 4│
3974 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3975 │ No QN57 Yes Yes Column ID │ 9│ 10│ 11│ 12│
3976 │ Layer Column ID│ 1│ 2│ 3│ 4│
3977 │ ╶───────────────────┼────┼────┼────┼────┤
3978 │ No Column ID │ 9│ 10│ 11│ 12│
3979 │ Layer Column ID│ 1│ 2│ 3│ 4│
3980 │ ╶───────────────────────┼────┼────┼────┼────┤
3981 │ No Yes Column ID │ 13│ 14│ 15│ 16│
3982 │ Layer Column ID│ 1│ 2│ 3│ 4│
3983 │ ╶───────────────────┼────┼────┼────┼────┤
3984 │ No Column ID │ 13│ 14│ 15│ 16│
3985 │ Layer Column ID│ 1│ 2│ 3│ 4│
3986 │ ╶─────────────────────────────────────────┼────┼────┼────┼────┤
3987 │ No QN61 Yes QN57 Yes Yes Column ID │ 17│ 18│ 19│ 20│
3988 │ Layer Column ID│ 1│ 2│ 3│ 4│
3989 │ ╶───────────────────┼────┼────┼────┼────┤
3990 │ No Column ID │ 17│ 18│ 19│ 20│
3991 │ Layer Column ID│ 1│ 2│ 3│ 4│
3992 │ ╶───────────────────────┼────┼────┼────┼────┤
3993 │ No Yes Column ID │ 21│ 22│ 23│ 24│
3994 │ Layer Column ID│ 1│ 2│ 3│ 4│
3995 │ ╶───────────────────┼────┼────┼────┼────┤
3996 │ No Column ID │ 21│ 22│ 23│ 24│
3997 │ Layer Column ID│ 1│ 2│ 3│ 4│
3998 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3999 │ No QN57 Yes Yes Column ID │ 25│ 26│ 27│ 28│
4000 │ Layer Column ID│ 1│ 2│ 3│ 4│
4001 │ ╶───────────────────┼────┼────┼────┼────┤
4002 │ No Column ID │ 25│ 26│ 27│ 28│
4003 │ Layer Column ID│ 1│ 2│ 3│ 4│
4004 │ ╶───────────────────────┼────┼────┼────┼────┤
4005 │ No Yes Column ID │ 29│ 30│ 31│ 32│
4006 │ Layer Column ID│ 1│ 2│ 3│ 4│
4007 │ ╶───────────────────┼────┼────┼────┼────┤
4008 │ No Column ID │ 29│ 30│ 31│ 32│
4009 │ Layer Column ID│ 1│ 2│ 3│ 4│
4010 ╰──────────────────────────────────────────────┴────┴────┴────┴────╯
4014 ╭──────────────────────────────────────────────┬───────────────────╮
4016 │ ├─────────┬─────────┤
4018 │ ├─────────┼─────────┤
4020 │ ├────┬────┼────┬────┤
4021 │ │ Yes│ No │ Yes│ No │
4022 │ ├────┼────┼────┼────┤
4023 │ │QN86│QN86│QN86│QN86│
4024 ├──────────────────────────────────────────────┼────┼────┼────┼────┤
4025 │QN26 Yes QN61 Yes QN57 Yes Yes Column ID │ 33│ 34│ 35│ 36│
4026 │ Layer Column ID│ 5│ 6│ 7│ 8│
4027 │ ╶───────────────────┼────┼────┼────┼────┤
4028 │ No Column ID │ 33│ 34│ 35│ 36│
4029 │ Layer Column ID│ 5│ 6│ 7│ 8│
4030 │ ╶───────────────────────┼────┼────┼────┼────┤
4031 │ No Yes Column ID │ 37│ 38│ 39│ 40│
4032 │ Layer Column ID│ 5│ 6│ 7│ 8│
4033 │ ╶───────────────────┼────┼────┼────┼────┤
4034 │ No Column ID │ 37│ 38│ 39│ 40│
4035 │ Layer Column ID│ 5│ 6│ 7│ 8│
4036 │ ╶────────────────────────────────┼────┼────┼────┼────┤
4037 │ No QN57 Yes Yes Column ID │ 41│ 42│ 43│ 44│
4038 │ Layer Column ID│ 5│ 6│ 7│ 8│
4039 │ ╶───────────────────┼────┼────┼────┼────┤
4040 │ No Column ID │ 41│ 42│ 43│ 44│
4041 │ Layer Column ID│ 5│ 6│ 7│ 8│
4042 │ ╶───────────────────────┼────┼────┼────┼────┤
4043 │ No Yes Column ID │ 45│ 46│ 47│ 48│
4044 │ Layer Column ID│ 5│ 6│ 7│ 8│
4045 │ ╶───────────────────┼────┼────┼────┼────┤
4046 │ No Column ID │ 45│ 46│ 47│ 48│
4047 │ Layer Column ID│ 5│ 6│ 7│ 8│
4048 │ ╶─────────────────────────────────────────┼────┼────┼────┼────┤
4049 │ No QN61 Yes QN57 Yes Yes Column ID │ 49│ 50│ 51│ 52│
4050 │ Layer Column ID│ 5│ 6│ 7│ 8│
4051 │ ╶───────────────────┼────┼────┼────┼────┤
4052 │ No Column ID │ 49│ 50│ 51│ 52│
4053 │ Layer Column ID│ 5│ 6│ 7│ 8│
4054 │ ╶───────────────────────┼────┼────┼────┼────┤
4055 │ No Yes Column ID │ 53│ 54│ 55│ 56│
4056 │ Layer Column ID│ 5│ 6│ 7│ 8│
4057 │ ╶───────────────────┼────┼────┼────┼────┤
4058 │ No Column ID │ 53│ 54│ 55│ 56│
4059 │ Layer Column ID│ 5│ 6│ 7│ 8│
4060 │ ╶────────────────────────────────┼────┼────┼────┼────┤
4061 │ No QN57 Yes Yes Column ID │ 57│ 58│ 59│ 60│
4062 │ Layer Column ID│ 5│ 6│ 7│ 8│
4063 │ ╶───────────────────┼────┼────┼────┼────┤
4064 │ No Column ID │ 57│ 58│ 59│ 60│
4065 │ Layer Column ID│ 5│ 6│ 7│ 8│
4066 │ ╶───────────────────────┼────┼────┼────┼────┤
4067 │ No Yes Column ID │ 61│ 62│ 63│ 64│
4068 │ Layer Column ID│ 5│ 6│ 7│ 8│
4069 │ ╶───────────────────┼────┼────┼────┼────┤
4070 │ No Column ID │ 61│ 62│ 63│ 64│
4071 │ Layer Column ID│ 5│ 6│ 7│ 8│
4072 ╰──────────────────────────────────────────────┴────┴────┴────┴────╯
4076 AT_SETUP([CTABLES area definitions with CLABELS ROWLABELS=LAYER])
4077 AT_KEYWORDS([ROWLABELS LAYER])
4078 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4079 AT_DATA([ctables.sps],
4082 /VLABELS VARIABLES=ALL DISPLAY=NAME
4083 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
4084 /SLABELS POSITION=ROW
4085 /CLABELS ROWLABELS=LAYER
4086 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
4087 /SLABELS POSITION=ROW
4088 /CLABELS ROWLABELS=LAYER
4089 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
4090 /SLABELS POSITION=ROW
4091 /CLABELS ROWLABELS=LAYER.
4093 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
4097 ╭──────────────────────────────────┬───────────────────────────╮
4099 │ ├─────────────┬─────────────┤
4101 │ ├─────────────┼─────────────┤
4103 │ ├──────┬──────┼──────┬──────┤
4104 │ │ Yes │ No │ Yes │ No │
4105 │ ├──────┼──────┼──────┼──────┤
4106 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4107 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4108 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4109 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4110 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4111 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4112 │ Subtable ID│ 1│ 1│ 3│ 3│ 5│ 5│ 7│ 7│
4113 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4114 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4115 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4116 │ Subtable ID│ 1│ 1│ 3│ 3│ 5│ 5│ 7│ 7│
4117 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4118 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4119 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4120 │ Subtable ID│ 9│ 9│ 11│11│ 13│13│ 15│15│
4121 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4122 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4123 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4124 │ Subtable ID│ 9│ 9│ 11│11│ 13│13│ 15│15│
4125 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4130 ╭──────────────────────────────────┬───────────────────────────╮
4132 │ ├─────────────┬─────────────┤
4134 │ ├─────────────┼─────────────┤
4136 │ ├──────┬──────┼──────┬──────┤
4137 │ │ Yes │ No │ Yes │ No │
4138 │ ├──────┼──────┼──────┼──────┤
4139 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4140 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4141 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4142 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4143 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4144 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4145 │ Subtable ID│ 2│ 2│ 4│ 4│ 6│ 6│ 8│ 8│
4146 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4147 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4148 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4149 │ Subtable ID│ 2│ 2│ 4│ 4│ 6│ 6│ 8│ 8│
4150 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4151 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4152 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4153 │ Subtable ID│ 10│10│ 12│12│ 14│14│ 16│16│
4154 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4155 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4156 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4157 │ Subtable ID│ 10│10│ 12│12│ 14│14│ 16│16│
4158 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4163 ╭──────────────────────────────────┬───────────────────────────╮
4165 │ ├─────────────┬─────────────┤
4167 │ ├─────────────┼─────────────┤
4169 │ ├──────┬──────┼──────┬──────┤
4170 │ │ Yes │ No │ Yes │ No │
4171 │ ├──────┼──────┼──────┼──────┤
4172 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4173 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4174 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4175 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4176 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4177 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4178 │ Subtable ID│ 17│17│ 19│19│ 21│21│ 23│23│
4179 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4180 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4181 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4182 │ Subtable ID│ 17│17│ 19│19│ 21│21│ 23│23│
4183 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4184 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4185 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4186 │ Subtable ID│ 25│25│ 27│27│ 29│29│ 31│31│
4187 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4188 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4189 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4190 │ Subtable ID│ 25│25│ 27│27│ 29│29│ 31│31│
4191 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4196 ╭──────────────────────────────────┬───────────────────────────╮
4198 │ ├─────────────┬─────────────┤
4200 │ ├─────────────┼─────────────┤
4202 │ ├──────┬──────┼──────┬──────┤
4203 │ │ Yes │ No │ Yes │ No │
4204 │ ├──────┼──────┼──────┼──────┤
4205 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4206 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4207 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4208 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4209 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4210 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4211 │ Subtable ID│ 18│18│ 20│20│ 22│22│ 24│24│
4212 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4213 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4214 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4215 │ Subtable ID│ 18│18│ 20│20│ 22│22│ 24│24│
4216 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4217 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4218 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4219 │ Subtable ID│ 26│26│ 28│28│ 30│30│ 32│32│
4220 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4221 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4222 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4223 │ Subtable ID│ 26│26│ 28│28│ 30│30│ 32│32│
4224 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4229 ╭───────────────────────────────────┬───────────────────────────╮
4231 │ ├─────────────┬─────────────┤
4233 │ ├─────────────┼─────────────┤
4235 │ ├──────┬──────┼──────┬──────┤
4236 │ │ Yes │ No │ Yes │ No │
4237 │ ├──────┼──────┼──────┼──────┤
4238 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4239 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4240 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4241 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4242 │QN26 Yes QN61 Yes QN57 Row ID │ 1│ 1│ 3│ 3│ 5│ 5│ 7│ 7│
4243 │ Layer Row ID│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4244 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4245 │ No QN57 Row ID │ 9│ 9│ 11│11│ 13│13│ 15│15│
4246 │ Layer Row ID│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4247 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4248 │ No QN61 Yes QN57 Row ID │ 17│17│ 19│19│ 21│21│ 23│23│
4249 │ Layer Row ID│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│
4250 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4251 │ No QN57 Row ID │ 25│25│ 27│27│ 29│29│ 31│31│
4252 │ Layer Row ID│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│
4253 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4258 ╭───────────────────────────────────┬───────────────────────────╮
4260 │ ├─────────────┬─────────────┤
4262 │ ├─────────────┼─────────────┤
4264 │ ├──────┬──────┼──────┬──────┤
4265 │ │ Yes │ No │ Yes │ No │
4266 │ ├──────┼──────┼──────┼──────┤
4267 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4268 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4269 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4270 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4271 │QN26 Yes QN61 Yes QN57 Row ID │ 2│ 2│ 4│ 4│ 6│ 6│ 8│ 8│
4272 │ Layer Row ID│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4273 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4274 │ No QN57 Row ID │ 10│10│ 12│12│ 14│14│ 16│16│
4275 │ Layer Row ID│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4276 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4277 │ No QN61 Yes QN57 Row ID │ 18│18│ 20│20│ 22│22│ 24│24│
4278 │ Layer Row ID│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│
4279 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4280 │ No QN57 Row ID │ 26│26│ 28│28│ 30│30│ 32│32│
4281 │ Layer Row ID│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│
4282 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4287 ╭───────────────────────────────────┬───────────────────────────╮
4289 │ ├─────────────┬─────────────┤
4291 │ ├─────────────┼─────────────┤
4293 │ ├──────┬──────┼──────┬──────┤
4294 │ │ Yes │ No │ Yes │ No │
4295 │ ├──────┼──────┼──────┼──────┤
4296 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4297 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4298 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4299 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4300 │QN26 Yes QN61 Yes QN57 Row ID │ 33│33│ 35│35│ 37│37│ 39│39│
4301 │ Layer Row ID│ 9│ 9│ 9│ 9│ 9│ 9│ 9│ 9│
4302 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4303 │ No QN57 Row ID │ 41│41│ 43│43│ 45│45│ 47│47│
4304 │ Layer Row ID│ 11│11│ 11│11│ 11│11│ 11│11│
4305 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4306 │ No QN61 Yes QN57 Row ID │ 49│49│ 51│51│ 53│53│ 55│55│
4307 │ Layer Row ID│ 13│13│ 13│13│ 13│13│ 13│13│
4308 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4309 │ No QN57 Row ID │ 57│57│ 59│59│ 61│61│ 63│63│
4310 │ Layer Row ID│ 15│15│ 15│15│ 15│15│ 15│15│
4311 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4316 ╭───────────────────────────────────┬───────────────────────────╮
4318 │ ├─────────────┬─────────────┤
4320 │ ├─────────────┼─────────────┤
4322 │ ├──────┬──────┼──────┬──────┤
4323 │ │ Yes │ No │ Yes │ No │
4324 │ ├──────┼──────┼──────┼──────┤
4325 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4326 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4327 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4328 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4329 │QN26 Yes QN61 Yes QN57 Row ID │ 34│34│ 36│36│ 38│38│ 40│40│
4330 │ Layer Row ID│ 10│10│ 10│10│ 10│10│ 10│10│
4331 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4332 │ No QN57 Row ID │ 42│42│ 44│44│ 46│46│ 48│48│
4333 │ Layer Row ID│ 12│12│ 12│12│ 12│12│ 12│12│
4334 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4335 │ No QN61 Yes QN57 Row ID │ 50│50│ 52│52│ 54│54│ 56│56│
4336 │ Layer Row ID│ 14│14│ 14│14│ 14│14│ 14│14│
4337 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4338 │ No QN57 Row ID │ 58│58│ 60│60│ 62│62│ 64│64│
4339 │ Layer Row ID│ 16│16│ 16│16│ 16│16│ 16│16│
4340 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4345 ╭──────────────────────────────────────┬───────────────────────────╮
4347 │ ├─────────────┬─────────────┤
4349 │ ├─────────────┼─────────────┤
4351 │ ├──────┬──────┼──────┬──────┤
4352 │ │ Yes │ No │ Yes │ No │
4353 │ ├──────┼──────┼──────┼──────┤
4354 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4355 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4356 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4357 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4358 │QN26 Yes QN61 Yes QN57 Column ID │ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4359 │ Layer Column ID│ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4360 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4361 │ No QN57 Column ID │ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4362 │ Layer Column ID│ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4363 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4364 │ No QN61 Yes QN57 Column ID │ 17│19│ 21│23│ 25│27│ 29│31│
4365 │ Layer Column ID│ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4366 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4367 │ No QN57 Column ID │ 17│19│ 21│23│ 25│27│ 29│31│
4368 │ Layer Column ID│ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4369 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4374 ╭──────────────────────────────────────┬───────────────────────────╮
4376 │ ├─────────────┬─────────────┤
4378 │ ├─────────────┼─────────────┤
4380 │ ├──────┬──────┼──────┬──────┤
4381 │ │ Yes │ No │ Yes │ No │
4382 │ ├──────┼──────┼──────┼──────┤
4383 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4384 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4385 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4386 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4387 │QN26 Yes QN61 Yes QN57 Column ID │ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4388 │ Layer Column ID│ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4389 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4390 │ No QN57 Column ID │ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4391 │ Layer Column ID│ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4392 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4393 │ No QN61 Yes QN57 Column ID │ 18│20│ 22│24│ 26│28│ 30│32│
4394 │ Layer Column ID│ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4395 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4396 │ No QN57 Column ID │ 18│20│ 22│24│ 26│28│ 30│32│
4397 │ Layer Column ID│ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4398 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4403 ╭──────────────────────────────────────┬───────────────────────────╮
4405 │ ├─────────────┬─────────────┤
4407 │ ├─────────────┼─────────────┤
4409 │ ├──────┬──────┼──────┬──────┤
4410 │ │ Yes │ No │ Yes │ No │
4411 │ ├──────┼──────┼──────┼──────┤
4412 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4413 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4414 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4415 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4416 │QN26 Yes QN61 Yes QN57 Column ID │ 33│35│ 37│39│ 41│43│ 45│47│
4417 │ Layer Column ID│ 17│19│ 21│23│ 25│27│ 29│31│
4418 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4419 │ No QN57 Column ID │ 33│35│ 37│39│ 41│43│ 45│47│
4420 │ Layer Column ID│ 17│19│ 21│23│ 25│27│ 29│31│
4421 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4422 │ No QN61 Yes QN57 Column ID │ 49│51│ 53│55│ 57│59│ 61│63│
4423 │ Layer Column ID│ 17│19│ 21│23│ 25│27│ 29│31│
4424 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4425 │ No QN57 Column ID │ 49│51│ 53│55│ 57│59│ 61│63│
4426 │ Layer Column ID│ 17│19│ 21│23│ 25│27│ 29│31│
4427 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4432 ╭──────────────────────────────────────┬───────────────────────────╮
4434 │ ├─────────────┬─────────────┤
4436 │ ├─────────────┼─────────────┤
4438 │ ├──────┬──────┼──────┬──────┤
4439 │ │ Yes │ No │ Yes │ No │
4440 │ ├──────┼──────┼──────┼──────┤
4441 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4442 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4443 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4444 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4445 │QN26 Yes QN61 Yes QN57 Column ID │ 34│36│ 38│40│ 42│44│ 46│48│
4446 │ Layer Column ID│ 18│20│ 22│24│ 26│28│ 30│32│
4447 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4448 │ No QN57 Column ID │ 34│36│ 38│40│ 42│44│ 46│48│
4449 │ Layer Column ID│ 18│20│ 22│24│ 26│28│ 30│32│
4450 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4451 │ No QN61 Yes QN57 Column ID │ 50│52│ 54│56│ 58│60│ 62│64│
4452 │ Layer Column ID│ 18│20│ 22│24│ 26│28│ 30│32│
4453 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4454 │ No QN57 Column ID │ 50│52│ 54│56│ 58│60│ 62│64│
4455 │ Layer Column ID│ 18│20│ 22│24│ 26│28│ 30│32│
4456 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4460 AT_SETUP([CTABLES area definitions with CLABELS COLLABELS=LAYER])
4461 AT_KEYWORDS([COLLABELS LAYER])
4462 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4463 AT_DATA([ctables.sps],
4466 /VLABELS VARIABLES=ALL DISPLAY=NAME
4467 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
4468 /SLABELS POSITION=ROW
4469 /CLABELS COLLABELS=LAYER
4470 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
4471 /SLABELS POSITION=ROW
4472 /CLABELS COLLABELS=LAYER
4473 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
4474 /SLABELS POSITION=ROW
4475 /CLABELS COLLABELS=LAYER.
4477 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
4481 ╭──────────────────────────────────────┬───────────────────╮
4483 │ ├─────────┬─────────┤
4485 │ ├─────────┼─────────┤
4487 │ ├────┬────┼────┬────┤
4488 │ │ Yes│ No │ Yes│ No │
4489 │ ├────┼────┼────┼────┤
4490 │ │QN86│QN86│QN86│QN86│
4491 ├──────────────────────────────────────┼────┼────┼────┼────┤
4492 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4493 │ Layer ID │ 1│ 1│ 1│ 1│
4494 │ Subtable ID│ 1│ 1│ 3│ 3│
4495 │ ╶───────────────┼────┼────┼────┼────┤
4496 │ No Table ID │ 1│ 1│ 1│ 1│
4497 │ Layer ID │ 1│ 1│ 1│ 1│
4498 │ Subtable ID│ 1│ 1│ 3│ 3│
4499 │ ╶────────────────────────┼────┼────┼────┼────┤
4500 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4501 │ Layer ID │ 1│ 1│ 1│ 1│
4502 │ Subtable ID│ 5│ 5│ 7│ 7│
4503 │ ╶───────────────┼────┼────┼────┼────┤
4504 │ No Table ID │ 1│ 1│ 1│ 1│
4505 │ Layer ID │ 1│ 1│ 1│ 1│
4506 │ Subtable ID│ 5│ 5│ 7│ 7│
4507 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4508 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4509 │ Layer ID │ 1│ 1│ 1│ 1│
4510 │ Subtable ID│ 9│ 9│ 11│ 11│
4511 │ ╶───────────────┼────┼────┼────┼────┤
4512 │ No Table ID │ 1│ 1│ 1│ 1│
4513 │ Layer ID │ 1│ 1│ 1│ 1│
4514 │ Subtable ID│ 9│ 9│ 11│ 11│
4515 │ ╶────────────────────────┼────┼────┼────┼────┤
4516 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4517 │ Layer ID │ 1│ 1│ 1│ 1│
4518 │ Subtable ID│ 13│ 13│ 15│ 15│
4519 │ ╶───────────────┼────┼────┼────┼────┤
4520 │ No Table ID │ 1│ 1│ 1│ 1│
4521 │ Layer ID │ 1│ 1│ 1│ 1│
4522 │ Subtable ID│ 13│ 13│ 15│ 15│
4523 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4528 ╭──────────────────────────────────────┬───────────────────╮
4530 │ ├─────────┬─────────┤
4532 │ ├─────────┼─────────┤
4534 │ ├────┬────┼────┬────┤
4535 │ │ Yes│ No │ Yes│ No │
4536 │ ├────┼────┼────┼────┤
4537 │ │QN86│QN86│QN86│QN86│
4538 ├──────────────────────────────────────┼────┼────┼────┼────┤
4539 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4540 │ Layer ID │ 2│ 2│ 2│ 2│
4541 │ Subtable ID│ 2│ 2│ 4│ 4│
4542 │ ╶───────────────┼────┼────┼────┼────┤
4543 │ No Table ID │ 1│ 1│ 1│ 1│
4544 │ Layer ID │ 2│ 2│ 2│ 2│
4545 │ Subtable ID│ 2│ 2│ 4│ 4│
4546 │ ╶────────────────────────┼────┼────┼────┼────┤
4547 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4548 │ Layer ID │ 2│ 2│ 2│ 2│
4549 │ Subtable ID│ 6│ 6│ 8│ 8│
4550 │ ╶───────────────┼────┼────┼────┼────┤
4551 │ No Table ID │ 1│ 1│ 1│ 1│
4552 │ Layer ID │ 2│ 2│ 2│ 2│
4553 │ Subtable ID│ 6│ 6│ 8│ 8│
4554 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4555 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4556 │ Layer ID │ 2│ 2│ 2│ 2│
4557 │ Subtable ID│ 10│ 10│ 12│ 12│
4558 │ ╶───────────────┼────┼────┼────┼────┤
4559 │ No Table ID │ 1│ 1│ 1│ 1│
4560 │ Layer ID │ 2│ 2│ 2│ 2│
4561 │ Subtable ID│ 10│ 10│ 12│ 12│
4562 │ ╶────────────────────────┼────┼────┼────┼────┤
4563 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4564 │ Layer ID │ 2│ 2│ 2│ 2│
4565 │ Subtable ID│ 14│ 14│ 16│ 16│
4566 │ ╶───────────────┼────┼────┼────┼────┤
4567 │ No Table ID │ 1│ 1│ 1│ 1│
4568 │ Layer ID │ 2│ 2│ 2│ 2│
4569 │ Subtable ID│ 14│ 14│ 16│ 16│
4570 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4575 ╭──────────────────────────────────────┬───────────────────╮
4577 │ ├─────────┬─────────┤
4579 │ ├─────────┼─────────┤
4581 │ ├────┬────┼────┬────┤
4582 │ │ Yes│ No │ Yes│ No │
4583 │ ├────┼────┼────┼────┤
4584 │ │QN86│QN86│QN86│QN86│
4585 ├──────────────────────────────────────┼────┼────┼────┼────┤
4586 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4587 │ Layer ID │ 3│ 3│ 3│ 3│
4588 │ Subtable ID│ 17│ 17│ 19│ 19│
4589 │ ╶───────────────┼────┼────┼────┼────┤
4590 │ No Table ID │ 1│ 1│ 1│ 1│
4591 │ Layer ID │ 3│ 3│ 3│ 3│
4592 │ Subtable ID│ 17│ 17│ 19│ 19│
4593 │ ╶────────────────────────┼────┼────┼────┼────┤
4594 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4595 │ Layer ID │ 3│ 3│ 3│ 3│
4596 │ Subtable ID│ 21│ 21│ 23│ 23│
4597 │ ╶───────────────┼────┼────┼────┼────┤
4598 │ No Table ID │ 1│ 1│ 1│ 1│
4599 │ Layer ID │ 3│ 3│ 3│ 3│
4600 │ Subtable ID│ 21│ 21│ 23│ 23│
4601 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4602 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4603 │ Layer ID │ 3│ 3│ 3│ 3│
4604 │ Subtable ID│ 25│ 25│ 27│ 27│
4605 │ ╶───────────────┼────┼────┼────┼────┤
4606 │ No Table ID │ 1│ 1│ 1│ 1│
4607 │ Layer ID │ 3│ 3│ 3│ 3│
4608 │ Subtable ID│ 25│ 25│ 27│ 27│
4609 │ ╶────────────────────────┼────┼────┼────┼────┤
4610 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4611 │ Layer ID │ 3│ 3│ 3│ 3│
4612 │ Subtable ID│ 29│ 29│ 31│ 31│
4613 │ ╶───────────────┼────┼────┼────┼────┤
4614 │ No Table ID │ 1│ 1│ 1│ 1│
4615 │ Layer ID │ 3│ 3│ 3│ 3│
4616 │ Subtable ID│ 29│ 29│ 31│ 31│
4617 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4622 ╭──────────────────────────────────────┬───────────────────╮
4624 │ ├─────────┬─────────┤
4626 │ ├─────────┼─────────┤
4628 │ ├────┬────┼────┬────┤
4629 │ │ Yes│ No │ Yes│ No │
4630 │ ├────┼────┼────┼────┤
4631 │ │QN86│QN86│QN86│QN86│
4632 ├──────────────────────────────────────┼────┼────┼────┼────┤
4633 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4634 │ Layer ID │ 4│ 4│ 4│ 4│
4635 │ Subtable ID│ 18│ 18│ 20│ 20│
4636 │ ╶───────────────┼────┼────┼────┼────┤
4637 │ No Table ID │ 1│ 1│ 1│ 1│
4638 │ Layer ID │ 4│ 4│ 4│ 4│
4639 │ Subtable ID│ 18│ 18│ 20│ 20│
4640 │ ╶────────────────────────┼────┼────┼────┼────┤
4641 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4642 │ Layer ID │ 4│ 4│ 4│ 4│
4643 │ Subtable ID│ 22│ 22│ 24│ 24│
4644 │ ╶───────────────┼────┼────┼────┼────┤
4645 │ No Table ID │ 1│ 1│ 1│ 1│
4646 │ Layer ID │ 4│ 4│ 4│ 4│
4647 │ Subtable ID│ 22│ 22│ 24│ 24│
4648 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4649 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4650 │ Layer ID │ 4│ 4│ 4│ 4│
4651 │ Subtable ID│ 26│ 26│ 28│ 28│
4652 │ ╶───────────────┼────┼────┼────┼────┤
4653 │ No Table ID │ 1│ 1│ 1│ 1│
4654 │ Layer ID │ 4│ 4│ 4│ 4│
4655 │ Subtable ID│ 26│ 26│ 28│ 28│
4656 │ ╶────────────────────────┼────┼────┼────┼────┤
4657 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4658 │ Layer ID │ 4│ 4│ 4│ 4│
4659 │ Subtable ID│ 30│ 30│ 32│ 32│
4660 │ ╶───────────────┼────┼────┼────┼────┤
4661 │ No Table ID │ 1│ 1│ 1│ 1│
4662 │ Layer ID │ 4│ 4│ 4│ 4│
4663 │ Subtable ID│ 30│ 30│ 32│ 32│
4664 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4669 ╭───────────────────────────────────────┬───────────────────╮
4671 │ ├─────────┬─────────┤
4673 │ ├─────────┼─────────┤
4675 │ ├────┬────┼────┬────┤
4676 │ │ Yes│ No │ Yes│ No │
4677 │ ├────┼────┼────┼────┤
4678 │ │QN86│QN86│QN86│QN86│
4679 ├───────────────────────────────────────┼────┼────┼────┼────┤
4680 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 1│ 1│ 3│ 3│
4681 │ Layer Row ID│ 1│ 1│ 1│ 1│
4682 │ ╶────────────────┼────┼────┼────┼────┤
4683 │ No Row ID │ 5│ 5│ 7│ 7│
4684 │ Layer Row ID│ 3│ 3│ 3│ 3│
4685 │ ╶─────────────────────────┼────┼────┼────┼────┤
4686 │ No QN57 Yes Row ID │ 9│ 9│ 11│ 11│
4687 │ Layer Row ID│ 5│ 5│ 5│ 5│
4688 │ ╶────────────────┼────┼────┼────┼────┤
4689 │ No Row ID │ 13│ 13│ 15│ 15│
4690 │ Layer Row ID│ 7│ 7│ 7│ 7│
4691 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4692 │ No QN61 Yes QN57 Yes Row ID │ 17│ 17│ 19│ 19│
4693 │ Layer Row ID│ 9│ 9│ 9│ 9│
4694 │ ╶────────────────┼────┼────┼────┼────┤
4695 │ No Row ID │ 21│ 21│ 23│ 23│
4696 │ Layer Row ID│ 11│ 11│ 11│ 11│
4697 │ ╶─────────────────────────┼────┼────┼────┼────┤
4698 │ No QN57 Yes Row ID │ 25│ 25│ 27│ 27│
4699 │ Layer Row ID│ 13│ 13│ 13│ 13│
4700 │ ╶────────────────┼────┼────┼────┼────┤
4701 │ No Row ID │ 29│ 29│ 31│ 31│
4702 │ Layer Row ID│ 15│ 15│ 15│ 15│
4703 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4708 ╭───────────────────────────────────────┬───────────────────╮
4710 │ ├─────────┬─────────┤
4712 │ ├─────────┼─────────┤
4714 │ ├────┬────┼────┬────┤
4715 │ │ Yes│ No │ Yes│ No │
4716 │ ├────┼────┼────┼────┤
4717 │ │QN86│QN86│QN86│QN86│
4718 ├───────────────────────────────────────┼────┼────┼────┼────┤
4719 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 2│ 2│ 4│ 4│
4720 │ Layer Row ID│ 2│ 2│ 2│ 2│
4721 │ ╶────────────────┼────┼────┼────┼────┤
4722 │ No Row ID │ 6│ 6│ 8│ 8│
4723 │ Layer Row ID│ 4│ 4│ 4│ 4│
4724 │ ╶─────────────────────────┼────┼────┼────┼────┤
4725 │ No QN57 Yes Row ID │ 10│ 10│ 12│ 12│
4726 │ Layer Row ID│ 6│ 6│ 6│ 6│
4727 │ ╶────────────────┼────┼────┼────┼────┤
4728 │ No Row ID │ 14│ 14│ 16│ 16│
4729 │ Layer Row ID│ 8│ 8│ 8│ 8│
4730 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4731 │ No QN61 Yes QN57 Yes Row ID │ 18│ 18│ 20│ 20│
4732 │ Layer Row ID│ 10│ 10│ 10│ 10│
4733 │ ╶────────────────┼────┼────┼────┼────┤
4734 │ No Row ID │ 22│ 22│ 24│ 24│
4735 │ Layer Row ID│ 12│ 12│ 12│ 12│
4736 │ ╶─────────────────────────┼────┼────┼────┼────┤
4737 │ No QN57 Yes Row ID │ 26│ 26│ 28│ 28│
4738 │ Layer Row ID│ 14│ 14│ 14│ 14│
4739 │ ╶────────────────┼────┼────┼────┼────┤
4740 │ No Row ID │ 30│ 30│ 32│ 32│
4741 │ Layer Row ID│ 16│ 16│ 16│ 16│
4742 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4747 ╭───────────────────────────────────────┬───────────────────╮
4749 │ ├─────────┬─────────┤
4751 │ ├─────────┼─────────┤
4753 │ ├────┬────┼────┬────┤
4754 │ │ Yes│ No │ Yes│ No │
4755 │ ├────┼────┼────┼────┤
4756 │ │QN86│QN86│QN86│QN86│
4757 ├───────────────────────────────────────┼────┼────┼────┼────┤
4758 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 33│ 33│ 35│ 35│
4759 │ Layer Row ID│ 17│ 17│ 17│ 17│
4760 │ ╶────────────────┼────┼────┼────┼────┤
4761 │ No Row ID │ 37│ 37│ 39│ 39│
4762 │ Layer Row ID│ 19│ 19│ 19│ 19│
4763 │ ╶─────────────────────────┼────┼────┼────┼────┤
4764 │ No QN57 Yes Row ID │ 41│ 41│ 43│ 43│
4765 │ Layer Row ID│ 21│ 21│ 21│ 21│
4766 │ ╶────────────────┼────┼────┼────┼────┤
4767 │ No Row ID │ 45│ 45│ 47│ 47│
4768 │ Layer Row ID│ 23│ 23│ 23│ 23│
4769 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4770 │ No QN61 Yes QN57 Yes Row ID │ 49│ 49│ 51│ 51│
4771 │ Layer Row ID│ 25│ 25│ 25│ 25│
4772 │ ╶────────────────┼────┼────┼────┼────┤
4773 │ No Row ID │ 53│ 53│ 55│ 55│
4774 │ Layer Row ID│ 27│ 27│ 27│ 27│
4775 │ ╶─────────────────────────┼────┼────┼────┼────┤
4776 │ No QN57 Yes Row ID │ 57│ 57│ 59│ 59│
4777 │ Layer Row ID│ 29│ 29│ 29│ 29│
4778 │ ╶────────────────┼────┼────┼────┼────┤
4779 │ No Row ID │ 61│ 61│ 63│ 63│
4780 │ Layer Row ID│ 31│ 31│ 31│ 31│
4781 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4786 ╭───────────────────────────────────────┬───────────────────╮
4788 │ ├─────────┬─────────┤
4790 │ ├─────────┼─────────┤
4792 │ ├────┬────┼────┬────┤
4793 │ │ Yes│ No │ Yes│ No │
4794 │ ├────┼────┼────┼────┤
4795 │ │QN86│QN86│QN86│QN86│
4796 ├───────────────────────────────────────┼────┼────┼────┼────┤
4797 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 34│ 34│ 36│ 36│
4798 │ Layer Row ID│ 18│ 18│ 18│ 18│
4799 │ ╶────────────────┼────┼────┼────┼────┤
4800 │ No Row ID │ 38│ 38│ 40│ 40│
4801 │ Layer Row ID│ 20│ 20│ 20│ 20│
4802 │ ╶─────────────────────────┼────┼────┼────┼────┤
4803 │ No QN57 Yes Row ID │ 42│ 42│ 44│ 44│
4804 │ Layer Row ID│ 22│ 22│ 22│ 22│
4805 │ ╶────────────────┼────┼────┼────┼────┤
4806 │ No Row ID │ 46│ 46│ 48│ 48│
4807 │ Layer Row ID│ 24│ 24│ 24│ 24│
4808 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4809 │ No QN61 Yes QN57 Yes Row ID │ 50│ 50│ 52│ 52│
4810 │ Layer Row ID│ 26│ 26│ 26│ 26│
4811 │ ╶────────────────┼────┼────┼────┼────┤
4812 │ No Row ID │ 54│ 54│ 56│ 56│
4813 │ Layer Row ID│ 28│ 28│ 28│ 28│
4814 │ ╶─────────────────────────┼────┼────┼────┼────┤
4815 │ No QN57 Yes Row ID │ 58│ 58│ 60│ 60│
4816 │ Layer Row ID│ 30│ 30│ 30│ 30│
4817 │ ╶────────────────┼────┼────┼────┼────┤
4818 │ No Row ID │ 62│ 62│ 64│ 64│
4819 │ Layer Row ID│ 32│ 32│ 32│ 32│
4820 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4825 ╭──────────────────────────────────────────┬───────────────────╮
4827 │ ├─────────┬─────────┤
4829 │ ├─────────┼─────────┤
4831 │ ├────┬────┼────┬────┤
4832 │ │ Yes│ No │ Yes│ No │
4833 │ ├────┼────┼────┼────┤
4834 │ │QN86│QN86│QN86│QN86│
4835 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4836 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 1│ 3│ 5│ 7│
4837 │ Layer Column ID│ 1│ 3│ 5│ 7│
4838 │ ╶───────────────────┼────┼────┼────┼────┤
4839 │ No Column ID │ 1│ 3│ 5│ 7│
4840 │ Layer Column ID│ 1│ 3│ 5│ 7│
4841 │ ╶────────────────────────────┼────┼────┼────┼────┤
4842 │ No QN57 Yes Column ID │ 9│ 11│ 13│ 15│
4843 │ Layer Column ID│ 1│ 3│ 5│ 7│
4844 │ ╶───────────────────┼────┼────┼────┼────┤
4845 │ No Column ID │ 9│ 11│ 13│ 15│
4846 │ Layer Column ID│ 1│ 3│ 5│ 7│
4847 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4848 │ No QN61 Yes QN57 Yes Column ID │ 17│ 19│ 21│ 23│
4849 │ Layer Column ID│ 1│ 3│ 5│ 7│
4850 │ ╶───────────────────┼────┼────┼────┼────┤
4851 │ No Column ID │ 17│ 19│ 21│ 23│
4852 │ Layer Column ID│ 1│ 3│ 5│ 7│
4853 │ ╶────────────────────────────┼────┼────┼────┼────┤
4854 │ No QN57 Yes Column ID │ 25│ 27│ 29│ 31│
4855 │ Layer Column ID│ 1│ 3│ 5│ 7│
4856 │ ╶───────────────────┼────┼────┼────┼────┤
4857 │ No Column ID │ 25│ 27│ 29│ 31│
4858 │ Layer Column ID│ 1│ 3│ 5│ 7│
4859 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4864 ╭──────────────────────────────────────────┬───────────────────╮
4866 │ ├─────────┬─────────┤
4868 │ ├─────────┼─────────┤
4870 │ ├────┬────┼────┬────┤
4871 │ │ Yes│ No │ Yes│ No │
4872 │ ├────┼────┼────┼────┤
4873 │ │QN86│QN86│QN86│QN86│
4874 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4875 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 2│ 4│ 6│ 8│
4876 │ Layer Column ID│ 2│ 4│ 6│ 8│
4877 │ ╶───────────────────┼────┼────┼────┼────┤
4878 │ No Column ID │ 2│ 4│ 6│ 8│
4879 │ Layer Column ID│ 2│ 4│ 6│ 8│
4880 │ ╶────────────────────────────┼────┼────┼────┼────┤
4881 │ No QN57 Yes Column ID │ 10│ 12│ 14│ 16│
4882 │ Layer Column ID│ 2│ 4│ 6│ 8│
4883 │ ╶───────────────────┼────┼────┼────┼────┤
4884 │ No Column ID │ 10│ 12│ 14│ 16│
4885 │ Layer Column ID│ 2│ 4│ 6│ 8│
4886 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4887 │ No QN61 Yes QN57 Yes Column ID │ 18│ 20│ 22│ 24│
4888 │ Layer Column ID│ 2│ 4│ 6│ 8│
4889 │ ╶───────────────────┼────┼────┼────┼────┤
4890 │ No Column ID │ 18│ 20│ 22│ 24│
4891 │ Layer Column ID│ 2│ 4│ 6│ 8│
4892 │ ╶────────────────────────────┼────┼────┼────┼────┤
4893 │ No QN57 Yes Column ID │ 26│ 28│ 30│ 32│
4894 │ Layer Column ID│ 2│ 4│ 6│ 8│
4895 │ ╶───────────────────┼────┼────┼────┼────┤
4896 │ No Column ID │ 26│ 28│ 30│ 32│
4897 │ Layer Column ID│ 2│ 4│ 6│ 8│
4898 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4903 ╭──────────────────────────────────────────┬───────────────────╮
4905 │ ├─────────┬─────────┤
4907 │ ├─────────┼─────────┤
4909 │ ├────┬────┼────┬────┤
4910 │ │ Yes│ No │ Yes│ No │
4911 │ ├────┼────┼────┼────┤
4912 │ │QN86│QN86│QN86│QN86│
4913 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4914 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 33│ 35│ 37│ 39│
4915 │ Layer Column ID│ 9│ 11│ 13│ 15│
4916 │ ╶───────────────────┼────┼────┼────┼────┤
4917 │ No Column ID │ 33│ 35│ 37│ 39│
4918 │ Layer Column ID│ 9│ 11│ 13│ 15│
4919 │ ╶────────────────────────────┼────┼────┼────┼────┤
4920 │ No QN57 Yes Column ID │ 41│ 43│ 45│ 47│
4921 │ Layer Column ID│ 9│ 11│ 13│ 15│
4922 │ ╶───────────────────┼────┼────┼────┼────┤
4923 │ No Column ID │ 41│ 43│ 45│ 47│
4924 │ Layer Column ID│ 9│ 11│ 13│ 15│
4925 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4926 │ No QN61 Yes QN57 Yes Column ID │ 49│ 51│ 53│ 55│
4927 │ Layer Column ID│ 9│ 11│ 13│ 15│
4928 │ ╶───────────────────┼────┼────┼────┼────┤
4929 │ No Column ID │ 49│ 51│ 53│ 55│
4930 │ Layer Column ID│ 9│ 11│ 13│ 15│
4931 │ ╶────────────────────────────┼────┼────┼────┼────┤
4932 │ No QN57 Yes Column ID │ 57│ 59│ 61│ 63│
4933 │ Layer Column ID│ 9│ 11│ 13│ 15│
4934 │ ╶───────────────────┼────┼────┼────┼────┤
4935 │ No Column ID │ 57│ 59│ 61│ 63│
4936 │ Layer Column ID│ 9│ 11│ 13│ 15│
4937 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4942 ╭──────────────────────────────────────────┬───────────────────╮
4944 │ ├─────────┬─────────┤
4946 │ ├─────────┼─────────┤
4948 │ ├────┬────┼────┬────┤
4949 │ │ Yes│ No │ Yes│ No │
4950 │ ├────┼────┼────┼────┤
4951 │ │QN86│QN86│QN86│QN86│
4952 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4953 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 34│ 36│ 38│ 40│
4954 │ Layer Column ID│ 10│ 12│ 14│ 16│
4955 │ ╶───────────────────┼────┼────┼────┼────┤
4956 │ No Column ID │ 34│ 36│ 38│ 40│
4957 │ Layer Column ID│ 10│ 12│ 14│ 16│
4958 │ ╶────────────────────────────┼────┼────┼────┼────┤
4959 │ No QN57 Yes Column ID │ 42│ 44│ 46│ 48│
4960 │ Layer Column ID│ 10│ 12│ 14│ 16│
4961 │ ╶───────────────────┼────┼────┼────┼────┤
4962 │ No Column ID │ 42│ 44│ 46│ 48│
4963 │ Layer Column ID│ 10│ 12│ 14│ 16│
4964 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4965 │ No QN61 Yes QN57 Yes Column ID │ 50│ 52│ 54│ 56│
4966 │ Layer Column ID│ 10│ 12│ 14│ 16│
4967 │ ╶───────────────────┼────┼────┼────┼────┤
4968 │ No Column ID │ 50│ 52│ 54│ 56│
4969 │ Layer Column ID│ 10│ 12│ 14│ 16│
4970 │ ╶────────────────────────────┼────┼────┼────┼────┤
4971 │ No QN57 Yes Column ID │ 58│ 60│ 62│ 64│
4972 │ Layer Column ID│ 10│ 12│ 14│ 16│
4973 │ ╶───────────────────┼────┼────┼────┼────┤
4974 │ No Column ID │ 58│ 60│ 62│ 64│
4975 │ Layer Column ID│ 10│ 12│ 14│ 16│
4976 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4980 AT_SETUP([CTABLES categorical summary functions])
4981 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4982 AT_DATA([ctables.sps],
4985 /TABLE region BY qnd5a[COUNT, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, TOTAL[COUNT, VALIDN, TOTALN]]
4986 /CATEGORIES VARIABLES=qnd5a TOTAL=YES MISSING=INCLUDE
4987 /SLABELS POSITION=ROW.
4989 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
4991 ╭─────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────╮
4992 │ │ D5a. What would you say is your primary ethnic background? │
4993 │ ├─────┬───────┬───────┬──────────┬──────────┬─────────┬──────────┬──────────────┬──────┬───────┬─────┤
4994 │ │ │ │ │ │ │ │ │ Multiple - │ │ │ │
4995 │ │ │ │ │ South │ Central │ Puerto │ Something│ cannot choose│ Don't│ │ │
4996 │ │Cuban│Mexican│Spanish│ American │ American │Rican, OR│ else │ one │ know │Refused│Total│
4997 ├─────────────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4998 │Region NE Count │ 6│ 8│ 8│ 11│ 7│ 39│ 23│ 2│ 0│ 1│ 105│
4999 │ Row % │ 5.7%│ 7.6%│ 7.6%│ 10.5%│ 6.7%│ 37.1%│ 21.9%│ 1.9%│ .0%│ 1.0%│ │
5000 │ Row │ 5.8%│ 7.7%│ 7.7%│ 10.6%│ 6.7%│ 37.5%│ 22.1%│ 1.9%│ .0%│ .0%│ │
5001 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
5002 │ % │ │ │ │ │ │ │ │ │ │ │ │
5003 │ Row │ .4%│ .6%│ .6%│ .8%│ .5%│ 2.8%│ 1.6%│ .1%│ .0%│ .1%│ │
5004 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
5005 │ % │ │ │ │ │ │ │ │ │ │ │ │
5006 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 104│
5007 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1409│
5008 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
5009 │ MW Count │ 3│ 24│ 1│ 4│ 5│ 9│ 6│ 0│ 0│ 1│ 53│
5010 │ Row % │ 5.7%│ 45.3%│ 1.9%│ 7.5%│ 9.4%│ 17.0%│ 11.3%│ .0%│ .0%│ 1.9%│ │
5011 │ Row │ 5.8%│ 46.2%│ 1.9%│ 7.7%│ 9.6%│ 17.3%│ 11.5%│ .0%│ .0%│ .0%│ │
5012 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
5013 │ % │ │ │ │ │ │ │ │ │ │ │ │
5014 │ Row │ .2%│ 1.5%│ .1%│ .2%│ .3%│ .5%│ .4%│ .0%│ .0%│ .1%│ │
5015 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
5016 │ % │ │ │ │ │ │ │ │ │ │ │ │
5017 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 52│
5018 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1654│
5019 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
5020 │ S Count │ 10│ 113│ 11│ 14│ 25│ 23│ 20│ 2│ 3│ 2│ 223│
5021 │ Row % │ 4.5%│ 50.7%│ 4.9%│ 6.3%│ 11.2%│ 10.3%│ 9.0%│ .9%│ 1.3%│ .9%│ │
5022 │ Row │ 4.6%│ 51.8%│ 5.0%│ 6.4%│ 11.5%│ 10.6%│ 9.2%│ .9%│ .0%│ .0%│ │
5023 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
5024 │ % │ │ │ │ │ │ │ │ │ │ │ │
5025 │ Row │ .4%│ 4.7%│ .5%│ .6%│ 1.0%│ 1.0%│ .8%│ .1%│ .1%│ .1%│ │
5026 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
5027 │ % │ │ │ │ │ │ │ │ │ │ │ │
5028 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 218│
5029 │ Total N│ │ │ │ │ │ │ │ │ │ │ 2390│
5030 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
5031 │ W Count │ 1│ 166│ 28│ 5│ 15│ 7│ 19│ 3│ 0│ 1│ 245│
5032 │ Row % │ .4%│ 67.8%│ 11.4%│ 2.0%│ 6.1%│ 2.9%│ 7.8%│ 1.2%│ .0%│ .4%│ │
5033 │ Row │ .4%│ 68.0%│ 11.5%│ 2.0%│ 6.1%│ 2.9%│ 7.8%│ 1.2%│ .0%│ .0%│ │
5034 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
5035 │ % │ │ │ │ │ │ │ │ │ │ │ │
5036 │ Row │ .1%│ 10.7%│ 1.8%│ .3%│ 1.0%│ .5%│ 1.2%│ .2%│ .0%│ .1%│ │
5037 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
5038 │ % │ │ │ │ │ │ │ │ │ │ │ │
5039 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 244│
5040 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1546│
5041 ╰─────────────────┴─────┴───────┴───────┴──────────┴──────────┴─────────┴──────────┴──────────────┴──────┴───────┴─────╯
5045 AT_SETUP([CTABLES scale summary functions])
5046 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
5047 AT_DATA([ctables.sps],
5051 * Use SPLIT FILE with FREQUENCIES to generate output equivalent to
5052 CTABLES later, to make the results easier to verify.
5053 SPLIT FILE BY REGION.
5056 /STATISTICS=MEAN SEMEAN MEDIAN MODE STDDEV VARIANCE RANGE MINIMUM MAXIMUM SUM
5057 /FORMAT NOTABLE /MISSING=INCLUDE.
5061 /VLABELS VARIABLE=qn19a DISPLAY=NONE
5062 /TABLE region BY qn19a[VALIDN, MISSING, MEAN, SEMEAN, MEDIAN, MODE, STDDEV, VARIANCE, RANGE, MINIMUM, MAXIMUM, SUM, COUNT, TOTALN, ROWPCT.SUM]
5063 /CATEGORIES VARIABLES=qn19a TOTAL=YES MISSING=INCLUDE
5064 /SLABELS POSITION=ROW
5065 /CLABELS ROWLABELS=OPPOSITE.
5067 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
5069 ╭─────────┬───────────────────────────────────╮
5071 │ ├────────┬────────┬────────┬────────┤
5072 │ │ NE │ MW │ S │ W │
5073 │ ├────────┼────────┼────────┼────────┤
5074 │ │ QN19A │ QN19A │ QN19A │ QN19A │
5075 ├─────────┼────────┼────────┼────────┼────────┤
5076 │N Valid │ 936│ 1019│ 1276│ 950│
5077 │ Missing│ 473│ 635│ 1114│ 596│
5078 ├─────────┼────────┼────────┼────────┼────────┤
5079 │Mean │ 19.33│ 19.83│ 20.29│ 19.87│
5080 ├─────────┼────────┼────────┼────────┼────────┤
5081 │S.E. Mean│ .14│ .16│ .18│ .17│
5082 ├─────────┼────────┼────────┼────────┼────────┤
5083 │Median │ 18.00│ 19.00│ 19.00│ 19.00│
5084 ├─────────┼────────┼────────┼────────┼────────┤
5085 │Mode │ 18.00│ 18.00│ 18.00│ 18.00│
5086 ├─────────┼────────┼────────┼────────┼────────┤
5087 │Std Dev │ 4.41│ 5.15│ 6.44│ 5.25│
5088 ├─────────┼────────┼────────┼────────┼────────┤
5089 │Variance │ 19.41│ 26.47│ 41.43│ 27.59│
5090 ├─────────┼────────┼────────┼────────┼────────┤
5091 │Range │ 59.00│ 71.00│ 75.00│ 61.00│
5092 ├─────────┼────────┼────────┼────────┼────────┤
5093 │Minimum │ .00│ 4.00│ 4.00│ 4.00│
5094 ├─────────┼────────┼────────┼────────┼────────┤
5095 │Maximum │ 59.00│ 75.00│ 79.00│ 65.00│
5096 ├─────────┼────────┼────────┼────────┼────────┤
5097 │Sum │18092.00│20206.00│25886.00│18877.00│
5098 ╰─────────┴────────┴────────┴────────┴────────╯
5101 ╭────────────────────────┬────────┬────────┬────────┬────────╮
5102 │ │ NE │ MW │ S │ W │
5103 ├────────────────────────┼────────┼────────┼────────┼────────┤
5104 │REGION Valid N │ 936│ 1019│ 1276│ 950│
5105 │ Missing │ 473.00│ 635.00│ 1114.00│ 596.00│
5106 │ Mean │ 19.33│ 19.83│ 20.29│ 19.87│
5107 │ Std Error of Mean│ .14│ .16│ .18│ .17│
5108 │ Median │ 18.00│ 19.00│ 19.00│ 19.00│
5109 │ Mode │ 18.00│ 18.00│ 18.00│ 18.00│
5110 │ Std Deviation │ 4.41│ 5.15│ 6.44│ 5.25│
5111 │ Variance │ 19.41│ 26.47│ 41.43│ 27.59│
5112 │ Range │ 59.00│ 71.00│ 75.00│ 61.00│
5113 │ Minimum │ .00│ 4.00│ 4.00│ 4.00│
5114 │ Maximum │ 59.00│ 75.00│ 79.00│ 65.00│
5115 │ Sum │18092.00│20206.00│25886.00│18877.00│
5116 │ Count │ 1409│ 1654│ 2390│ 1546│
5117 │ Total N │ 1409│ 1654│ 2390│ 1546│
5118 │ Row Sum % │ 21.8%│ 24.3%│ 31.2%│ 22.7%│
5119 ╰────────────────────────┴────────┴────────┴────────┴────────╯
5123 AT_SETUP([CTABLES scale summary functions - weighting])
5128 for n in 1 2 3 4 5 6 7 8 9 10; do
5129 if test $c -lt 15; then
5134 printf "$weight $a $b $cval\n"
5135 weight=$(expr \( $weight + 3 \) % 7 + 2)
5136 c=$(expr \( $c + 13 \) % 29 + 7)
5141 AT_DATA([analysis.sps],
5142 [[* Use SPLIT FILE with FREQUENCIES to generate output equivalent to
5143 CTABLES later, to make the results easier to verify.
5147 /STATISTICS=MEAN SEMEAN MEDIAN MODE STDDEV VARIANCE RANGE MINIMUM MAXIMUM SUM
5148 /FORMAT NOTABLE /MISSING=INCLUDE.
5152 /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
5153 /SLABELS POSITION=ROW
5154 /CATEGORIES VARIABLES=a b MISSING=INCLUDE.
5157 AT_DATA([ctables.sps],
5158 [[DATA LIST LIST NOTABLE FILE='ctables.txt'
5159 /w (F5.0) a b c (f2.0).
5160 VAR LEVEL w c (SCALE) a b (NOMINAL).
5161 MISSING VALUES a b (9).
5163 INCLUDE 'analysis.sps'.
5166 INCLUDE 'analysis.sps'.
5168 * Same as original analysis using unweighted versions of summaries.
5170 /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
5171 /SLABELS POSITION=ROW
5172 /CATEGORIES VARIABLES=a b MISSING=INCLUDE.
5174 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
5176 ╭─────────┬──────────────────────────────────────────────────────────────╮
5178 │ ├────────────────────┬────────────────────┬────────────────────┤
5180 │ ├────────────────────┼────────────────────┼────────────────────┤
5182 │ ├──────┬──────┬──────┼──────┬──────┬──────┼──────┬──────┬──────┤
5183 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5184 │ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5185 │ │ c │ c │ c │ c │ c │ c │ c │ c │ c │
5186 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5187 │N Valid │ 7│ 6│ 8│ 7│ 7│ 8│ 7│ 7│ 8│
5188 │ Missing│ 3│ 4│ 2│ 3│ 3│ 2│ 3│ 3│ 2│
5189 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5190 │Mean │ 25.86│ 24.50│ 24.63│ 25.86│ 25.71│ 24.25│ 25.43│ 25.29│ 23.88│
5191 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5192 │S.E. Mean│ 2.44│ 2.14│ 2.58│ 2.44│ 2.18│ 2.43│ 2.36│ 2.18│ 2.47│
5193 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5194 │Median │ 25.00│ 24.50│ 25.00│ 25.00│ 27.00│ 25.00│ 25.00│ 24.00│ 23.50│
5195 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5196 │Mode │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5197 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5198 │Std Dev │ 6.47│ 5.24│ 7.31│ 6.47│ 5.77│ 6.88│ 6.24│ 5.77│ 6.98│
5199 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5200 │Variance │ 41.81│ 27.50│ 53.41│ 41.81│ 33.24│ 47.36│ 38.95│ 33.24│ 48.70│
5201 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5202 │Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5203 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5204 │Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5205 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5206 │Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5207 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5208 │Sum │181.00│147.00│197.00│181.00│180.00│194.00│178.00│177.00│191.00│
5209 ╰─────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
5212 ╭───────────────────┬──────────────────────────────────────────────────────────────╮
5214 │ ├────────────────────┬────────────────────┬────────────────────┤
5216 │ ├────────────────────┼────────────────────┼────────────────────┤
5218 │ ├──────┬──────┬──────┼──────┬──────┬──────┼──────┬──────┬──────┤
5219 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5220 ├───────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5221 │c Valid N │ 7│ 6│ 8│ 7│ 7│ 8│ 7│ 7│ 8│
5222 │ Missing │ 3│ 4│ 2│ 3│ 3│ 2│ 3│ 3│ 2│
5223 │ Mean │ 25.86│ 24.50│ 24.63│ 25.86│ 25.71│ 24.25│ 25.43│ 25.29│ 23.88│
5224 │ Std Error of Mean│ 2.44│ 2.14│ 2.58│ 2.44│ 2.18│ 2.43│ 2.36│ 2.18│ 2.47│
5225 │ Median │ 25.00│ 24.50│ 25.00│ 25.00│ 27.00│ 25.00│ 25.00│ 24.00│ 23.50│
5226 │ Mode │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5227 │ Std Deviation │ 6.47│ 5.24│ 7.31│ 6.47│ 5.77│ 6.88│ 6.24│ 5.77│ 6.98│
5228 │ Variance │ 41.81│ 27.50│ 53.41│ 41.81│ 33.24│ 47.36│ 38.95│ 33.24│ 48.70│
5229 │ Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5230 │ Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5231 │ Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5232 │ Sum │181.00│147.00│197.00│181.00│180.00│194.00│178.00│177.00│191.00│
5233 │ Count │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5234 │ Total N │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5235 │ Layer Row Sum % │ 11.1%│ 9.0%│ 12.1%│ 11.1%│ 11.1%│ 11.9%│ 10.9%│ 10.9%│ 11.7%│
5236 ╰───────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
5239 ╭─────────┬─────────────────────────────────────────────────────────────────╮
5241 │ ├─────────────────────┬─────────────────────┬─────────────────────┤
5243 │ ├─────────────────────┼─────────────────────┼─────────────────────┤
5245 │ ├───────┬──────┬──────┼──────┬───────┬──────┼──────┬──────┬───────┤
5246 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5247 │ ├───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5248 │ │ c │ c │ c │ c │ c │ c │ c │ c │ c │
5249 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5250 │N Valid │ 40│ 35│ 41│ 26│ 38│ 40│ 34│ 32│ 39│
5251 │ Missing│ 6│ 14│ 11│ 22│ 13│ 7│ 16│ 21│ 10│
5252 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5253 │Mean │ 27.23│ 24.20│ 22.63│ 27.96│ 27.21│ 23.48│ 23.71│ 25.47│ 26.03│
5254 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5255 │S.E. Mean│ .93│ .75│ 1.03│ 1.12│ .84│ .87│ 1.01│ 1.05│ 1.01│
5256 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5257 │Median │ 30.00│ 22.00│ 19.00│ 30.00│ 29.00│ 24.00│ 23.00│ 24.00│ 28.00│
5258 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5259 │Mode │ 34│ 29│ 19│ 34│ 33│ 28│ 23│ 18│ 30│
5260 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5261 │Std Dev │ 5.89│ 4.42│ 6.59│ 5.69│ 5.16│ 5.50│ 5.87│ 5.94│ 6.30│
5262 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5263 │Variance │ 34.64│ 19.52│ 43.39│ 32.36│ 26.66│ 30.20│ 34.46│ 35.29│ 39.71│
5264 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5265 │Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5266 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5267 │Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5268 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5269 │Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5270 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5271 │Sum │1089.00│847.00│928.00│727.00│1034.00│939.00│806.00│815.00│1015.00│
5272 ╰─────────┴───────┴──────┴──────┴──────┴───────┴──────┴──────┴──────┴───────╯
5275 ╭───────────────────┬─────────────────────────────────────────────────────────────────╮
5277 │ ├─────────────────────┬─────────────────────┬─────────────────────┤
5279 │ ├─────────────────────┼─────────────────────┼─────────────────────┤
5281 │ ├───────┬──────┬──────┼──────┬───────┬──────┼──────┬──────┬───────┤
5282 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5283 ├───────────────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5284 │c Valid N │ 40│ 35│ 41│ 26│ 38│ 40│ 34│ 32│ 39│
5285 │ Missing │ 6│ 14│ 11│ 22│ 13│ 7│ 16│ 21│ 10│
5286 │ Mean │ 27.22│ 24.20│ 22.63│ 27.96│ 27.21│ 23.48│ 23.71│ 25.47│ 26.03│
5287 │ Std Error of Mean│ .93│ .75│ 1.03│ 1.12│ .84│ .87│ 1.01│ 1.05│ 1.01│
5288 │ Median │ 30.00│ 22.00│ 19.00│ 30.00│ 29.00│ 24.00│ 23.00│ 24.00│ 28.00│
5289 │ Mode │ 34│ 29│ 19│ 34│ 33│ 28│ 23│ 18│ 30│
5290 │ Std Deviation │ 5.89│ 4.42│ 6.59│ 5.69│ 5.16│ 5.50│ 5.87│ 5.94│ 6.30│
5291 │ Variance │ 34.64│ 19.52│ 43.39│ 32.36│ 26.66│ 30.20│ 34.46│ 35.29│ 39.71│
5292 │ Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5293 │ Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5294 │ Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5295 │ Sum │1089.00│847.00│928.00│727.00│1034.00│939.00│806.00│815.00│1015.00│
5296 │ Count │ 46│ 49│ 52│ 48│ 51│ 47│ 50│ 53│ 49│
5297 │ Total N │ 46│ 49│ 52│ 48│ 51│ 47│ 50│ 53│ 49│
5298 │ Layer Row Sum % │ 13.3%│ 10.3%│ 11.3%│ 8.9%│ 12.6%│ 11.5%│ 9.8%│ 9.9%│ 12.4%│
5299 ╰───────────────────┴───────┴──────┴──────┴──────┴───────┴──────┴──────┴──────┴───────╯
5302 ╭──────────────────────────────┬──────────────────────────────────────────────────────────────╮
5304 │ ├────────────────────┬────────────────────┬────────────────────┤
5306 │ ├────────────────────┼────────────────────┼────────────────────┤
5308 │ ├──────┬──────┬──────┼──────┬──────┬──────┼──────┬──────┬──────┤
5309 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5310 ├──────────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5311 │c Unweighted Valid N │ 7│ 6│ 8│ 7│ 7│ 8│ 7│ 7│ 8│
5312 │ Unweighted Missing │ 3│ 4│ 2│ 3│ 3│ 2│ 3│ 3│ 2│
5313 │ Unweighted Mean │ 25.86│ 24.50│ 24.63│ 25.86│ 25.71│ 24.25│ 25.43│ 25.29│ 23.88│
5314 │ Unweighted Std Error of Mean│ 2.44│ 2.14│ 2.58│ 2.44│ 2.18│ 2.43│ 2.36│ 2.18│ 2.47│
5315 │ Unweighted Median │ 25.00│ 24.50│ 25.00│ 25.00│ 27.00│ 25.00│ 25.00│ 24.00│ 23.50│
5316 │ Unweighted Mode │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5317 │ Unweighted Std Deviation │ 6.47│ 5.24│ 7.31│ 6.47│ 5.77│ 6.88│ 6.24│ 5.77│ 6.98│
5318 │ Unweighted Variance │ 41.81│ 27.50│ 53.41│ 41.81│ 33.24│ 47.36│ 38.95│ 33.24│ 48.70│
5319 │ Unweighted Sum │181.00│147.00│197.00│181.00│180.00│194.00│178.00│177.00│191.00│
5320 │ Unweighted Count │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5321 │ Unweighted Total N │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5322 │ Unweighted Layer Row Sum % │ 11.1%│ 9.0%│ 12.1%│ 11.1%│ 11.1%│ 11.9%│ 10.9%│ 10.9%│ 11.7%│
5323 ╰──────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
5327 AT_SETUP([CTABLES hidden scale VLABELS])
5328 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
5329 AT_DATA([ctables.sps],
5332 /TABLE region BY qn19a + qn35
5333 /SLABELS POSITION=ROW.
5335 /VLABELS VARIABLE=qn19a DISPLAY=NONE
5336 /TABLE region BY qn19a + qn35
5337 /SLABELS POSITION=ROW.
5339 /VLABELS VARIABLE=qn35 DISPLAY=NONE
5340 /TABLE region BY qn19a + qn35
5341 /SLABELS POSITION=ROW.
5343 * This one in particular caused a crash because no categories were
5344 created on the column axis, so passing in 0 for the index was still
5345 too big for that number of categories. It was fixed by creating a
5346 name-only category for each variable despite the "NONE" request,
5347 then hiding the entire dimension's labels if all its labels were
5350 /VLABELS VARIABLE=qn19a qn35 DISPLAY=NONE
5351 /TABLE region BY qn19a + qn35
5352 /SLABELS POSITION=ROW.
5354 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
5356 ╭──────────────┬────────────────────────────┬─────────────────────────────────╮
5357 │ │ 19a. About how old were you│ 35. In the past thirty days, how│
5358 │ │ when you first starting │ many times have you driven a │
5359 │ │ drinking alcohol, not │ motor vehicle WITHIN TWO HOURS │
5360 │ │ counting small tastes or │ AFTER drinking alcoholic │
5361 │ │ sips of alcohol. │ beverages? │
5362 ├──────────────┼────────────────────────────┼─────────────────────────────────┤
5363 │Region NE Mean│ 19.33│ 2│
5364 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5365 │ MW Mean│ 19.83│ 2│
5366 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5368 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5370 ╰──────────────┴────────────────────────────┴─────────────────────────────────╯
5373 ╭──────────────┬─────┬────────────────────────────────────────────────────────╮
5374 │ │ │ 35. In the past thirty days, how many times have you │
5375 │ │ │ driven a motor vehicle WITHIN TWO HOURS AFTER drinking │
5376 │ │QN19A│ alcoholic beverages? │
5377 ├──────────────┼─────┼────────────────────────────────────────────────────────┤
5378 │Region NE Mean│19.33│ 2│
5379 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5381 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5383 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5385 ╰──────────────┴─────┴────────────────────────────────────────────────────────╯
5388 ╭──────────────┬─────────────────────────────────────────────────────────┬────╮
5389 │ │ 19a. About how old were you when you first starting │ │
5390 │ │ drinking alcohol, not counting small tastes or sips of │ │
5392 ├──────────────┼─────────────────────────────────────────────────────────┼────┤
5393 │Region NE Mean│ 19.33│ 2│
5394 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5395 │ MW Mean│ 19.83│ 2│
5396 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5398 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5400 ╰──────────────┴─────────────────────────────────────────────────────────┴────╯
5403 ╭──────────────┬───────╮
5404 │Region NE Mean│19.33 2│
5411 ╰──────────────┴───────╯
5415 AT_SETUP([CTABLES with SPLIT FILE])
5416 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
5417 AT_DATA([ctables.sps],
5420 SORT CASES BY qns3a.
5422 CTABLES /TABLE qn105ba.
5424 * Layered split has no effect on output.
5425 SPLIT FILE BY qns3a.
5426 CTABLES /TABLE qn105ba.
5428 * Add column variable qns3a to compare against separate splits.
5429 CTABLES /TABLE qn105ba BY qns3a.
5431 * Separate splits are truly output separately.
5432 SPLIT FILE SEPARATE BY qns3a.
5433 CTABLES /TABLE qn105ba.
5435 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
5437 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5439 ├────────────────────────────────────────────────────────────────────────┼─────┤
5440 │105b. How likely is it that drivers who have had too much Almost │ 700│
5441 │to drink to drive safely will A. Get stopped by the police? certain │ │
5442 │ Very likely │ 1502│
5449 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5452 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5454 ├────────────────────────────────────────────────────────────────────────┼─────┤
5455 │105b. How likely is it that drivers who have had too much Almost │ 700│
5456 │to drink to drive safely will A. Get stopped by the police? certain │ │
5457 │ Very likely │ 1502│
5464 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5467 ╭─────────────────────────────────────────────────────────────────┬────────────╮
5473 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
5474 │105b. How likely is it that drivers who have had too Almost │ 297│ 403│
5475 │much to drink to drive safely will A. Get stopped by certain │ │ │
5476 │the police? Very likely │ 660│ 842│
5477 │ Somewhat │ 1174│ 1589│
5479 │ Somewhat │ 640│ 667│
5483 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
5486 ╭────────────┬─────╮
5488 ├────────────┼─────┤
5489 │S3a. GENDER:│Male │
5490 ╰────────────┴─────╯
5493 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5495 ├────────────────────────────────────────────────────────────────────────┼─────┤
5496 │105b. How likely is it that drivers who have had too much Almost │ 297│
5497 │to drink to drive safely will A. Get stopped by the police? certain │ │
5498 │ Very likely │ 660│
5505 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5508 ╭────────────┬──────╮
5510 ├────────────┼──────┤
5511 │S3a. GENDER:│Female│
5512 ╰────────────┴──────╯
5515 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5517 ├────────────────────────────────────────────────────────────────────────┼─────┤
5518 │105b. How likely is it that drivers who have had too much Almost │ 403│
5519 │to drink to drive safely will A. Get stopped by the police? certain │ │
5520 │ Very likely │ 842│
5527 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5531 AT_SETUP([CTABLES variable level inference])
5532 AT_DATA([data.txt], [dnl
5533 dnl n1 has 10 unique small values -> nominal.
5534 dnl n2 has 23 unique small values -> nominal.
5535 dnl n3 is all missing -> nominal.
5536 dnl s1 has 24 unique small values -> scale.
5537 dnl s2 has one negative value -> scale.
5538 dnl s3 has one non-integer value -> scale.
5539 dnl s4 has no valid values less than 10 -> scale.
5540 dnl s5 has no valid values less than 10,000 -> scale.
5541 1 1 . 1 1 1 10 10001
5542 2 2 . 2 2 2 11 10002
5543 3 3 . 3 3 3 12 10003
5544 4 4 . 4 4 4 13 10004
5545 5 5 . 5 5 5 14 10005
5546 6 6 . 6 6 6 15 10006
5547 7 7 . 7 7 7 16 10007
5548 8 8 . 8 8 8 17 10008
5549 9 9 . 9 9 9 18 10009
5550 10 10 . 10 10 10.5 19 110000
5551 1 11 . 11 -1 1 11 10001
5552 2 12 . 12 2 2 12 10002
5553 3 13 . 13 3 3 13 10003
5554 4 14 . 14 4 4 14 10004
5555 5 15 . 15 5 5 15 10005
5556 6 16 . 16 6 6 16 10006
5557 7 17 . 17 7 7 17 10007
5558 8 18 . 18 8 8 18 10008
5559 9 19 . 19 9 9 19 10009
5560 1 20 . 20 1 1 20 10001
5561 2 21 . 21 2 2 21 10002
5562 3 22 . 22 3 3 22 10003
5563 4 23 . 23 4 4 23 10004
5564 5 23 . 24 5 5 24 10005
5565 6 23 . 24 6 6 25 10006
5568 AT_DATA([ctables.sps], [dnl
5569 DATA LIST LIST file='data.txt' NOTABLE /n1 to n3 s1 to s5.
5571 * Nominal formats (copied from data that will default to scale).
5574 FORMATS n4(WKDAY5) n5(MONTH5).
5576 * Scale formats (copied from data that will default to nominal).
5580 FORMATS s6(DOLLAR6.2) s7(CCA8.2) s8(DATETIME17).
5585 CTABLES /TABLE n1 + n2 + n3 + string + s1 + s2 + s3 + s4 + s5.
5589 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
5591 ╭──────┬────────┬──────────────┬─────┬─────┬─────────┬────────────┬────────────╮
5592 │ │ │ Measurement │ │ │ │ │ │
5593 │Name │Position│ Level │ Role│Width│Alignment│Print Format│Write Format│
5594 ├──────┼────────┼──────────────┼─────┼─────┼─────────┼────────────┼────────────┤
5595 │n1 │ 1│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5596 │n2 │ 2│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5597 │n3 │ 3│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5598 │s1 │ 4│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5599 │s2 │ 5│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5600 │s3 │ 6│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5601 │s4 │ 7│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5602 │s5 │ 8│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5603 │n4 │ 9│Unknown │Input│ 8│Right │WKDAY5 │WKDAY5 │
5604 │n5 │ 10│Unknown │Input│ 8│Right │MONTH5 │MONTH5 │
5605 │s6 │ 11│Unknown │Input│ 8│Right │DOLLAR6.2 │DOLLAR6.2 │
5606 │s7 │ 12│Unknown │Input│ 8│Right │CCA8.2 │CCA8.2 │
5607 │s8 │ 13│Unknown │Input│ 8│Right │DATETIME17.0│DATETIME17.0│
5608 │string│ 14│Nominal │Input│ 8│Left │A8 │A8 │
5609 ╰──────┴────────┴──────────────┴─────┴─────┴─────────┴────────────┴────────────╯
5612 ╭────────────┬─────┬────────╮
5614 ├────────────┼─────┼────────┤
5625 ├────────────┼─────┼────────┤
5649 ├────────────┼─────┼────────┤
5651 ├────────────┼─────┼────────┤
5653 ├────────────┼─────┼────────┤
5655 ├────────────┼─────┼────────┤
5657 ├────────────┼─────┼────────┤
5659 ├────────────┼─────┼────────┤
5661 ╰────────────┴─────┴────────╯
5664 ╭──────┬────────┬──────────────┬─────┬─────┬─────────┬────────────┬────────────╮
5665 │ │ │ Measurement │ │ │ │ │ │
5666 │Name │Position│ Level │ Role│Width│Alignment│Print Format│Write Format│
5667 ├──────┼────────┼──────────────┼─────┼─────┼─────────┼────────────┼────────────┤
5668 │n1 │ 1│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5669 │n2 │ 2│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5670 │n3 │ 3│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5671 │s1 │ 4│Scale │Input│ 8│Right │F8.2 │F8.2 │
5672 │s2 │ 5│Scale │Input│ 8│Right │F8.2 │F8.2 │
5673 │s3 │ 6│Scale │Input│ 8│Right │F8.2 │F8.2 │
5674 │s4 │ 7│Scale │Input│ 8│Right │F8.2 │F8.2 │
5675 │s5 │ 8│Scale │Input│ 8│Right │F8.2 │F8.2 │
5676 │n4 │ 9│Nominal │Input│ 8│Right │WKDAY5 │WKDAY5 │
5677 │n5 │ 10│Nominal │Input│ 8│Right │MONTH5 │MONTH5 │
5678 │s6 │ 11│Scale │Input│ 8│Right │DOLLAR6.2 │DOLLAR6.2 │
5679 │s7 │ 12│Scale │Input│ 8│Right │CCA8.2 │CCA8.2 │
5680 │s8 │ 13│Scale │Input│ 8│Right │DATETIME17.0│DATETIME17.0│
5681 │string│ 14│Nominal │Input│ 8│Left │A8 │A8 │
5682 ╰──────┴────────┴──────────────┴─────┴─────┴─────────┴────────────┴────────────╯