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 / **.
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 at end of command: expecting `/'.
227 ctables.sps:3.29-3.33: error: CTABLES: Syntax error at `'foo'': Expected non-
228 negative number for MINCOLWIDTH.
230 ctables.sps:4.21-4.22: error: CTABLES: Syntax error at `**': expecting
233 ctables.sps:5.21-5.32: error: CTABLES: Syntax error at `NOTAFUNCTION': Expecting
234 summary function name.
236 ctables.sps:6.20: error: CTABLES: Syntax error at end of command: expecting `@:}@'.
238 ctables.sps:7.16-7.17: error: CTABLES: Syntax error at `**': expecting
241 ctables.sps:8: error: CTABLES: NOTAVAR is not a variable name.
243 ctables.sps:10.16-10.24: error: CTABLES: Cannot use string variable string as a
245 10 | CTABLES /TABLE string[S].
248 ctables.sps:11.27-11.29: error: CTABLES: Syntax error at `101': Expected number
249 between 0 and 100 for PTILE.
251 ctables.sps:12: error: CTABLES: Output format F0.1 specifies width 0, but F
252 requires a width between 1 and 40.
254 ctables.sps:13.26-13.36: error: CTABLES: Syntax error at `NEGPAREN1.2': Output
255 format NEGPAREN requires width 2 or greater.
257 ctables.sps:14.26-14.36: error: CTABLES: Syntax error at `NEGPAREN3.4': Output
258 format NEGPAREN requires width greater than decimals.
260 ctables.sps:15.21-15.24: error: CTABLES: Summary function MEAN applies only to
262 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
265 ctables.sps:15.16-15.18: note: CTABLES: 'QN1' is not a scale variable.
266 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
269 ctables.sps:15.32: error: CTABLES: Syntax error at `@:>@': expecting `@<:@'.
271 ctables.sps:16.21-16.24: error: CTABLES: Summary function MEAN applies only to
273 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
276 ctables.sps:16.16-16.18: note: CTABLES: 'QN1' is not a scale variable.
277 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
280 ctables.sps:16.40: error: CTABLES: Syntax error at `%': expecting `@:>@'.
282 ctables.sps:17.56: error: CTABLES: Syntax error at `x': expecting string.
284 ctables.sps:18.50-18.51: error: CTABLES: Syntax error at `**': expecting THRU.
286 ctables.sps:19.55: error: CTABLES: Syntax error at `x': expecting number.
288 ctables.sps:20.54-20.55: error: CTABLES: Syntax error at `**': expecting number.
290 ctables.sps:21.56-21.57: error: CTABLES: Syntax error at `**': expecting string.
292 ctables.sps:22.48-22.49: error: CTABLES: Syntax error at `**': expecting
295 ctables.sps:23.47-23.48: error: CTABLES: Unknown postcompute &x.
296 23 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&x].
299 ctables.sps:24.61-24.63: error: CTABLES: Syntax error at `101': Expected number
300 between 0 and 100 for PTILE.
302 ctables.sps:25.58: error: CTABLES: Syntax error at end of command: expecting
305 ctables.sps:26.54: error: CTABLES: Syntax error at end of command: expecting
308 ctables.sps:27.54-27.55: error: CTABLES: Syntax error at `**': expecting INCLUDE
311 ctables.sps:28.52-28.53: error: CTABLES: Syntax error at `**': expecting YES or
314 ctables.sps:29.52-29.53: error: CTABLES: Syntax error at `**': expecting string.
316 ctables.sps:30.55-30.56: error: CTABLES: Syntax error at `**': expecting BEFORE
319 ctables.sps:31.52-31.53: error: CTABLES: Syntax error at `**': expecting INCLUDE
322 ctables.sps:32.46-32.47: error: CTABLES: Syntax error at `**': expecting ORDER,
323 KEY, MISSING, TOTAL, LABEL, POSITION, or EMPTY.
325 ctables.sps:33.54-33.55: error: CTABLES: Syntax error at `**': expecting TOTAL,
326 LABEL, POSITION, or EMPTY.
328 ctables.sps:34.36: error: CTABLES: Syntax error at `0': Expected positive
329 integer for SUBTOTAL.
331 ctables.sps:35.37-35.38: error: CTABLES: Syntax error at `**': expecting `@:>@'.
333 ctables.sps:36.31-36.32: error: CTABLES: Syntax error at `**': expecting THRU.
335 ctables.sps:37.36-37.37: error: CTABLES: Syntax error at `**': expecting number.
337 ctables.sps:38.35-38.36: error: CTABLES: Syntax error at `**': expecting number.
339 ctables.sps:39.29-39.30: error: CTABLES: Syntax error at `**': expecting `@:>@'.
341 ctables.sps:40.29: error: CTABLES: Syntax error at `x': expecting `@:}@'.
343 ctables.sps:41.19-41.20: error: CTABLES: Syntax error at `**': expecting &.
345 ctables.sps:42.20: error: CTABLES: Syntax error at `1': expecting identifier.
347 ctables.sps:43.21-43.22: error: CTABLES: Syntax error at `**': expecting `='.
349 ctables.sps:44.22-44.23: error: CTABLES: Syntax error at `**': expecting EXPR.
351 ctables.sps:45.26-45.27: error: CTABLES: Syntax error at `**': expecting `('.
353 ctables.sps:46.28: error: CTABLES: Syntax error at `x': expecting `)'.
355 ctables.sps:47.31-47.49: warning: CTABLES: New definition of &k will override
356 the previous definition.
357 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
358 | ^~~~~~~~~~~~~~~~~~~
360 ctables.sps:47.10-47.28: note: CTABLES: This is the previous definition.
361 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
362 | ^~~~~~~~~~~~~~~~~~~
364 ctables.sps:47.50: error: CTABLES: Syntax error at end of command: expecting
367 ctables.sps:48.53-48.64: error: CTABLES: Syntax error at `NOTAFUNCTION':
368 Expecting summary function name.
370 ctables.sps:49.59-49.60: error: CTABLES: Syntax error at `**': Expected number
371 between 0 and 100 for PTILE.
373 ctables.sps:50.52-50.53: error: CTABLES: Syntax error at `**': expecting string.
375 ctables.sps:51.61-51.62: error: CTABLES: Syntax error at `**': expecting YES or
378 ctables.sps:52.46-52.47: error: CTABLES: Syntax error at `**': expecting LABEL,
379 FORMAT, or HIDESOURCECATS.
381 ctables.sps:53.23-53.24: error: CTABLES: Syntax error at `**': expecting string.
383 ctables.sps:54.25-54.26: error: CTABLES: Syntax error at `**': expecting string.
385 ctables.sps:55.17-55.18: error: CTABLES: Syntax error at `**': expecting
386 MINCOLWIDTH, MAXCOLWIDTH, UNITS, EMPTY, or MISSING.
388 ctables.sps:56: error: CTABLES: MINCOLWIDTH must not be greater than
391 ctables.sps:57.18-57.19: error: CTABLES: Syntax error at `**': expecting
394 ctables.sps:58: error: CTABLES: NOTAVAR is not a variable name.
396 ctables.sps:59.32-59.33: error: CTABLES: Syntax error at `**': expecting
399 ctables.sps:60.40-60.41: error: CTABLES: Syntax error at `**': expecting
400 DEFAULT, NAME, LABEL, BOTH, or NONE.
402 ctables.sps:61.17-61.18: error: CTABLES: Syntax error at `**': expecting
405 ctables.sps:62.33-62.34: error: CTABLES: Syntax error at `**': expecting YES or
408 ctables.sps:63.19-63.20: error: CTABLES: Syntax error at `**': expecting
409 VARIABLE or LISTWISE.
411 ctables.sps:64.17-64.18: error: CTABLES: Syntax error at `**': expecting
414 ctables.sps:65: error: CTABLES: NOTAVAR is not a variable name.
416 ctables.sps:66.32: error: CTABLES: Syntax error at `1': Expected integer 2 or
417 greater for HIDESMALLCOUNTS COUNT.
419 ctables.sps:67.10-67.13: error: CTABLES: Syntax error at `QUUX': expecting one
420 of the following: FORMAT, VLABELS, MRSETS, SMISSING, PCOMPUTE, PPROPERTIES,
421 WEIGHT, HIDESMALLCOUNTS, TABLE.
423 ctables.sps:68.33: error: CTABLES: Syntax error at end of command: expecting
426 ctables.sps:69.19-69.20: error: CTABLES: Syntax error at `**': expecting `/'.
428 ctables.sps:70.38-70.39: error: CTABLES: Syntax error at `**': expecting COLUMN,
431 ctables.sps:71.37-71.38: error: CTABLES: Syntax error at `**': expecting YES or
434 ctables.sps:72.29-72.30: error: CTABLES: Syntax error at `**': expecting
437 ctables.sps:73.39-73.40: error: CTABLES: Syntax error at `**': expecting
440 ctables.sps:74.39-74.40: error: CTABLES: Syntax error at `**': expecting
443 ctables.sps:75.29-75.30: error: CTABLES: Syntax error at `**': expecting AUTO,
444 ROWLABELS, or COLLABELS.
446 ctables.sps:76.30-76.31: error: CTABLES: Syntax error at `**': expecting
449 ctables.sps:77.38-77.40: error: CTABLES: Syntax error at `101': Expected number
450 in @<:@0,100@:}@ for CILEVEL.
452 ctables.sps:78.28-78.29: error: CTABLES: Syntax error at `**': expecting
453 CAPTION, CORNER, or TITLE.
455 ctables.sps:79.34-79.35: error: CTABLES: Syntax error at `**': expecting
458 ctables.sps:80.35-80.36: error: CTABLES: Syntax error at `**': Expected number
459 in @<:@0,1@:}@ for ALPHA.
461 ctables.sps:81.43-81.44: error: CTABLES: Syntax error at `**': expecting YES or
464 ctables.sps:82.40-82.41: error: CTABLES: Syntax error at `**': expecting
465 ALLVISIBLE or SUBTOTALS.
467 ctables.sps:83.29-83.30: error: CTABLES: Syntax error at `**': expecting TYPE,
468 ALPHA, INCLUDEMRSETS, or CATEGORIES.
470 ctables.sps:84.38-84.39: error: CTABLES: Syntax error at `**': expecting PROP or
473 ctables.sps:85.39-85.40: error: CTABLES: Syntax error at `**': Expected number
476 ctables.sps:86.39: error: CTABLES: Syntax error at `0': Expected number in (0,1)
479 ctables.sps:87.40-87.41: error: CTABLES: Syntax error at `**': expecting
480 BONFERRONI, BH, or NONE.
482 ctables.sps:88.47-88.48: error: CTABLES: Syntax error at `**': expecting YES or
485 ctables.sps:89.47-89.48: error: CTABLES: Syntax error at `**': expecting ALLCATS
488 ctables.sps:90.44-90.45: error: CTABLES: Syntax error at `**': expecting
489 ALLVISIBLE or SUBTOTALS.
491 ctables.sps:91.39-91.40: error: CTABLES: Syntax error at `**': expecting YES or
494 ctables.sps:92.39-92.40: error: CTABLES: Syntax error at `**': expecting APA or
497 ctables.sps:93.41-93.42: error: CTABLES: Syntax error at `**': expecting YES or
500 ctables.sps:94.33-94.34: error: CTABLES: Syntax error at `**': expecting one of
501 the following: TYPE, ALPHA, ADJUST, INCLUDEMRSETS, MEANSVARIANCE, CATEGORIES,
502 MERGE, STYLE, SHOWSIG.
504 ctables.sps:95.22-95.23: error: CTABLES: Syntax error at `**': expecting TABLE,
505 SLABELS, CLABELS, CRITERIA, CATEGORIES, TITLES, SIGTEST, or COMPARETEST.
507 ctables.sps:96: error: CTABLES: ROWLABELS and COLLABELS may not both be
510 ctables.sps:97.16-97.26: error: CTABLES: Cannot nest scale variables.
511 97 | CTABLES /TABLE qn20 > qnd1.
514 ctables.sps:97.16-97.19: note: CTABLES: This is an outer scale variable.
515 97 | CTABLES /TABLE qn20 > qnd1.
518 ctables.sps:97.23-97.26: note: CTABLES: This is an inner scale variable.
519 97 | CTABLES /TABLE qn20 > qnd1.
522 ctables.sps:98.16-98.35: error: CTABLES: Summaries may only be requested for
523 categorical variables at the innermost nesting level.
524 98 | CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
525 | ^~~~~~~~~~~~~~~~~~~~
527 ctables.sps:98.16-98.18: note: CTABLES: This outer categorical variable has a
529 98 | CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
532 ctables.sps:100.52-100.56: error: CTABLES: Failed to parse category
533 specification as format DATETIME: Day (123) must be between 1 and 31..
534 100 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=datetime ['123'].
539 AT_SETUP([CTABLES parsing - more negative])
540 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
541 AT_DATA([ctables.sps],
543 CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
544 CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
545 CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
548 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['string'].
549 CTABLES /TABLE string /CATEGORIES VARIABLES=string [1].
551 CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1).
553 CTABLES /TABLE qnd1 /CLABELS ROWLABELS=OPPOSITE.
554 CTABLES /TABLE qn1 + string /CLABELS ROWLABELS=OPPOSITE.
555 CTABLES /TABLE qn1 + qnsa1 /CLABELS ROWLABELS=OPPOSITE.
556 CTABLES /TABLE qn105ba + qn105bb /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn105ba [1,2,3].
558 CTABLES /PCOMPUTE &x=EXPR(1**2**3).
559 CTABLES /PCOMPUTE &x=EXPR([**]).
560 CTABLES /PCOMPUTE &x=EXPR(**).
564 CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
566 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=PTILE(qn1, 50).
568 CTABLES /TABLE $mrset.
570 CTABLES /TABLE qn113 /SIGTEST TYPE=CHISQUARE.
571 CTABLES /TABLE qn113 /COMPARETEST TYPE=PROP.
573 CTABLES /TABLE qn113 [COUNT.UCL].
575 CTABLES /TABLE qn1 /CATEGORIES **.
577 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [1],
578 [[ctables.sps:2.76-2.78: error: CTABLES: Computed category &pc references a
579 category not included in the category list.
580 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
585 ctables.sps:2.28-2.35: note: CTABLES: This is the missing category.
586 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
590 ctables.sps:2.76-2.79: note: CTABLES: To fix the problem, add subtotals to the
591 list of categories here.
592 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
597 ctables.sps:3.73-3.75: error: CTABLES: Computed category &pc references a
598 category not included in the category list.
599 3 | CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1
604 ctables.sps:3.28-3.32: note: CTABLES: This is the missing category.
605 3 | CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1
609 ctables.sps:3: note: CTABLES: To fix the problem, add TOTAL=YES to the
610 variable's CATEGORIES specification.
612 ctables.sps:4.76-4.99: error: CTABLES: These categories include 2 instances of
613 SUBTOTAL or HSUBTOTAL, so references from computed categories must refer to
614 subtotals by position, e.g. SUBTOTAL[1].
615 4 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
616 VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
618 ^~~~~~~~~~~~~~~~~~~~~~~~
620 ctables.sps:4.28-4.35: note: CTABLES: This is the reference that lacks a
622 4 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
623 VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
626 ctables.sps:7.47-7.54: error: CTABLES: This category specification may be
627 applied only to string variables, but this subcommand tries to apply it to
628 numeric variable QN1.
629 7 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['string'].
632 ctables.sps:8.53: error: CTABLES: This category specification may be applied
633 only to numeric variables, but this subcommand tries to apply it to string
635 8 | CTABLES /TABLE string /CATEGORIES VARIABLES=string [1].
638 ctables.sps:10.74-10.86: error: CTABLES: Syntax error at `KEY=MEAN(qn1)': Data-
639 dependent sorting is not implemented.
641 ctables.sps:12: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
642 moved to be categorical, but qnd1 is a scale variable.
644 ctables.sps:13: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
645 moved to have the same width, but QN1 has width 0 and string has width 8.
647 ctables.sps:14: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
648 moved to have the same value labels, but QN1 and QNSA1 have different value
651 ctables.sps:15: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
652 moved to have the same category specifications, but QN105BA and QN105BB have
653 different category specifications.
655 ctables.sps:17.27-17.33: warning: CTABLES: The exponentiation operator (`**') is
656 left-associative: `a**b**c' equals `(a**b)**c', not `a**(b**c)'. To disable
657 this warning, insert parentheses.
658 17 | CTABLES /PCOMPUTE &x=EXPR(1**2**3).
661 ctables.sps:17.35: error: CTABLES: Syntax error at end of command: expecting
664 ctables.sps:18.28-18.29: error: CTABLES: Syntax error at `**'.
666 ctables.sps:19.27-19.28: error: CTABLES: Syntax error at `**'.
668 ctables.sps:21.15: error: CTABLES: Syntax error at end of command: At least one
669 variable must be specified.
671 ctables.sps:23: error: CTABLES: Summaries may appear only on one axis.
673 ctables.sps:23.50-23.54: note: CTABLES: This variable on the layers axis has a
675 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
678 ctables.sps:23.16-23.20: note: CTABLES: This variable on the rows axis has a
680 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
683 ctables.sps:23.33-23.37: note: CTABLES: This variable on the columns axis has a
685 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
688 ctables.sps:23.33-23.37: note: CTABLES: This is a scale variable, so it always
689 has a summary even if the syntax does not explicitly specify one.
690 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
693 ctables.sps:25.46-25.63: error: CTABLES: Syntax error at `KEY=PTILE(qn1, 50)':
694 Data-dependent sorting is not implemented.
696 ctables.sps:27.16-27.21: error: CTABLES: Syntax error at `$mrset': Multiple
697 response set support not implemented.
699 ctables.sps:29.23-29.44: error: CTABLES: Syntax error at `SIGTEST
700 TYPE=CHISQUARE': Support for SIGTEST not yet implemented.
702 ctables.sps:30.35-30.43: error: CTABLES: Syntax error at `TYPE=PROP': Support
703 for COMPARETEST not yet implemented.
705 ctables.sps:32.23-32.31: error: CTABLES: Syntax error at `COUNT.UCL': Support
706 for LCL, UCL, and SE summary functions is not yet implemented.
708 ctables.sps:34.32-34.33: error: CTABLES: Syntax error at `**': expecting
713 AT_SETUP([CTABLES one categorical variable])
714 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
715 AT_DATA([ctables.sps],
718 CTABLES /TABLE BY qn1.
719 CTABLES /TABLE BY BY qn1.
721 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
723 ╭────────────────────────────────────────────────────────────────────────┬─────╮
725 ├────────────────────────────────────────────────────────────────────────┼─────┤
726 │ 1. How often do you usually drive a car or other Every day │ 4667│
727 │motor vehicle? Several days a week │ 1274│
728 │ Once a week or less │ 361│
729 │ Only certain times a │ 130│
732 ╰────────────────────────────────────────────────────────────────────────┴─────╯
735 ╭──────────────────────────────────────────────────────────────────────────────╮
736 │ 1. How often do you usually drive a car or other motor vehicle? │
737 ├─────────┬──────────────────┬──────────────────┬────────────────────────┬─────┤
738 │ │ Several days a │ Once a week or │ Only certain times a │ │
739 │Every day│ week │ less │ year │Never│
740 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
741 │ Count │ Count │ Count │ Count │Count│
742 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
743 │ 4667│ 1274│ 361│ 130│ 540│
744 ╰─────────┴──────────────────┴──────────────────┴────────────────────────┴─────╯
756 AT_SETUP([CTABLES one string variable])
757 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
758 AT_DATA([ctables.sps],
761 MISSING VALUES licensed('DontKnow', 'Refused').
762 RECODE qnd7a(1='Yes')(2='No')(3='DontKnow')(4='Refused') INTO licensed.
763 CTABLES /TABLE licensed.
764 CTABLES /TABLE licensed [COUNT, TOTALS[COUNT, VALIDN]] /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
765 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['Yes', 'No'] TOTAL=YES.
766 * Notice that the string matching is case-sensitive.
767 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['Yes', 'no'] TOTAL=YES.
768 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['No' THRU 'yes'] TOTAL=YES.
770 /PCOMPUTE ¬yes=EXPR(['No']+['DontKnow']+['Refused'])
771 /PPROPERTIES ¬yes LABEL='Not Yes' HIDESOURCECATS=YES
773 /CATEGORIES VARIABLES=licensed ['Yes', ¬yes, 'No', 'DontKnow', 'Refused'].
775 /PCOMPUTE ¬yes=EXPR(['DontKnow' THRU 'No'] + ['Refused'])
776 /PPROPERTIES ¬yes LABEL='Not Yes' HIDESOURCECATS=YES
778 /CATEGORIES VARIABLES=licensed ['Yes', ¬yes, 'DontKnow' THRU 'No', 'Refused'].
780 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
790 ╭─────────────────┬─────┬───────╮
792 ├─────────────────┼─────┼───────┤
793 │licensed DontKnow│ 4│ │
797 │ Total │ 6999│ 6951│
798 ╰─────────────────┴─────┴───────╯
801 ╭──────────────┬─────╮
803 ├──────────────┼─────┤
804 │licensed Yes │ 6379│
807 ╰──────────────┴─────╯
810 ╭──────────────┬─────╮
812 ├──────────────┼─────┤
813 │licensed Yes │ 6379│
816 ╰──────────────┴─────╯
819 ╭────────────────┬─────╮
821 ├────────────────┼─────┤
826 ╰────────────────┴─────╯
829 ╭────────────────┬─────╮
831 ├────────────────┼─────┤
832 │licensed Yes │ 6379│
834 ╰────────────────┴─────╯
837 ╭────────────────┬─────╮
839 ├────────────────┼─────┤
840 │licensed Yes │ 6379│
842 ╰────────────────┴─────╯
846 AT_SETUP([CTABLES one scale variable])
847 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
848 AT_DATA([ctables.sps],
851 CTABLES /TABLE qnd1[COUNT, VALIDN, TOTALN, MEAN, STDDEV, MINIMUM, MAXIMUM].
852 CTABLES /TABLE BY qnd1.
853 CTABLES /TABLE BY BY qnd1.
855 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
856 Descriptive Statistics
857 ╭──────────────────────────┬────┬─────┬───────┬───────┬───────────╮
858 │ │ N │ Mean│Std Dev│Minimum│ Maximum │
859 ├──────────────────────────┼────┼─────┼───────┼───────┼───────────┤
860 │D1. AGE: What is your age?│6930│48.26│ 19.01│ 16│86 or older│
861 │Valid N (listwise) │6999│ │ │ │ │
862 │Missing N (listwise) │ 69│ │ │ │ │
863 ╰──────────────────────────┴────┴─────┴───────┴───────┴───────────╯
866 ╭──────────────────────┬─────┬───────┬───────┬────┬────────────┬───────┬───────╮
867 │ │ │ │ │ │ Std │ │ │
868 │ │Count│Valid N│Total N│Mean│ Deviation │Minimum│Maximum│
869 ├──────────────────────┼─────┼───────┼───────┼────┼────────────┼───────┼───────┤
870 │D1. AGE: What is your │ 6999│ 6930│ 6999│ 48│ 19│ 16│ 86│
871 │age? │ │ │ │ │ │ │ │
872 ╰──────────────────────┴─────┴───────┴───────┴────┴────────────┴───────┴───────╯
875 ╭──────────────────────────╮
876 │D1. AGE: What is your age?│
877 ├──────────────────────────┤
879 ├──────────────────────────┤
881 ╰──────────────────────────╯
884 D1. AGE: What is your age?
893 AT_SETUP([CTABLES simple stacking])
894 AT_KEYWORDS([stack stacked])
895 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
896 AT_DATA([ctables.sps],
898 CTABLES /TABLE qn105ba + qn105bb + qn105bc + qn105bd BY qns3a [COLPCT PCT8.0].
900 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
902 ╭───────────────────────────────────────────────────────────────┬──────────────╮
909 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
910 │105b. How likely is it that drivers who have had Almost │ 10%│ 11%│
911 │too much to drink to drive safely will A. Get certain │ │ │
912 │stopped by the police? Very likely │ 21%│ 22%│
913 │ Somewhat │ 38%│ 42%│
915 │ Somewhat │ 21%│ 18%│
919 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
920 │105b. How likely is it that drivers who have had Almost │ 14%│ 18%│
921 │too much to drink to drive safely will B. Have an certain │ │ │
922 │accident? Very likely │ 36%│ 45%│
923 │ Somewhat │ 39%│ 32%│
929 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
930 │105b. How likely is it that drivers who have had Almost │ 18%│ 16%│
931 │too much to drink to drive safely will C. Be certain │ │ │
932 │convicted for drunk driving? Very likely │ 32%│ 28%│
933 │ Somewhat │ 27%│ 32%│
935 │ Somewhat │ 15%│ 15%│
939 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
940 │105b. How likely is it that drivers who have had Almost │ 16%│ 16%│
941 │too much to drink to drive safely will D. Be certain │ │ │
942 │arrested for drunk driving? Very likely │ 26%│ 27%│
943 │ Somewhat │ 32%│ 35%│
945 │ Somewhat │ 17%│ 15%│
949 ╰───────────────────────────────────────────────────────────────┴──────┴───────╯
953 AT_SETUP([CTABLES show or hide empty categories])
954 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
955 AT_DATA([ctables.sps],
957 IF (qn105ba = 2) qn105ba = 1.
958 IF (qns3a = 1) qns3a = 2.
959 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0].
960 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
961 /CATEGORIES VAR=qn105ba EMPTY=EXCLUDE.
962 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
963 /CATEGORIES VAR=qns3a EMPTY=EXCLUDE.
964 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
965 /CATEGORIES VAR=ALL EMPTY=EXCLUDE.
967 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
969 ╭──────────────────────────────────────────────────────────────┬───────────────╮
976 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
977 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
978 │too much to drink to drive safely will A. Get certain │ │ │
979 │stopped by the police? Very likely│ .│ 0%│
986 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
989 ╭──────────────────────────────────────────────────────────────┬───────────────╮
996 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
997 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
998 │too much to drink to drive safely will A. Get certain │ │ │
999 │stopped by the police? Somewhat │ .│ 40%│
1001 │ Somewhat │ .│ 19%│
1005 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
1008 ╭────────────────────────────────────────────────────────────────────┬─────────╮
1015 ├────────────────────────────────────────────────────────────────────┼─────────┤
1016 │105b. How likely is it that drivers who have had too Almost │ 32%│
1017 │much to drink to drive safely will A. Get stopped by certain │ │
1018 │the police? Very likely │ 0%│
1025 ╰────────────────────────────────────────────────────────────────────┴─────────╯
1028 ╭────────────────────────────────────────────────────────────────────┬─────────╮
1035 ├────────────────────────────────────────────────────────────────────┼─────────┤
1036 │105b. How likely is it that drivers who have had too Almost │ 32%│
1037 │much to drink to drive safely will A. Get stopped by certain │ │
1038 │the police? Somewhat │ 40%│
1044 ╰────────────────────────────────────────────────────────────────────┴─────────╯
1048 AT_SETUP([CTABLES sorting categories])
1049 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1050 AT_DATA([ctables.sps],
1052 IF (QND5A=6) QND5A=-1.
1053 IF (QND5A=5) QND5A=-2.
1054 CTABLES /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=VALUE ORDER=A
1055 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=VALUE ORDER=D
1056 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=LABEL ORDER=A
1057 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=LABEL ORDER=D.
1059 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1061 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1063 ├────────────────────────────────────────────────────────────────────────┼─────┤
1064 │D5a. What would you say is your primary ethnic -2.00 │ 52│
1065 │background? -1.00 │ 78│
1069 │ South American │ 34│
1070 │ Central American │ 0│
1071 │ Puerto Rican, OR │ 0│
1072 │ Something else │ 68│
1073 │ Multiple - cannot choose│ 7│
1075 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1078 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1080 ├────────────────────────────────────────────────────────────────────────┼─────┤
1081 │D5a. What would you say is your primary ethnic Multiple - cannot choose│ 7│
1082 │background? one │ │
1083 │ Something else │ 68│
1084 │ Puerto Rican, OR │ 0│
1085 │ Central American │ 0│
1086 │ South American │ 34│
1092 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1095 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1097 ├────────────────────────────────────────────────────────────────────────┼─────┤
1098 │D5a. What would you say is your primary ethnic Central American │ 0│
1099 │background? Cuban │ 20│
1101 │ Multiple - cannot choose│ 7│
1103 │ Puerto Rican, OR │ 0│
1104 │ Something else │ 68│
1105 │ South American │ 34│
1109 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1112 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1114 ├────────────────────────────────────────────────────────────────────────┼─────┤
1115 │D5a. What would you say is your primary ethnic Spanish │ 48│
1116 │background? South American │ 34│
1117 │ Something else │ 68│
1118 │ Puerto Rican, OR │ 0│
1119 │ Multiple - cannot choose│ 7│
1123 │ Central American │ 0│
1126 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1130 AT_SETUP([CTABLES simple nesting])
1131 AT_KEYWORDS([nest nested])
1132 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1133 AT_DATA([ctables.sps],
1135 CTABLES /TABLE (qn105ba + qn105bb + qn105bc + qn105bd) > qns3a [COUNT, TABLEPCT PCT8.0]
1136 /CATEGORIES VARIABLES=qns3a TOTAL=YES.
1137 CTABLES /TABLE qns3a > (qn105ba + qn105bb + qn105bc + qn105bd) [TABLEPCT PCT8.0]
1138 /CATEGORIES VARIABLES=qns3a TOTAL=YES
1139 /CLABELS ROW=OPPOSITE.
1141 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1143 ╭─────────────────────────────────────────────────────────────────┬─────┬──────╮
1146 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1147 │105b. How likely is it that drivers Almost S3a. Male │ 297│ 4%│
1148 │who have had too much to drink to certain GENDER: Female│ 403│ 6%│
1149 │drive safely will A. Get stopped by Total │ 700│ 10%│
1150 │the police? ╶──────────────────────────┼─────┼──────┤
1151 │ Very S3a. Male │ 660│ 10%│
1152 │ likely GENDER: Female│ 842│ 12%│
1153 │ Total │ 1502│ 22%│
1154 │ ╶──────────────────────────┼─────┼──────┤
1155 │ Somewhat S3a. Male │ 1174│ 17%│
1156 │ likely GENDER: Female│ 1589│ 23%│
1157 │ Total │ 2763│ 40%│
1158 │ ╶──────────────────────────┼─────┼──────┤
1159 │ Somewhat S3a. Male │ 640│ 9%│
1160 │ unlikely GENDER: Female│ 667│ 10%│
1161 │ Total │ 1307│ 19%│
1162 │ ╶──────────────────────────┼─────┼──────┤
1163 │ Very S3a. Male │ 311│ 5%│
1164 │ unlikely GENDER: Female│ 298│ 4%│
1166 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1167 │105b. How likely is it that drivers Almost S3a. Male │ 429│ 6%│
1168 │who have had too much to drink to certain GENDER: Female│ 671│ 10%│
1169 │drive safely will B. Have an accident? Total │ 1100│ 16%│
1170 │ ╶──────────────────────────┼─────┼──────┤
1171 │ Very S3a. Male │ 1104│ 16%│
1172 │ likely GENDER: Female│ 1715│ 25%│
1173 │ Total │ 2819│ 41%│
1174 │ ╶──────────────────────────┼─────┼──────┤
1175 │ Somewhat S3a. Male │ 1203│ 17%│
1176 │ likely GENDER: Female│ 1214│ 18%│
1177 │ Total │ 2417│ 35%│
1178 │ ╶──────────────────────────┼─────┼──────┤
1179 │ Somewhat S3a. Male │ 262│ 4%│
1180 │ unlikely GENDER: Female│ 168│ 2%│
1182 │ ╶──────────────────────────┼─────┼──────┤
1183 │ Very S3a. Male │ 81│ 1%│
1184 │ unlikely GENDER: Female│ 59│ 1%│
1186 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1187 │105b. How likely is it that drivers Almost S3a. Male │ 539│ 8%│
1188 │who have had too much to drink to certain GENDER: Female│ 610│ 9%│
1189 │drive safely will C. Be convicted for Total │ 1149│ 17%│
1190 │drunk driving? ╶──────────────────────────┼─────┼──────┤
1191 │ Very S3a. Male │ 988│ 14%│
1192 │ likely GENDER: Female│ 1049│ 15%│
1193 │ Total │ 2037│ 30%│
1194 │ ╶──────────────────────────┼─────┼──────┤
1195 │ Somewhat S3a. Male │ 822│ 12%│
1196 │ likely GENDER: Female│ 1210│ 18%│
1197 │ Total │ 2032│ 30%│
1198 │ ╶──────────────────────────┼─────┼──────┤
1199 │ Somewhat S3a. Male │ 446│ 7%│
1200 │ unlikely GENDER: Female│ 548│ 8%│
1202 │ ╶──────────────────────────┼─────┼──────┤
1203 │ Very S3a. Male │ 268│ 4%│
1204 │ unlikely GENDER: Female│ 354│ 5%│
1206 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1207 │105b. How likely is it that drivers Almost S3a. Male │ 498│ 7%│
1208 │who have had too much to drink to certain GENDER: Female│ 603│ 9%│
1209 │drive safely will D. Be arrested for Total │ 1101│ 16%│
1210 │drunk driving? ╶──────────────────────────┼─────┼──────┤
1211 │ Very S3a. Male │ 805│ 12%│
1212 │ likely GENDER: Female│ 1029│ 15%│
1213 │ Total │ 1834│ 27%│
1214 │ ╶──────────────────────────┼─────┼──────┤
1215 │ Somewhat S3a. Male │ 975│ 14%│
1216 │ likely GENDER: Female│ 1332│ 19%│
1217 │ Total │ 2307│ 34%│
1218 │ ╶──────────────────────────┼─────┼──────┤
1219 │ Somewhat S3a. Male │ 535│ 8%│
1220 │ unlikely GENDER: Female│ 560│ 8%│
1221 │ Total │ 1095│ 16%│
1222 │ ╶──────────────────────────┼─────┼──────┤
1223 │ Very S3a. Male │ 270│ 4%│
1224 │ unlikely GENDER: Female│ 279│ 4%│
1226 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
1229 ╭─────────────────────────────────┬────────┬──────┬─────────┬─────────┬────────╮
1230 │ │ Almost │ Very │ Somewhat│ Somewhat│ Very │
1231 │ │ certain│likely│ likely │ unlikely│unlikely│
1232 │ ├────────┼──────┼─────────┼─────────┼────────┤
1234 │ │ Table %│ % │ Table % │ Table % │ Table %│
1235 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1236 │S3a. Male 105b. How likely │ 4%│ 10%│ 17%│ 9%│ 5%│
1237 │GENDER: is it that drivers│ │ │ │ │ │
1238 │ who have had too │ │ │ │ │ │
1239 │ much to drink to │ │ │ │ │ │
1240 │ drive safely will │ │ │ │ │ │
1241 │ A. Get stopped by │ │ │ │ │ │
1242 │ the police? │ │ │ │ │ │
1243 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1244 │ Female 105b. How likely │ 6%│ 12%│ 23%│ 10%│ 4%│
1245 │ is it that drivers│ │ │ │ │ │
1246 │ who have had too │ │ │ │ │ │
1247 │ much to drink to │ │ │ │ │ │
1248 │ drive safely will │ │ │ │ │ │
1249 │ A. Get stopped by │ │ │ │ │ │
1250 │ the police? │ │ │ │ │ │
1251 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1252 │ Total 105b. How likely │ 10%│ 22%│ 40%│ 19%│ 9%│
1253 │ is it that drivers│ │ │ │ │ │
1254 │ who have had too │ │ │ │ │ │
1255 │ much to drink to │ │ │ │ │ │
1256 │ drive safely will │ │ │ │ │ │
1257 │ A. Get stopped by │ │ │ │ │ │
1258 │ the police? │ │ │ │ │ │
1259 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1260 │S3a. Male 105b. How likely │ 6%│ 16%│ 17%│ 4%│ 1%│
1261 │GENDER: is it that drivers│ │ │ │ │ │
1262 │ who have had too │ │ │ │ │ │
1263 │ much to drink to │ │ │ │ │ │
1264 │ drive safely will │ │ │ │ │ │
1265 │ B. Have an │ │ │ │ │ │
1266 │ accident? │ │ │ │ │ │
1267 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1268 │ Female 105b. How likely │ 10%│ 25%│ 18%│ 2%│ 1%│
1269 │ is it that drivers│ │ │ │ │ │
1270 │ who have had too │ │ │ │ │ │
1271 │ much to drink to │ │ │ │ │ │
1272 │ drive safely will │ │ │ │ │ │
1273 │ B. Have an │ │ │ │ │ │
1274 │ accident? │ │ │ │ │ │
1275 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1276 │ Total 105b. How likely │ 16%│ 41%│ 35%│ 6%│ 2%│
1277 │ is it that drivers│ │ │ │ │ │
1278 │ who have had too │ │ │ │ │ │
1279 │ much to drink to │ │ │ │ │ │
1280 │ drive safely will │ │ │ │ │ │
1281 │ B. Have an │ │ │ │ │ │
1282 │ accident? │ │ │ │ │ │
1283 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1284 │S3a. Male 105b. How likely │ 8%│ 14%│ 12%│ 7%│ 4%│
1285 │GENDER: is it that drivers│ │ │ │ │ │
1286 │ who have had too │ │ │ │ │ │
1287 │ much to drink to │ │ │ │ │ │
1288 │ drive safely will │ │ │ │ │ │
1289 │ C. Be convicted │ │ │ │ │ │
1290 │ for drunk driving?│ │ │ │ │ │
1291 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1292 │ Female 105b. How likely │ 9%│ 15%│ 18%│ 8%│ 5%│
1293 │ is it that drivers│ │ │ │ │ │
1294 │ who have had too │ │ │ │ │ │
1295 │ much to drink to │ │ │ │ │ │
1296 │ drive safely will │ │ │ │ │ │
1297 │ C. Be convicted │ │ │ │ │ │
1298 │ for drunk driving?│ │ │ │ │ │
1299 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1300 │ Total 105b. How likely │ 17%│ 30%│ 30%│ 15%│ 9%│
1301 │ is it that drivers│ │ │ │ │ │
1302 │ who have had too │ │ │ │ │ │
1303 │ much to drink to │ │ │ │ │ │
1304 │ drive safely will │ │ │ │ │ │
1305 │ C. Be convicted │ │ │ │ │ │
1306 │ for drunk driving?│ │ │ │ │ │
1307 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1308 │S3a. Male 105b. How likely │ 7%│ 12%│ 14%│ 8%│ 4%│
1309 │GENDER: is it that drivers│ │ │ │ │ │
1310 │ who have had too │ │ │ │ │ │
1311 │ much to drink to │ │ │ │ │ │
1312 │ drive safely will │ │ │ │ │ │
1313 │ D. Be arrested for│ │ │ │ │ │
1314 │ drunk driving? │ │ │ │ │ │
1315 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1316 │ Female 105b. How likely │ 9%│ 15%│ 19%│ 8%│ 4%│
1317 │ is it that drivers│ │ │ │ │ │
1318 │ who have had too │ │ │ │ │ │
1319 │ much to drink to │ │ │ │ │ │
1320 │ drive safely will │ │ │ │ │ │
1321 │ D. Be arrested for│ │ │ │ │ │
1322 │ drunk driving? │ │ │ │ │ │
1323 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1324 │ Total 105b. How likely │ 16%│ 27%│ 34%│ 16%│ 8%│
1325 │ is it that drivers│ │ │ │ │ │
1326 │ who have had too │ │ │ │ │ │
1327 │ much to drink to │ │ │ │ │ │
1328 │ drive safely will │ │ │ │ │ │
1329 │ D. Be arrested for│ │ │ │ │ │
1330 │ drunk driving? │ │ │ │ │ │
1331 ╰─────────────────────────────────┴────────┴──────┴─────────┴─────────┴────────╯
1335 AT_SETUP([CTABLES nesting and scale variables])
1336 AT_KEYWORDS([nest nested])
1337 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1338 AT_DATA([ctables.sps],
1340 CTABLES /TABLE=qnd1 > qn1 BY qns3a.
1341 CTABLES /TABLE=qnd1 [MINIMUM, MAXIMUM, MEAN] > qns3a > (qn26 + qn27).
1342 CTABLES /TABLE=qnsa1 > qn105ba [COLPCT] BY qns1
1343 /CATEGORIES VAR=qnsa1 EMPTY=EXCLUDE.
1344 CTABLES /TABLE=AgeGroup > qn20 [MEAN F8.1, STDDEV F8.1].
1346 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1348 ╭─────────────────────────────────────────────────────────────────┬────────────╮
1354 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1355 │D1. AGE: What 1. How often do you usually drive Every day │ 46│ 46│
1356 │is your age? a car or other motor vehicle? Several days a │ 51│ 59│
1358 │ Once a week or │ 44│ 54│
1360 │ Only certain │ 34│ 41│
1361 │ times a year │ │ │
1363 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
1366 ╭─────────────────────────────────────────────────────────┬───────┬───────┬────╮
1367 │ │Minimum│Maximum│Mean│
1368 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
1369 │D1. AGE: S3a. Male 26. During the last 12 Yes│ 16│ 86│ 42│
1370 │What is GENDER: months, has there been a │ │ │ │
1371 │your time when you felt you │ │ │ │
1372 │age? should cut down on your No │ 16│ 86│ 46│
1374 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
1375 │ Female 26. During the last 12 Yes│ 16│ 86│ 43│
1376 │ months, has there been a │ │ │ │
1377 │ time when you felt you │ │ │ │
1378 │ should cut down on your No │ 16│ 86│ 48│
1380 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
1381 │D1. AGE: S3a. Male 27. During the last 12 Yes│ 16│ 86│ 38│
1382 │What is GENDER: months, has there been a │ │ │ │
1383 │your time when people criticized No │ 16│ 86│ 46│
1384 │age? your drinking? │ │ │ │
1385 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
1386 │ Female 27. During the last 12 Yes│ 17│ 69│ 37│
1387 │ months, has there been a │ │ │ │
1388 │ time when people criticized No │ 16│ 86│ 48│
1389 │ your drinking? │ │ │ │
1390 ╰─────────────────────────────────────────────────────────┴───────┴───────┴────╯
1393 ╭─────────────────────────────┬────────────────────────────────────────────────╮
1394 │ │S1. Including yourself, how many members of this│
1395 │ │ household are age 16 or older? │
1396 │ ├──────┬──────┬──────┬──────┬──────┬──────┬──────┤
1397 │ │ │ │ │ │ │ │ 6 or │
1398 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
1399 │ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
1400 │ │Column│Column│Column│Column│Column│Column│Column│
1401 │ │ % │ % │ % │ % │ % │ % │ % │
1402 ├─────────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
1403 │Sa1. RDD 105b. Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
1404 │SAMPLE How certain │ │ │ │ │ │ │ │
1405 │SOURCE: likely │ │ │ │ │ │ │ │
1406 │ is it Very │ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
1407 │ that likely │ │ │ │ │ │ │ │
1408 │ drivers │ │ │ │ │ │ │ │
1409 │ who have │ │ │ │ │ │ │ │
1410 │ had too Somewhat│ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
1411 │ much to likely │ │ │ │ │ │ │ │
1412 │ drink to │ │ │ │ │ │ │ │
1413 │ drive │ │ │ │ │ │ │ │
1414 │ safely Somewhat│ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
1415 │ will A. unlikely│ │ │ │ │ │ │ │
1416 │ Get │ │ │ │ │ │ │ │
1417 │ stopped Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
1418 │ by the unlikely│ │ │ │ │ │ │ │
1419 │ police? │ │ │ │ │ │ │ │
1420 ╰─────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
1423 ╭──────────────────────────────────────────────────────────────┬────┬──────────╮
1426 ├──────────────────────────────────────────────────────────────┼────┼──────────┤
1427 │Age 16 to 25 20. On how many of the thirty days in this │ 5.2│ 6.0│
1428 │group typical month did you have one or more │ │ │
1429 │ alcoholic beverages to drink? │ │ │
1430 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1431 │ 26 to 35 20. On how many of the thirty days in this │ 4.7│ 5.9│
1432 │ typical month did you have one or more │ │ │
1433 │ alcoholic beverages to drink? │ │ │
1434 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1435 │ 36 to 45 20. On how many of the thirty days in this │ 5.5│ 6.8│
1436 │ typical month did you have one or more │ │ │
1437 │ alcoholic beverages to drink? │ │ │
1438 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1439 │ 46 to 55 20. On how many of the thirty days in this │ 5.8│ 7.7│
1440 │ typical month did you have one or more │ │ │
1441 │ alcoholic beverages to drink? │ │ │
1442 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1443 │ 56 to 65 20. On how many of the thirty days in this │ 6.3│ 8.2│
1444 │ typical month did you have one or more │ │ │
1445 │ alcoholic beverages to drink? │ │ │
1446 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1447 │ 66 or 20. On how many of the thirty days in this │ 7.1│ 9.2│
1448 │ older typical month did you have one or more │ │ │
1449 │ alcoholic beverages to drink? │ │ │
1450 ╰──────────────────────────────────────────────────────────────┴────┴──────────╯
1455 AT_SETUP([CTABLES SLABELS])
1456 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1457 AT_DATA([ctables.sps],
1459 CTABLES /TABLE qn1 [COUNT COLPCT].
1460 CTABLES /TABLE qn1 [COUNT COLPCT]
1461 /SLABELS POSITION=ROW.
1462 CTABLES /TABLE qn1 [COUNT COLPCT]
1463 /SLABELS POSITION=ROW VISIBLE=NO.
1465 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1467 ╭────────────────────────────────────────────────────────────────┬─────┬───────╮
1470 ├────────────────────────────────────────────────────────────────┼─────┼───────┤
1471 │ 1. How often do you usually drive a car or Every day │ 4667│ 66.9%│
1472 │other motor vehicle? Several days a week│ 1274│ 18.3%│
1473 │ Once a week or less│ 361│ 5.2%│
1474 │ Only certain times │ 130│ 1.9%│
1476 │ Never │ 540│ 7.7%│
1477 ╰────────────────────────────────────────────────────────────────┴─────┴───────╯
1480 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1481 │ 1. How often do you usually drive a car or Every day Count │ 4667│
1482 │other motor vehicle? Column │66.9%│
1484 │ ╶───────────────────────────┼─────┤
1485 │ Several days a week Count │ 1274│
1488 │ ╶───────────────────────────┼─────┤
1489 │ Once a week or less Count │ 361│
1492 │ ╶───────────────────────────┼─────┤
1493 │ Only certain times Count │ 130│
1494 │ a year Column │ 1.9%│
1496 │ ╶───────────────────────────┼─────┤
1497 │ Never Count │ 540│
1500 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1503 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1504 │ 1. How often do you usually drive a car or other Every day │ 4667│
1505 │motor vehicle? │66.9%│
1506 │ Several days a week │ 1274│
1508 │ Once a week or less │ 361│
1510 │ Only certain times a │ 130│
1514 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1518 AT_SETUP([CTABLES simple totals])
1519 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1520 AT_DATA([ctables.sps],
1523 /CATEGORIES VARIABLES=qn17 TOTAL=YES LABEL='Number responding'.
1524 DESCRIPTIVES qn18/STATISTICS=MEAN.
1525 CTABLES /TABLE=region > qn18 [MEAN, COUNT, VALIDN, TOTALN]
1526 /CATEGORIES VARIABLES=region TOTAL=YES LABEL='All regions'.
1528 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1530 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1532 ├────────────────────────────────────────────────────────────────────────┼─────┤
1533 │17. When you drink alcoholic beverages, which ONE of OR, something else│ 2│
1534 │the following beverages do you drink MOST OFTEN? Beer │ 1073│
1537 │ Wine coolers │ 137│
1538 │ Hard liquor or │ 888│
1540 │ Flavored malt │ 83│
1542 │ Number responding │ 4221│
1543 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1545 Descriptive Statistics
1546 ╭────────────────────────────────────────────────────────────────────┬────┬────╮
1548 ├────────────────────────────────────────────────────────────────────┼────┼────┤
1549 │18. When you drink ANSWERFROM(QN17R1), about how many │4218│4.62│
1550 │ANSWERFROM(QN17R2) do you usually drink per sitting? │ │ │
1551 │Valid N (listwise) │6999│ │
1552 │Missing N (listwise) │2781│ │
1553 ╰────────────────────────────────────────────────────────────────────┴────┴────╯
1556 ╭──────────────────────────────────────────────────────┬────┬─────┬──────┬─────╮
1557 │ │ │ │ Valid│Total│
1558 │ │Mean│Count│ N │ N │
1559 ├──────────────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1560 │Region NE 18. When you drink ANSWERFROM(QN17R1),│4.36│ 1409│ 949│ 1409│
1561 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1562 │ you usually drink per sitting? │ │ │ │ │
1563 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1564 │ MW 18. When you drink ANSWERFROM(QN17R1),│4.67│ 1654│ 1027│ 1654│
1565 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1566 │ you usually drink per sitting? │ │ │ │ │
1567 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1568 │ S 18. When you drink ANSWERFROM(QN17R1),│4.71│ 2390│ 1287│ 2390│
1569 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1570 │ you usually drink per sitting? │ │ │ │ │
1571 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1572 │ W 18. When you drink ANSWERFROM(QN17R1),│4.69│ 1546│ 955│ 1546│
1573 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1574 │ you usually drink per sitting? │ │ │ │ │
1575 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1576 │ All 18. When you drink ANSWERFROM(QN17R1),│4.62│ 6999│ 4218│ 6999│
1577 │ regions about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1578 │ you usually drink per sitting? │ │ │ │ │
1579 ╰──────────────────────────────────────────────────────┴────┴─────┴──────┴─────╯
1583 AT_SETUP([CTABLES subtotals])
1584 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1585 AT_DATA([ctables.sps],
1587 CTABLES /TABLE=qn105ba BY qns1
1588 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
1589 CTABLES /TABLE=qn105ba [COLPCT] BY qns1
1590 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL].
1591 CTABLES /TABLE=qn105ba BY qns1
1592 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL]
1593 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
1595 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1597 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
1598 │ │ S1. Including yourself, how many members of this household │
1599 │ │ are age 16 or older? │
1600 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
1601 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
1602 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1603 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1604 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1605 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
1606 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
1607 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
1608 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
1609 │ likely │ │ │ │ │ │ │ │
1610 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
1611 │ unlikely │ │ │ │ │ │ │ │
1612 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
1613 │ unlikely │ │ │ │ │ │ │ │
1614 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
1617 ╭────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────╮
1618 │ │ S1. Including yourself, how many members of this household │
1619 │ │ are age 16 or older? │
1620 │ ├────────┬────────┬────────┬────────┬───────┬────────┬────────┤
1621 │ │ │ │ │ │ │ │ 6 or │
1622 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
1623 │ ├────────┼────────┼────────┼────────┼───────┼────────┼────────┤
1624 │ │ │ │ │ │ Column│ │ │
1625 │ │Column %│Column %│Column %│Column %│ % │Column %│Column %│
1626 ├────────────────────────────────────────────────────────┼────────┼────────┼────────┼────────┼───────┼────────┼────────┤
1627 │105b. How likely is it that drivers who have Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
1628 │had too much to drink to drive safely will certain │ │ │ │ │ │ │ │
1629 │A. Get stopped by the police? Very likely│ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
1630 │ Somewhat │ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
1631 │ likely │ │ │ │ │ │ │ │
1632 │ Subtotal │ │ 72.8%│ 68.6%│ 75.0%│ 74.0%│ 81.8%│ 81.0%│
1633 │ Somewhat │ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
1634 │ unlikely │ │ │ │ │ │ │ │
1635 │ Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
1636 │ unlikely │ │ │ │ │ │ │ │
1637 │ Subtotal │ │ 27.2%│ 31.4%│ 25.0%│ 26.0%│ 18.2%│ 19.0%│
1638 ╰────────────────────────────────────────────────────────┴────────┴────────┴────────┴────────┴───────┴────────┴────────╯
1641 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
1642 │ │ S1. Including yourself, how many members of this household │
1643 │ │ are age 16 or older? │
1644 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
1645 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
1646 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1647 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1648 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1649 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
1650 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
1651 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
1652 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
1653 │ likely │ │ │ │ │ │ │ │
1654 │ Subtotal │ 1121│ 2047│ 3168│ 375│ 142│ 45│ 562│
1655 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
1656 │ unlikely │ │ │ │ │ │ │ │
1657 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
1658 │ unlikely │ │ │ │ │ │ │ │
1659 │ Subtotal │ 419│ 937│ 1356│ 125│ 50│ 10│ 185│
1660 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
1664 AT_SETUP([CTABLES PCOMPUTE])
1665 AT_KEYWORDS([postcompute])
1666 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1667 AT_DATA([ctables.sps],
1670 /PCOMPUTE &x=EXPR([3] + [4])
1671 /PCOMPUTE &y=EXPR([4] + [5])
1672 /PPROPERTIES &x LABEL='3+4' FORMAT=COUNT F8.2
1673 /PPROPERTIES &y LABEL=')LABEL[5]+)LABEL[6]'
1674 /TABLE=qn105ba [COUNT, ROWPCT] BY qns1
1675 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, &x, &y, SUBTOTAL] TOTAL=YES
1677 * Adding HIDESOURCECATS=YES for one PPROPERTIES.
1679 /PCOMPUTE &x=EXPR([3] + [4])
1680 /PCOMPUTE &y=EXPR([4] + [5])
1681 /PPROPERTIES &x LABEL='3+4' FORMAT=COUNT F8.2
1682 /PPROPERTIES &y LABEL=')LABEL[5]+)LABEL[6]' HIDESOURCECATS=YES
1683 /TABLE=qn105ba [COUNT, ROWPCT] BY qns1
1684 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, &x, &y, SUBTOTAL] TOTAL=YES
1686 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1688 ╭───────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
1689 │ │ S1. Including yourself, how many members of this household are age 16 or older? │
1690 │ ├───────────┬───────────┬───────────┬───────────┬──────────┬──────────┬────────────┬──────────┬───────────┬────────────┤
1691 │ │ 1 │ 2 │ Subtotal │ 3 │ 4 │ 5 │ 3+4 │ 4+5 │ Subtotal │ Total │
1692 │ ├─────┬─────┼─────┬─────┼─────┬─────┼─────┬─────┼─────┬────┼─────┬────┼──────┬─────┼─────┬────┼─────┬─────┼─────┬──────┤
1693 │ │ │ │ │ │ │ │ │ │ │ Row│ │ Row│ │ │ │ Row│ │ │ │ │
1694 │ │Count│Row %│Count│Row %│Count│Row %│Count│Row %│Count│ % │Count│ % │ Count│Row %│Count│ % │Count│Row %│Count│ Row %│
1695 ├───────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼────┼─────┼────┼──────┼─────┼─────┼────┼─────┼─────┼─────┼──────┤
1696 │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%│
1697 │likely is certain │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1698 │it that │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1699 │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%│
1700 │who have likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1701 │had too │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1702 │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%│
1703 │drink to likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1704 │drive │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1705 │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%│
1706 │will A. unlikely│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1707 │Get │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1708 │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%│
1709 │the unlikely│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1710 │police? │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1711 ╰───────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴────┴─────┴────┴──────┴─────┴─────┴────┴─────┴─────┴─────┴──────╯
1714 ╭─────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────╮
1715 │ │ S1. Including yourself, how many members of this household are age 16 or older? │
1716 │ ├───────────┬───────────┬───────────┬───────────┬────────────┬──────────┬───────────┬────────────┤
1717 │ │ 1 │ 2 │ Subtotal │ 3 │ 3+4 │ 4+5 │ Subtotal │ Total │
1718 │ ├─────┬─────┼─────┬─────┼─────┬─────┼─────┬─────┼──────┬─────┼─────┬────┼─────┬─────┼─────┬──────┤
1719 │ │ │ │ │ │ │ │ │ │ │ │ │ Row│ │ │ │ │
1720 │ │Count│Row %│Count│Row %│Count│Row %│Count│Row %│ Count│Row %│Count│ % │Count│Row %│Count│ Row %│
1721 ├─────────────────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼──────┼─────┼─────┼────┼─────┼─────┼─────┼──────┤
1722 │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%│
1723 │drivers who have had too much certain │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1724 │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%│
1725 │A. Get stopped by the police? likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1726 │ 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%│
1727 │ likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1728 │ 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%│
1729 │ unlikely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1730 │ 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%│
1731 │ unlikely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1732 ╰─────────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴──────┴─────┴─────┴────┴─────┴─────┴─────┴──────╯
1736 AT_SETUP([CTABLES PCOMPUTE - OTHERNM and MISSING])
1737 AT_KEYWORDS([postcompute])
1738 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1739 AT_DATA([ctables.sps],
1742 /PCOMPUTE &x=EXPR(OTHERNM)
1743 /PCOMPUTE &y=EXPR(MISSING)
1744 /PPROPERTIES &x LABEL='Drivers'
1745 /PPROPERTIES &y LABEL='Missing Values 2'
1747 /CATEGORIES VARIABLES=qn1 [OTHERNM, 5, &x, SUBTOTAL='Valid Values', MISSING, SUBTOTAL='Missing Values', &y]
1749 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1751 ╭──────────────────────────────────────────────────────────────────────────────────────────┬────────────╮
1757 ├──────────────────────────────────────────────────────────────────────────────────────────┼─────┼──────┤
1758 │ 1. How often do you usually drive a car or other motor vehicle? Every day │ 2305│ 2362│
1759 │ Several days a week │ 440│ 834│
1760 │ Once a week or less │ 125│ 236│
1761 │ Only certain times a year│ 58│ 72│
1763 │ Drivers │ 2928│ 3504│
1764 │ Valid Values │ 3120│ 3852│
1765 │ Don't know │ 3│ 5│
1767 │ Missing Values │ 12│ 15│
1768 │ Missing Values 2 │ 12│ 15│
1769 ╰──────────────────────────────────────────────────────────────────────────────────────────┴─────┴──────╯
1773 AT_SETUP([CTABLES PCOMPUTE - THRU])
1774 AT_KEYWORDS([postcompute])
1775 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1776 AT_DATA([ctables.sps],
1779 /PCOMPUTE &x=EXPR([1 THRU 2])
1780 /PCOMPUTE &y=EXPR([3 THRU 4])
1781 /PCOMPUTE &z=EXPR([5] + MISSING)
1782 /PPROPERTIES &x LABEL='Frequent Drivers'
1783 /PPROPERTIES &y LABEL='Infrequent Drivers'
1784 /PPROPERTIES &z LABEL='Not Drivers or Missing'
1786 /CATEGORIES VARIABLES=qn1 [1 THRU 2, &x, 3 THRU 4, &y, SUBTOTAL='Drivers', 5, MISSING, &z]
1788 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1790 ╭──────────────────────────────────────────────────────────────────────────────────────────┬────────────╮
1796 ├──────────────────────────────────────────────────────────────────────────────────────────┼─────┼──────┤
1797 │ 1. How often do you usually drive a car or other motor vehicle? Every day │ 2305│ 2362│
1798 │ Several days a week │ 440│ 834│
1799 │ Frequent Drivers │ 2745│ 3196│
1800 │ Once a week or less │ 125│ 236│
1801 │ Only certain times a year│ 58│ 72│
1802 │ Infrequent Drivers │ 183│ 308│
1803 │ Drivers │ 2928│ 3504│
1805 │ Don't know │ 3│ 5│
1807 │ Not Drivers or Missing │ 204│ 363│
1808 ╰──────────────────────────────────────────────────────────────────────────────────────────┴─────┴──────╯
1812 dnl I'm not sure that this is the correct behavior (see
1813 dnl https://mail.gnu.org/archive/html/pspp-users/2022-07/msg00002.html)
1814 dnl but at least this test will notify us if the behavior changes.
1815 AT_SETUP([CTABLES intersecting PCOMPUTEs])
1816 AT_KEYWORDS([PCOMPUTE postcompute])
1817 AT_DATA([ctables.sps],
1818 [[DATA LIST LIST NOTABLE/x y z.
1821 VARIABLE LEVEL x y (NOMINAL).
1835 /PCOMPUTE &a = EXPR([1] + [2])
1836 /PCOMPUTE &b = EXPR([2] + [3])
1837 /PCOMPUTE &c = EXPR([4] * [5])
1838 /PCOMPUTE &d = EXPR([5] * [6])
1840 /CATEGORIES VARIABLES=x [1, &a, 2, &b, 3]
1841 /CATEGORIES VARIABLES=y [4, &c, 5, &d, 6].
1843 AT_CHECK([pspp ctables.sps -O box=unicode], [0],
1845 ╭───────────┬─────────────────────────────────────╮
1847 │ ├─────┬─────────┬─────┬─────────┬─────┤
1848 │ │ 4 │[4] * [5]│ 5 │[5] * [6]│ 6 │
1849 │ ├─────┼─────────┼─────┼─────────┼─────┤
1850 │ │Count│ Count │Count│ Count │Count│
1851 ├───────────┼─────┼─────────┼─────┼─────────┼─────┤
1852 │x 1 │ 5│ 10│ 2│ 18│ 9│
1853 │ [1] + [2]│ 7│ .│ 5│ .│ 13│
1854 │ 2 │ 2│ 6│ 3│ 12│ 4│
1855 │ [2] + [3]│ 3│ .│ 9│ .│ 5│
1856 │ 3 │ 1│ 6│ 6│ 6│ 1│
1857 ╰───────────┴─────┴─────────┴─────┴─────────┴─────╯
1861 AT_SETUP([CTABLES string and date and time])
1864 for gender in F M; do
1865 for month in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec; do
1866 for wkday in Sun Mon Tue Wed Thu Fri Sat Sun; do
1867 printf "$weight $gender $month $wkday\n"
1868 weight=$(expr \( $weight + 3 \) % 7 + 2)
1873 AT_DATA([ctables.sps],
1874 [[DATA LIST LIST NOTABLE FILE='ctables.txt'
1875 /w (F5.0) gender (A1) fmon (MONTH3) fday (WKDAY3).
1877 VARIABLE LEVEL w (SCALE).
1878 VARIABLE LEVEL gender fmon fday (NOMINAL).
1881 fmon 'Favorite month'
1882 fday 'Favorite day of the week'.
1883 VALUE LABELS /gender 'M' 'Male' 'F' 'Female'.
1885 /PCOMPUTE &q2 = EXPR(['APR' THRU 'June'])
1886 /PPROPERTIES &q2 LABEL='Q2'
1887 /PCOMPUTE &weekend = EXPR(['sun'] + ['Sat'])
1888 /PPROPERTIES &weekend LABEL='Weekend'
1889 /TABLE fmon BY gender > fday
1890 /CATEGORIES VARIABLES=fmon ['JAN', 'FEB', 'Mar', SUBTOTAL="Q1",
1892 'JUL' THRU 'sep', SUBTOTAL="Q3",
1893 OTHERNM, SUBTOTAL='Q4']
1894 /CATEGORIES VARIABLES=gender ['M', 'F']
1895 /CATEGORIES VARIABLE=fday ['Sun', 2 THRU 6, 'Sat', &weekend] TOTAL=YES
1896 /SLABELS VISIBLE=NO.
1898 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1900 ╭──────────────────┬───────────────────────────────────────────────────────────────────────────────────╮
1902 │ ├─────────────────────────────────────────┬─────────────────────────────────────────┤
1904 │ ├─────────────────────────────────────────┼─────────────────────────────────────────┤
1905 │ │ Favorite day of the week │ Favorite day of the week │
1906 │ ├───┬───┬───┬───┬───┬───┬───┬───────┬─────┼───┬───┬───┬───┬───┬───┬───┬───────┬─────┤
1907 │ │SUN│MON│TUE│WED│THU│FRI│SAT│Weekend│Total│SUN│MON│TUE│WED│THU│FRI│SAT│Weekend│Total│
1908 ├──────────────────┼───┼───┼───┼───┼───┼───┼───┼───────┼─────┼───┼───┼───┼───┼───┼───┼───┼───────┼─────┤
1909 │Favorite month JAN│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│ 9│ 6│ 4│ 2│ 7│ 5│ 3│ 12│ 36│
1910 │ FEB│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│
1911 │ MAR│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│
1912 │ Q1 │ 32│ 17│ 18│ 12│ 13│ 14│ 15│ │ │ 29│ 12│ 13│ 14│ 15│ 16│ 17│ │ │
1913 │ APR│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│
1914 │ MAY│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│
1915 │ JUN│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│
1916 │ Q2 │ 24│ 13│ 14│ 15│ 16│ 17│ 18│ .│ │ 28│ 15│ 16│ 17│ 18│ 12│ 13│ .│ │
1917 │ JUL│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│
1918 │ AUG│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│
1919 │ SEP│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│
1920 │ Q3 │ 54│ 29│ 31│ 33│ 28│ 30│ 32│ │ │ 62│ 33│ 28│ 30│ 32│ 27│ 29│ │ │
1921 │ OCT│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│
1922 │ NOV│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│
1923 │ DEC│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│
1924 │ Q4 │ 36│ 12│ 13│ 14│ 15│ 16│ 17│ │ │ 26│ 14│ 15│ 16│ 17│ 18│ 12│ │ │
1925 ╰──────────────────┴───┴───┴───┴───┴───┴───┴───┴───────┴─────┴───┴───┴───┴───┴───┴───┴───┴───────┴─────╯
1929 AT_SETUP([CTABLES CLABELS])
1930 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1931 AT_DATA([ctables.sps],
1933 CTABLES /TABLE AgeGroup BY qns3a.
1934 CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=OPPOSITE.
1935 CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=OPPOSITE.
1936 CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=LAYER.
1937 CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=LAYER.
1939 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
1941 ╭───────────────────────┬────────────╮
1947 ├───────────────────────┼─────┼──────┤
1948 │Age group 15 or younger│ 0│ 0│
1949 │ 16 to 25 │ 594│ 505│
1950 │ 26 to 35 │ 476│ 491│
1951 │ 36 to 45 │ 489│ 548│
1952 │ 46 to 55 │ 526│ 649│
1953 │ 56 to 65 │ 516│ 731│
1954 │ 66 or older │ 531│ 943│
1955 ╰───────────────────────┴─────┴──────╯
1958 ╭───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
1960 │ ├──────────────────────────────────────────────────────┬───────────────────────────────────────────────────────┤
1962 │ ├─────────┬───────┬──────┬──────┬──────┬───────┬───────┼──────────┬──────┬───────┬──────┬──────┬──────┬────────┤
1963 │ │ 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 │
1964 │ │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │
1965 │ ├─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
1966 │ │ Count │ Count │ Count│ Count│ Count│ Count │ Count │ Count │ Count│ Count │ Count│ Count│ Count│ Count │
1967 ├───────┼─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
1968 │Age │ 0│ 594│ 476│ 489│ 526│ 516│ 531│ 0│ 505│ 491│ 548│ 649│ 731│ 943│
1969 │group │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1970 ╰───────┴─────────┴───────┴──────┴──────┴──────┴───────┴───────┴──────────┴──────┴───────┴──────┴──────┴──────┴────────╯
1973 ╭──────────────────────────────┬────────────╮
1977 ├──────────────────────────────┼────────────┤
1978 │Age group 15 or younger Male │ 0│
1980 │ ╶────────────────────┼────────────┤
1981 │ 16 to 25 Male │ 594│
1983 │ ╶────────────────────┼────────────┤
1984 │ 26 to 35 Male │ 476│
1986 │ ╶────────────────────┼────────────┤
1987 │ 36 to 45 Male │ 489│
1989 │ ╶────────────────────┼────────────┤
1990 │ 46 to 55 Male │ 526│
1992 │ ╶────────────────────┼────────────┤
1993 │ 56 to 65 Male │ 516│
1995 │ ╶────────────────────┼────────────┤
1996 │ 66 or older Male │ 531│
1998 ╰──────────────────────────────┴────────────╯
2002 ╭─────────┬────────────╮
2008 ├─────────┼─────┼──────┤
2010 ╰─────────┴─────┴──────╯
2014 ╭─────────┬────────────╮
2020 ├─────────┼─────┼──────┤
2021 │Age group│ 594│ 505│
2022 ╰─────────┴─────┴──────╯
2026 ╭─────────┬────────────╮
2032 ├─────────┼─────┼──────┤
2033 │Age group│ 476│ 491│
2034 ╰─────────┴─────┴──────╯
2038 ╭─────────┬────────────╮
2044 ├─────────┼─────┼──────┤
2045 │Age group│ 489│ 548│
2046 ╰─────────┴─────┴──────╯
2050 ╭─────────┬────────────╮
2056 ├─────────┼─────┼──────┤
2057 │Age group│ 526│ 649│
2058 ╰─────────┴─────┴──────╯
2062 ╭─────────┬────────────╮
2068 ├─────────┼─────┼──────┤
2069 │Age group│ 516│ 731│
2070 ╰─────────┴─────┴──────╯
2074 ╭─────────┬────────────╮
2080 ├─────────┼─────┼──────┤
2081 │Age group│ 531│ 943│
2082 ╰─────────┴─────┴──────╯
2086 ╭───────────────────────┬────────────╮
2090 ├───────────────────────┼────────────┤
2091 │Age group 15 or younger│ 0│
2097 │ 66 or older │ 531│
2098 ╰───────────────────────┴────────────╯
2102 ╭───────────────────────┬────────────╮
2106 ├───────────────────────┼────────────┤
2107 │Age group 15 or younger│ 0│
2113 │ 66 or older │ 943│
2114 ╰───────────────────────┴────────────╯
2118 AT_SETUP([CTABLES missing values])
2119 AT_DATA([ctables.sps],
2120 [[DATA LIST LIST NOTABLE/x y.
2159 MISSING VALUES x (1, 2) y (2, 3).
2160 VARIABLE LEVEL ALL (NOMINAL).
2162 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN,
2163 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
2164 /CATEGORIES VARIABLES=ALL TOTAL=YES.
2165 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN,
2166 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
2167 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
2168 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2169 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2170 /CATEGORIES VARIABLES=ALL TOTAL=YES
2171 /SLABELS POSITION=ROW.
2172 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2173 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2174 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE
2175 /SLABELS POSITION=ROW.
2176 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2177 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2178 /CATEGORIES VARIABLES=x [1, 2, 3, 4] TOTAL=YES
2179 /CATEGORIES VARIABLES=y [1, 3, 4, 5] TOTAL=YES
2180 /SLABELS POSITION=ROW.
2182 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
2184 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
2185 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
2186 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
2187 │x 3.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2188 │ 4.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2189 │ 5.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2190 │ Total│ 18│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
2191 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
2192 dnl Note that Column Total N % doesn't add up to 100 because missing
2193 dnl values are included in the total but not shown as a category and this
2194 dnl is expected behavior.
2197 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
2198 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
2199 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
2200 │x 1.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
2201 │ 2.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
2202 │ 3.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2203 │ 4.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2204 │ 5.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2205 │ Total│ 30│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
2206 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
2207 dnl Note that Column Total N % doesn't add up to 100 because system-missing
2208 dnl values are included in the total but not shown as a category and this
2209 dnl is expected behavior.
2212 ╭────────────────────────┬───────────────────────────╮
2214 │ ├──────┬──────┬──────┬──────┤
2215 │ │ 1.00 │ 4.00 │ 5.00 │ Total│
2216 ├────────────────────────┼──────┼──────┼──────┼──────┤
2217 │x 3.00 Count │ 1│ 1│ 1│ 3│
2218 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2219 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2220 │ Column Total N %│ 33.3%│ 33.3%│ 33.3%│ .│
2221 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2222 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2223 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2224 │ Valid N │ │ │ │ 3│
2225 │ Total N │ │ │ │ 6│
2226 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2227 │ 4.00 Count │ 1│ 1│ 1│ 3│
2228 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2229 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2230 │ Column Total N %│ 33.3%│ 33.3%│ 33.3%│ .│
2231 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2232 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2233 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2234 │ Valid N │ │ │ │ 3│
2235 │ Total N │ │ │ │ 6│
2236 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2237 │ 5.00 Count │ 1│ 1│ 1│ 3│
2238 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2239 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2240 │ Column Total N %│ 33.3%│ 33.3%│ 33.3%│ .│
2241 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2242 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2243 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2244 │ Valid N │ │ │ │ 3│
2245 │ Total N │ │ │ │ 6│
2246 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2247 │ Total Count │ 3│ 3│ 3│ 9│
2248 │ Column % │100.0%│100.0%│100.0%│ .│
2249 │ Column Valid N %│100.0%│100.0%│100.0%│ .│
2250 │ Column Total N %│100.0%│100.0%│100.0%│ .│
2251 │ Row % │ .│ .│ .│ .│
2252 │ Row Valid N % │ .│ .│ .│ .│
2253 │ Row Total N % │ .│ .│ .│ .│
2254 │ Valid N │ 3│ 3│ 3│ 9│
2255 │ Total N │ 3│ 3│ 3│ 18│
2256 ╰────────────────────────┴──────┴──────┴──────┴──────╯
2259 ╭────────────────────────┬─────────────────────────────────────────╮
2261 │ ├──────┬──────┬──────┬──────┬──────┬──────┤
2262 │ │ 1.00 │ 2.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
2263 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2264 │x 1.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2265 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2266 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2267 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2268 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2269 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2270 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2271 │ Valid N │ │ │ │ │ │ 3│
2272 │ Total N │ │ │ │ │ │ 6│
2273 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2274 │ 2.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2275 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2276 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2277 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2278 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2279 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2280 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2281 │ Valid N │ │ │ │ │ │ 3│
2282 │ Total N │ │ │ │ │ │ 6│
2283 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2284 │ 3.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2285 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2286 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2287 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2288 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2289 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2290 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2291 │ Valid N │ │ │ │ │ │ 3│
2292 │ Total N │ │ │ │ │ │ 6│
2293 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2294 │ 4.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2295 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2296 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2297 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2298 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2299 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2300 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2301 │ Valid N │ │ │ │ │ │ 3│
2302 │ Total N │ │ │ │ │ │ 6│
2303 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2304 │ 5.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2305 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2306 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2307 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2308 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2309 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2310 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2311 │ Valid N │ │ │ │ │ │ 3│
2312 │ Total N │ │ │ │ │ │ 6│
2313 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2314 │ Total Count │ 5│ 5│ 5│ 5│ 5│ 25│
2315 │ Column % │100.0%│100.0%│100.0%│100.0%│100.0%│ .│
2316 │ Column Valid N %│100.0%│ .│ .│100.0%│100.0%│ .│
2317 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│100.0%│ .│
2318 │ Row % │ .│ .│ .│ .│ .│ .│
2319 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
2320 │ Row Total N % │ .│ .│ .│ .│ .│ .│
2321 │ Valid N │ 5│ 0│ 0│ 5│ 5│ 15│
2322 │ Total N │ 5│ 5│ 5│ 5│ 5│ 30│
2323 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────╯
2326 ╭────────────────────────┬──────────────────────────────────╮
2328 │ ├──────┬──────┬──────┬──────┬──────┤
2329 │ │ 1.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
2330 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┤
2331 │x 1.00 Count │ 1│ 1│ 1│ 1│ 4│
2332 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2333 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2334 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2335 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2336 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2337 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2338 │ Valid N │ │ │ │ │ 3│
2339 │ Total N │ │ │ │ │ 6│
2340 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2341 │ 2.00 Count │ 1│ 1│ 1│ 1│ 4│
2342 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2343 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2344 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2345 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2346 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2347 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2348 │ Valid N │ │ │ │ │ 3│
2349 │ Total N │ │ │ │ │ 6│
2350 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2351 │ 3.00 Count │ 1│ 1│ 1│ 1│ 4│
2352 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2353 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2354 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2355 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2356 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2357 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2358 │ Valid N │ │ │ │ │ 3│
2359 │ Total N │ │ │ │ │ 6│
2360 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2361 │ 4.00 Count │ 1│ 1│ 1│ 1│ 4│
2362 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2363 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2364 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2365 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2366 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2367 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2368 │ Valid N │ │ │ │ │ 3│
2369 │ Total N │ │ │ │ │ 6│
2370 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2371 │ Total Count │ 4│ 4│ 4│ 4│ 16│
2372 │ Column % │100.0%│100.0%│100.0%│100.0%│ .│
2373 │ Column Valid N %│100.0%│ .│100.0%│100.0%│ .│
2374 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│ .│
2375 │ Row % │ .│ .│ .│ .│ .│
2376 │ Row Valid N % │ .│ .│ .│ .│ .│
2377 │ Row Total N % │ .│ .│ .│ .│ .│
2378 │ Valid N │ 4│ 0│ 4│ 4│ 12│
2379 │ Total N │ 4│ 4│ 4│ 4│ 24│
2380 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────╯
2384 AT_SETUP([CTABLES SMISSING=LISTWISE])
2385 AT_KEYWORDS([SMISSING LISTWISE])
2386 AT_DATA([ctables.sps],
2387 [[DATA LIST LIST NOTABLE/x y z.
2395 VARIABLE LEVEL x (NOMINAL).
2397 CTABLES /TABLE (y + z) > x.
2398 CTABLES /SMISSING LISTWISE /TABLE (y + z) > x.
2400 * The following doesn't come out as listwise because the tables are
2401 separate, not linked by an > operator.
2402 CTABLES /SMISSING LISTWISE /TABLE (y > x) + (z > x).
2404 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
2434 AT_SETUP([CTABLES VLABELS - variables on different axes])
2435 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2436 AT_DATA([ctables.sps],
2438 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=DEFAULT /TABLE qnd5a BY qns3a.
2439 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NAME /TABLE qnd5a BY qns3a.
2440 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=LABEL /TABLE qnd5a BY qns3a.
2441 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=BOTH /TABLE qnd5a BY qns3a.
2442 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a BY qns3a.
2444 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2446 ╭────────────────────────────────────────────────────────────────┬────────────╮
2452 ├────────────────────────────────────────────────────────────────┼─────┼──────┤
2453 │D5a. What would you say is your primary Cuban │ 13│ 7│
2454 │ethnic background? Mexican │ 175│ 136│
2456 │ South American │ 21│ 13│
2457 │ Central American │ 27│ 25│
2458 │ Puerto Rican, OR │ 37│ 41│
2459 │ Something else │ 35│ 33│
2460 │ Multiple - cannot │ 2│ 5│
2462 ╰────────────────────────────────────────────────────────────────┴─────┴──────╯
2465 ╭──────────────────────────────────┬────────────╮
2471 ├──────────────────────────────────┼─────┼──────┤
2472 │QND5A Cuban │ 13│ 7│
2473 │ Mexican │ 175│ 136│
2475 │ South American │ 21│ 13│
2476 │ Central American │ 27│ 25│
2477 │ Puerto Rican, OR │ 37│ 41│
2478 │ Something else │ 35│ 33│
2479 │ Multiple - cannot choose one│ 2│ 5│
2480 ╰──────────────────────────────────┴─────┴──────╯
2483 ╭────────────────────────────────────────────────────────────────┬────────────╮
2489 ├────────────────────────────────────────────────────────────────┼─────┼──────┤
2490 │D5a. What would you say is your primary Cuban │ 13│ 7│
2491 │ethnic background? Mexican │ 175│ 136│
2493 │ South American │ 21│ 13│
2494 │ Central American │ 27│ 25│
2495 │ Puerto Rican, OR │ 37│ 41│
2496 │ Something else │ 35│ 33│
2497 │ Multiple - cannot │ 2│ 5│
2499 ╰────────────────────────────────────────────────────────────────┴─────┴──────╯
2502 ╭────────────────────────────────────────────────────────────┬────────────────╮
2505 │ ├───────┬────────┤
2507 │ ├───────┼────────┤
2509 ├────────────────────────────────────────────────────────────┼───────┼────────┤
2510 │QND5A D5a. What would you say is your Cuban │ 13│ 7│
2511 │primary ethnic background? Mexican │ 175│ 136│
2513 │ South American │ 21│ 13│
2514 │ Central American │ 27│ 25│
2515 │ Puerto Rican, OR │ 37│ 41│
2516 │ Something else │ 35│ 33│
2517 │ Multiple - cannot │ 2│ 5│
2519 ╰────────────────────────────────────────────────────────────┴───────┴────────╯
2522 ╭────────────────────────────┬─────┬──────╮
2526 ├────────────────────────────┼─────┼──────┤
2528 │Mexican │ 175│ 136│
2530 │South American │ 21│ 13│
2531 │Central American │ 27│ 25│
2532 │Puerto Rican, OR │ 37│ 41│
2533 │Something else │ 35│ 33│
2534 │Multiple - cannot choose one│ 2│ 5│
2535 ╰────────────────────────────┴─────┴──────╯
2539 AT_SETUP([CTABLES VLABELS - stacked variables])
2540 AT_KEYWORDS([stack stacking])
2541 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2542 AT_DATA([ctables.sps],
2544 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NAME /TABLE qnd5a + qns3a.
2545 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NAME /TABLE qnd5a + qns3a.
2546 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NONE /TABLE qnd5a + qns3a.
2547 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NONE /TABLE qnd5a + qns3a.
2548 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a + qns3a.
2550 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2552 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2554 ├───────────────────────────────────────────────────────────────────────┼─────┤
2555 │D5a. What would you say is your primary ethnic Cuban │ 20│
2556 │background? Mexican │ 311│
2558 │ South American │ 34│
2559 │ Central American │ 52│
2560 │ Puerto Rican, OR │ 78│
2561 │ Something else │ 68│
2562 │ Multiple - cannot │ 7│
2564 ├───────────────────────────────────────────────────────────────────────┼─────┤
2567 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2570 ╭─────────────────────────────────────────┬─────╮
2572 ├─────────────────────────────────────────┼─────┤
2576 │ South American │ 34│
2577 │ Central American │ 52│
2578 │ Puerto Rican, OR │ 78│
2579 │ Something else │ 68│
2580 │ Multiple - cannot choose one│ 7│
2581 ├─────────────────────────────────────────┼─────┤
2582 │S3a. GENDER: Male │ 3132│
2584 ╰─────────────────────────────────────────┴─────╯
2587 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2589 ├───────────────────────────────────────────────────────────────────────┼─────┤
2590 │D5a. What would you say is your primary ethnic Cuban │ 20│
2591 │background? Mexican │ 311│
2593 │ South American │ 34│
2594 │ Central American │ 52│
2595 │ Puerto Rican, OR │ 78│
2596 │ Something else │ 68│
2597 │ Multiple - cannot │ 7│
2599 ├───────────────────────────────────────────────────────────────────────┼─────┤
2601 ├───────────────────────────────────────────────────────────────────────┼─────┤
2603 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2606 ╭─────────────────────────────┬─────╮
2608 ├─────────────────────────────┼─────┤
2610 ├─────────────────────────────┼─────┤
2612 ├─────────────────────────────┼─────┤
2614 ├─────────────────────────────┼─────┤
2615 │South American │ 34│
2616 ├─────────────────────────────┼─────┤
2617 │Central American │ 52│
2618 ├─────────────────────────────┼─────┤
2619 │Puerto Rican, OR │ 78│
2620 ├─────────────────────────────┼─────┤
2621 │Something else │ 68│
2622 ├─────────────────────────────┼─────┤
2623 │Multiple - cannot choose one │ 7│
2624 ├─────────────────────────────┼─────┤
2625 │S3a. GENDER: Male │ 3132│
2627 ╰─────────────────────────────┴─────╯
2630 ╭────────────────────────────┬─────╮
2632 ├────────────────────────────┼─────┤
2636 │South American │ 34│
2637 │Central American │ 52│
2638 │Puerto Rican, OR │ 78│
2639 │Something else │ 68│
2640 │Multiple - cannot choose one│ 7│
2643 ╰────────────────────────────┴─────╯
2647 AT_SETUP([CTABLES VLABELS - nested variables])
2648 AT_KEYWORDS([nest nesting])
2649 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2650 AT_DATA([ctables.sps],
2652 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NAME /TABLE qnd5a > qns3a.
2653 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NAME /TABLE qnd5a > qns3a.
2654 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NONE /TABLE qnd5a > qns3a.
2655 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NONE /TABLE qnd5a > qns3a.
2656 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a > qns3a.
2658 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2660 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2662 ├───────────────────────────────────────────────────────────────────────┼─────┤
2663 │D5a. What would you say is your Cuban QNS3A Male │ 13│
2664 │primary ethnic background? Female│ 7│
2665 │ ╶─────────────────────────────────┼─────┤
2666 │ Mexican QNS3A Male │ 175│
2668 │ ╶─────────────────────────────────┼─────┤
2669 │ Spanish QNS3A Male │ 20│
2671 │ ╶─────────────────────────────────┼─────┤
2672 │ South American QNS3A Male │ 21│
2674 │ ╶─────────────────────────────────┼─────┤
2675 │ Central American QNS3A Male │ 27│
2677 │ ╶─────────────────────────────────┼─────┤
2678 │ Puerto Rican, OR QNS3A Male │ 37│
2680 │ ╶─────────────────────────────────┼─────┤
2681 │ Something else QNS3A Male │ 35│
2683 │ ╶─────────────────────────────────┼─────┤
2684 │ Multiple - cannot QNS3A Male │ 2│
2685 │ choose one Female│ 5│
2686 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2689 ╭──────────────────────────────────────────────────────┬─────╮
2691 ├──────────────────────────────────────────────────────┼─────┤
2692 │QND5A Cuban S3a. GENDER: Male │ 13│
2694 │ ╶────────────────────────────────────────────────┼─────┤
2695 │ Mexican S3a. GENDER: Male │ 175│
2697 │ ╶────────────────────────────────────────────────┼─────┤
2698 │ Spanish S3a. GENDER: Male │ 20│
2700 │ ╶────────────────────────────────────────────────┼─────┤
2701 │ South American S3a. GENDER: Male │ 21│
2703 │ ╶────────────────────────────────────────────────┼─────┤
2704 │ Central American S3a. GENDER: Male │ 27│
2706 │ ╶────────────────────────────────────────────────┼─────┤
2707 │ Puerto Rican, OR S3a. GENDER: Male │ 37│
2709 │ ╶────────────────────────────────────────────────┼─────┤
2710 │ Something else S3a. GENDER: Male │ 35│
2712 │ ╶────────────────────────────────────────────────┼─────┤
2713 │ Multiple - cannot choose one S3a. GENDER: Male │ 2│
2715 ╰──────────────────────────────────────────────────────┴─────╯
2718 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2720 ├───────────────────────────────────────────────────────────────────────┼─────┤
2721 │D5a. What would you say is your primary Cuban Male │ 13│
2722 │ethnic background? Female│ 7│
2723 │ ╶────────────────────────────┼─────┤
2724 │ Mexican Male │ 175│
2726 │ ╶────────────────────────────┼─────┤
2727 │ Spanish Male │ 20│
2729 │ ╶────────────────────────────┼─────┤
2730 │ South American Male │ 21│
2732 │ ╶────────────────────────────┼─────┤
2733 │ Central American Male │ 27│
2735 │ ╶────────────────────────────┼─────┤
2736 │ Puerto Rican, OR Male │ 37│
2738 │ ╶────────────────────────────┼─────┤
2739 │ Something else Male │ 35│
2741 │ ╶────────────────────────────┼─────┤
2742 │ Multiple - cannot Male │ 2│
2743 │ choose one Female│ 5│
2744 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2747 ╭────────────────────────────────────────────────┬─────╮
2749 ├────────────────────────────────────────────────┼─────┤
2750 │Cuban S3a. GENDER: Male │ 13│
2752 ├────────────────────────────────────────────────┼─────┤
2753 │Mexican S3a. GENDER: Male │ 175│
2755 ├────────────────────────────────────────────────┼─────┤
2756 │Spanish S3a. GENDER: Male │ 20│
2758 ├────────────────────────────────────────────────┼─────┤
2759 │South American S3a. GENDER: Male │ 21│
2761 ├────────────────────────────────────────────────┼─────┤
2762 │Central American S3a. GENDER: Male │ 27│
2764 ├────────────────────────────────────────────────┼─────┤
2765 │Puerto Rican, OR S3a. GENDER: Male │ 37│
2767 ├────────────────────────────────────────────────┼─────┤
2768 │Something else S3a. GENDER: Male │ 35│
2770 ├────────────────────────────────────────────────┼─────┤
2771 │Multiple - cannot choose one S3a. GENDER: Male │ 2│
2773 ╰────────────────────────────────────────────────┴─────╯
2776 ╭───────────────────────────────────┬─────╮
2778 ├───────────────────────────────────┼─────┤
2781 ├───────────────────────────────────┼─────┤
2782 │Mexican Male │ 175│
2784 ├───────────────────────────────────┼─────┤
2787 ├───────────────────────────────────┼─────┤
2788 │South American Male │ 21│
2790 ├───────────────────────────────────┼─────┤
2791 │Central American Male │ 27│
2793 ├───────────────────────────────────┼─────┤
2794 │Puerto Rican, OR Male │ 37│
2796 ├───────────────────────────────────┼─────┤
2797 │Something else Male │ 35│
2799 ├───────────────────────────────────┼─────┤
2800 │Multiple - cannot choose one Male │ 2│
2802 ╰───────────────────────────────────┴─────╯
2806 AT_SETUP([CTABLES FORMAT EMPTY])
2807 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2808 AT_DATA([ctables.sps],
2810 CTABLES /FORMAT EMPTY=ZERO /TABLE qnd5a BY qnd5.
2811 CTABLES /FORMAT EMPTY=BLANK /TABLE qnd5a BY qnd5.
2812 CTABLES /FORMAT EMPTY='n/a' /TABLE qnd5a BY qnd5.
2814 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2816 ╭─────────────────────────────────────────────┬───────────────────────────────╮
2817 │ │ D5. ETHNICITY: Are you of │
2818 │ │ Hispanic or Latino origin or │
2820 │ ├───────────────┬───────────────┤
2822 │ ├───────────────┼───────────────┤
2824 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
2825 │D5a. What would you say is Cuban │ 20│ 0│
2826 │your primary ethnic Mexican │ 311│ 0│
2827 │background? Spanish │ 48│ 0│
2828 │ South American │ 34│ 0│
2829 │ Central American│ 52│ 0│
2830 │ Puerto Rican, OR│ 78│ 0│
2831 │ Something else │ 68│ 0│
2832 │ Multiple - │ 7│ 0│
2833 │ cannot choose │ │ │
2835 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
2838 ╭─────────────────────────────────────────────┬───────────────────────────────╮
2839 │ │ D5. ETHNICITY: Are you of │
2840 │ │ Hispanic or Latino origin or │
2842 │ ├───────────────┬───────────────┤
2844 │ ├───────────────┼───────────────┤
2846 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
2847 │D5a. What would you say is Cuban │ 20│ │
2848 │your primary ethnic Mexican │ 311│ │
2849 │background? Spanish │ 48│ │
2850 │ South American │ 34│ │
2851 │ Central American│ 52│ │
2852 │ Puerto Rican, OR│ 78│ │
2853 │ Something else │ 68│ │
2855 │ cannot choose │ │ │
2857 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
2860 ╭─────────────────────────────────────────────┬───────────────────────────────╮
2861 │ │ D5. ETHNICITY: Are you of │
2862 │ │ Hispanic or Latino origin or │
2864 │ ├───────────────┬───────────────┤
2866 │ ├───────────────┼───────────────┤
2868 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
2869 │D5a. What would you say is Cuban │ 20│n/a │
2870 │your primary ethnic Mexican │ 311│n/a │
2871 │background? Spanish │ 48│n/a │
2872 │ South American │ 34│n/a │
2873 │ Central American│ 52│n/a │
2874 │ Puerto Rican, OR│ 78│n/a │
2875 │ Something else │ 68│n/a │
2876 │ Multiple - │ 7│n/a │
2877 │ cannot choose │ │ │
2879 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
2883 AT_SETUP([CTABLES FORMAT MISSING])
2884 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2885 AT_DATA([ctables.sps],
2887 CTABLES /FORMAT MISSING='(no data)' /TABLE qnd5a[COLPCT] BY qnd5.
2889 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2891 ╭─────────────────────────────────────────────┬───────────────────────────────╮
2892 │ │ D5. ETHNICITY: Are you of │
2893 │ │ Hispanic or Latino origin or │
2895 │ ├───────────────┬───────────────┤
2897 │ ├───────────────┼───────────────┤
2898 │ │ Column % │ Column % │
2899 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
2900 │D5a. What would you say is Cuban │ 3.2%│(no data) │
2901 │your primary ethnic Mexican │ 50.3%│(no data) │
2902 │background? Spanish │ 7.8%│(no data) │
2903 │ South American │ 5.5%│(no data) │
2904 │ Central American│ 8.4%│(no data) │
2905 │ Puerto Rican, OR│ 12.6%│(no data) │
2906 │ Something else │ 11.0%│(no data) │
2907 │ Multiple - │ 1.1%│(no data) │
2908 │ cannot choose │ │ │
2910 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
2914 AT_SETUP([CTABLES HIDESMALLCOUNTS])
2915 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2916 AT_DATA([ctables.sps],
2918 CTABLES /TABLE qn38[c][COUNT, COLPCT].
2919 CTABLES /HIDESMALLCOUNTS /TABLE qn38[c][COUNT, COLPCT].
2920 CTABLES /HIDESMALLCOUNTS COUNT=10 /TABLE qn38[c][COUNT, COLPCT].
2922 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2924 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
2926 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
2927 │38. How many drinks did you have on that Less than one│ 7│ .5%│
2928 │occasion? 1 │ 491│ 34.9%│
2948 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
2951 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
2953 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
2954 │38. How many drinks did you have on that Less than one│ 7│ .5%│
2955 │occasion? 1 │ 491│ 34.9%│
2975 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
2978 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
2980 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
2981 │38. How many drinks did you have on that Less than one│<10 │ .5%│
2982 │occasion? 1 │ 491│ 34.9%│
3002 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
3006 AT_SETUP([CTABLES FORMAT MINCOLWIDTH MAXCOLWIDTH])
3007 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3008 AT_DATA([ctables.sps],
3010 CTABLES /FORMAT MINCOLWIDTH=1 MAXCOLWIDTH=2 UNITS=INCHES /TABLE BY qns3a.
3012 AT_CHECK([pspp ctables.sps -o - -O box=unicode -o pspp.spv], [0], [dnl
3024 AT_CHECK([pspp-output get-table-look pspp.spv pspp.stt])
3025 AT_CHECK([sed 's/ /\n/g' pspp.stt | grep ColumnWidth | sort], [0], [dnl
3026 maximumColumnWidth="192"
3027 minimumColumnWidth="96"
3031 AT_SETUP([CTABLES special formats])
3032 AT_KEYWORDS([NEGPAREN NEQUAL PAREN PCTPAREN])
3033 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3034 AT_DATA([ctables.sps],
3036 COMPUTE x = qnd3 - 4.
3037 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].
3039 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
3041 ╭─┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────╮
3042 │ │Minimum│Minimum│Minimum│Minimum│Maximum│Maximum│Maximum│Maximum│
3043 ├─┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
3044 │x│(3.0) │N=-3.0 │(-3.0) │(-3.0%)│8.0 │N=8.0 │(8.0) │(8.0%) │
3045 ╰─┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────╯
3049 AT_SETUP([CTABLES TITLES])
3050 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3051 AT_DATA([ctables.sps],
3054 /VLABELS VARIABLES=qn1 DISPLAY=NONE
3055 /TABLE ((qn1[c][COUNT])) BY qns3a[c] > qnd5
3056 /TITLES TITLE='How often do you drive?'
3057 CAPTION='Generated )TIME on )DATE'
3060 AT_CHECK([pspp ctables.sps -O box=unicode | sed 's/..:..:../HH:MM:SS/
3061 s&../../..&MM/DD/YY&'], [0], [dnl
3062 How often do you drive?
3063 ╭───────────────────────────────────┬─────────────────────────────────────────╮
3065 │ ├────────────────────┬────────────────────┤
3067 │ ├────────────────────┼────────────────────┤
3068 │ │ D5. ETHNICITY: Are │ D5. ETHNICITY: Are │
3069 │ │ you of Hispanic or │ you of Hispanic or │
3070 │ │ Latino origin or │ Latino origin or │
3071 │( ( 1. How often do you usually │ descent? │ descent? │
3072 │drive a car or other motor ├─────────┬──────────┼─────────┬──────────┤
3073 │vehicle?) ) BY S3a. GENDER: > D5. │ Yes │ No │ Yes │ No │
3074 │ETHNICITY: Are you of Hispanic or ├─────────┼──────────┼─────────┼──────────┤
3075 │Latino origin or descent? │ Count │ Count │ Count │ Count │
3076 ├───────────────────────────────────┼─────────┼──────────┼─────────┼──────────┤
3077 │Every day │ 218│ 2066│ 166│ 2175│
3078 │Several days a week │ 44│ 391│ 45│ 782│
3079 │Once a week or less │ 16│ 109│ 12│ 223│
3080 │Only certain times a year │ 15│ 41│ 11│ 61│
3081 │Never │ 39│ 150│ 56│ 278│
3082 ╰───────────────────────────────────┴─────────┴──────────┴─────────┴──────────╯
3083 Generated HH:MM:SS on MM/DD/YY
3087 AT_SETUP([CTABLES area definitions])
3088 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3089 AT_DATA([ctables.sps],
3092 /VLABELS VARIABLES=ALL DISPLAY=NAME
3093 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3094 /SLABELS POSITION=ROW
3095 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[ROWID, LAYERROWID]
3096 /SLABELS POSITION=ROW
3097 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[COLID, LAYERCOLID]
3098 /SLABELS POSITION=ROW.
3100 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=80], [0], [dnl
3103 ╭─────────────────────────────┬─────────────┬──────╮
3105 │ ├──────┬──────┼───┬──┤
3107 │ ├──────┼──────┤ │ │
3108 │ │ QN86 │ QN86 │ │ │
3109 │ ├───┬──┼───┬──┤ │ │
3110 │ │Yes│No│Yes│No│Yes│No│
3111 ├─────────────────────────────┼───┼──┼───┼──┼───┼──┤
3112 │QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3113 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3114 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│
3115 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3116 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3117 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3118 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│
3119 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┤
3120 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3121 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3122 │ Subtable ID│ 4│ 4│ 5│ 5│ 6│ 6│
3123 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3124 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3125 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3126 │ Subtable ID│ 4│ 4│ 5│ 5│ 6│ 6│
3127 ╰─────────────────────────────┴───┴──┴───┴──┴───┴──╯
3131 ╭─────────────────────────────┬─────────────┬──────╮
3133 │ ├──────┬──────┼───┬──┤
3135 │ ├──────┼──────┤ │ │
3136 │ │ QN86 │ QN86 │ │ │
3137 │ ├───┬──┼───┬──┤ │ │
3138 │ │Yes│No│Yes│No│Yes│No│
3139 ├─────────────────────────────┼───┼──┼───┼──┼───┼──┤
3140 │QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3141 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3142 │ Subtable ID│ 7│ 7│ 8│ 8│ 9│ 9│
3143 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3144 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3145 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3146 │ Subtable ID│ 7│ 7│ 8│ 8│ 9│ 9│
3147 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┤
3148 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3149 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3150 │ Subtable ID│ 10│10│ 11│11│ 12│12│
3151 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3152 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3153 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3154 │ Subtable ID│ 10│10│ 11│11│ 12│12│
3155 ╰─────────────────────────────┴───┴──┴───┴──┴───┴──╯
3159 ╭──────────────────────────────┬─────────────┬──────╮
3161 │ ├──────┬──────┼───┬──┤
3163 │ ├──────┼──────┤ │ │
3164 │ │ QN86 │ QN86 │ │ │
3165 │ ├───┬──┼───┬──┤ │ │
3166 │ │Yes│No│Yes│No│Yes│No│
3167 ├──────────────────────────────┼───┼──┼───┼──┼───┼──┤
3168 │QN61 Yes QN57 Yes Row ID │ 1│ 1│ 2│ 2│ 3│ 3│
3169 │ Layer Row ID│ 1│ 1│ 1│ 1│ 2│ 2│
3170 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3171 │ No Row ID │ 4│ 4│ 5│ 5│ 6│ 6│
3172 │ Layer Row ID│ 3│ 3│ 3│ 3│ 4│ 4│
3173 │ ╶─────────────────────────┼───┼──┼───┼──┼───┼──┤
3174 │ No QN57 Yes Row ID │ 7│ 7│ 8│ 8│ 9│ 9│
3175 │ Layer Row ID│ 5│ 5│ 5│ 5│ 6│ 6│
3176 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3177 │ No Row ID │ 10│10│ 11│11│ 12│12│
3178 │ Layer Row ID│ 7│ 7│ 7│ 7│ 8│ 8│
3179 ╰──────────────────────────────┴───┴──┴───┴──┴───┴──╯
3183 ╭──────────────────────────────┬─────────────┬──────╮
3185 │ ├──────┬──────┼───┬──┤
3187 │ ├──────┼──────┤ │ │
3188 │ │ QN86 │ QN86 │ │ │
3189 │ ├───┬──┼───┬──┤ │ │
3190 │ │Yes│No│Yes│No│Yes│No│
3191 ├──────────────────────────────┼───┼──┼───┼──┼───┼──┤
3192 │QN61 Yes QN57 Yes Row ID │ 13│13│ 14│14│ 15│15│
3193 │ Layer Row ID│ 9│ 9│ 9│ 9│ 10│10│
3194 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3195 │ No Row ID │ 16│16│ 17│17│ 18│18│
3196 │ Layer Row ID│ 11│11│ 11│11│ 12│12│
3197 │ ╶─────────────────────────┼───┼──┼───┼──┼───┼──┤
3198 │ No QN57 Yes Row ID │ 19│19│ 20│20│ 21│21│
3199 │ Layer Row ID│ 13│13│ 13│13│ 14│14│
3200 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3201 │ No Row ID │ 22│22│ 23│23│ 24│24│
3202 │ Layer Row ID│ 15│15│ 15│15│ 16│16│
3203 ╰──────────────────────────────┴───┴──┴───┴──┴───┴──╯
3207 ╭─────────────────────────────────┬─────────────┬──────╮
3209 │ ├──────┬──────┼───┬──┤
3211 │ ├──────┼──────┤ │ │
3212 │ │ QN86 │ QN86 │ │ │
3213 │ ├───┬──┼───┬──┤ │ │
3214 │ │Yes│No│Yes│No│Yes│No│
3215 ├─────────────────────────────────┼───┼──┼───┼──┼───┼──┤
3216 │QN61 Yes QN57 Yes Column ID │ 1│ 2│ 3│ 4│ 5│ 6│
3217 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3218 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3219 │ No Column ID │ 1│ 2│ 3│ 4│ 5│ 6│
3220 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3221 │ ╶────────────────────────────┼───┼──┼───┼──┼───┼──┤
3222 │ No QN57 Yes Column ID │ 7│ 8│ 9│10│ 11│12│
3223 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3224 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3225 │ No Column ID │ 7│ 8│ 9│10│ 11│12│
3226 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3227 ╰─────────────────────────────────┴───┴──┴───┴──┴───┴──╯
3231 ╭─────────────────────────────────┬─────────────┬──────╮
3233 │ ├──────┬──────┼───┬──┤
3235 │ ├──────┼──────┤ │ │
3236 │ │ QN86 │ QN86 │ │ │
3237 │ ├───┬──┼───┬──┤ │ │
3238 │ │Yes│No│Yes│No│Yes│No│
3239 ├─────────────────────────────────┼───┼──┼───┼──┼───┼──┤
3240 │QN61 Yes QN57 Yes Column ID │ 13│14│ 15│16│ 17│18│
3241 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3242 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3243 │ No Column ID │ 13│14│ 15│16│ 17│18│
3244 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3245 │ ╶────────────────────────────┼───┼──┼───┼──┼───┼──┤
3246 │ No QN57 Yes Column ID │ 19│20│ 21│22│ 23│24│
3247 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3248 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3249 │ No Column ID │ 19│20│ 21│22│ 23│24│
3250 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3251 ╰─────────────────────────────────┴───┴──┴───┴──┴───┴──╯
3255 AT_SETUP([CTABLES area definitions with CLABELS ROWLABELS=OPPOSITE])
3256 AT_KEYWORDS([ROWLABELS OPPOSITE])
3257 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3258 AT_DATA([ctables.sps],
3261 /VLABELS VARIABLES=ALL DISPLAY=NAME
3262 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3263 /SLABELS POSITION=ROW
3264 /CLABELS ROWLABELS=OPPOSITE
3265 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3266 /SLABELS POSITION=ROW
3267 /CLABELS ROWLABELS=OPPOSITE
3268 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3269 /SLABELS POSITION=ROW
3270 /CLABELS ROWLABELS=OPPOSITE.
3272 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3275 ╭──────────────────────────────────┬───────────────────────────────────────────────────────╮
3277 │ ├───────────────────────────┬───────────────────────────┤
3279 │ ├───────────────────────────┼───────────────────────────┤
3281 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3282 │ │ Yes │ No │ Yes │ No │
3283 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3284 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3285 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3286 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3287 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3288 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3289 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3290 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3291 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3292 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3293 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3294 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3295 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3296 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3297 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3298 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3299 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3300 │ Subtable ID│ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3301 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3302 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3303 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3304 │ Subtable ID│ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3305 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3309 ╭──────────────────────────────────┬───────────────────────────────────────────────────────╮
3311 │ ├───────────────────────────┬───────────────────────────┤
3313 │ ├───────────────────────────┼───────────────────────────┤
3315 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3316 │ │ Yes │ No │ Yes │ No │
3317 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3318 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3319 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3320 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3321 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3322 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3323 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3324 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3325 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3326 │ Subtable ID│ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3327 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3328 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3329 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3330 │ Subtable ID│ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3331 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3332 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3333 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3334 │ Subtable ID│ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3335 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3336 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3337 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3338 │ Subtable ID│ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3339 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3343 ╭───────────────────────────────────┬───────────────────────────────────────────────────────╮
3345 │ ├───────────────────────────┬───────────────────────────┤
3347 │ ├───────────────────────────┼───────────────────────────┤
3349 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3350 │ │ Yes │ No │ Yes │ No │
3351 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3352 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3353 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3354 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3355 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3356 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3357 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3358 │QN26 Yes QN61 Yes QN57 Row ID │ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3359 │ Layer Row ID│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3360 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3361 │ No QN57 Row ID │ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3362 │ Layer Row ID│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3363 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3364 │ No QN61 Yes QN57 Row ID │ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3365 │ Layer Row ID│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3366 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3367 │ No QN57 Row ID │ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3368 │ Layer Row ID│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3369 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3373 ╭───────────────────────────────────┬───────────────────────────────────────────────────────╮
3375 │ ├───────────────────────────┬───────────────────────────┤
3377 │ ├───────────────────────────┼───────────────────────────┤
3379 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3380 │ │ Yes │ No │ Yes │ No │
3381 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3382 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3383 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3384 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3385 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3386 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3387 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3388 │QN26 Yes QN61 Yes QN57 Row ID │ 33│33│ 34│34│ 35│35│ 36│36│ 37│37│ 38│38│ 39│39│ 40│40│
3389 │ Layer Row ID│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│
3390 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3391 │ No QN57 Row ID │ 41│41│ 42│42│ 43│43│ 44│44│ 45│45│ 46│46│ 47│47│ 48│48│
3392 │ Layer Row ID│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│
3393 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3394 │ No QN61 Yes QN57 Row ID │ 49│49│ 50│50│ 51│51│ 52│52│ 53│53│ 54│54│ 55│55│ 56│56│
3395 │ Layer Row ID│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│
3396 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3397 │ No QN57 Row ID │ 57│57│ 58│58│ 59│59│ 60│60│ 61│61│ 62│62│ 63│63│ 64│64│
3398 │ Layer Row ID│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│
3399 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3403 ╭──────────────────────────────────────┬───────────────────────────────────────────────────────╮
3405 │ ├───────────────────────────┬───────────────────────────┤
3407 │ ├───────────────────────────┼───────────────────────────┤
3409 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3410 │ │ Yes │ No │ Yes │ No │
3411 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3412 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3413 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3414 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3415 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3416 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3417 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3418 │QN26 Yes QN61 Yes QN57 Column ID │ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3419 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3420 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3421 │ No QN57 Column ID │ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3422 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3423 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3424 │ No QN61 Yes QN57 Column ID │ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3425 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3426 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3427 │ No QN57 Column ID │ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3428 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│ 7│ 8│ 9│10│ 11│12│ 13│14│ 15│16│
3429 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3433 ╭──────────────────────────────────────┬───────────────────────────────────────────────────────╮
3435 │ ├───────────────────────────┬───────────────────────────┤
3437 │ ├───────────────────────────┼───────────────────────────┤
3439 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3440 │ │ Yes │ No │ Yes │ No │
3441 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3442 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3443 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3444 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3445 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3446 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3447 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3448 │QN26 Yes QN61 Yes QN57 Column ID │ 33│34│ 35│36│ 37│38│ 39│40│ 41│42│ 43│44│ 45│46│ 47│48│
3449 │ Layer Column ID│ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3450 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3451 │ No QN57 Column ID │ 33│34│ 35│36│ 37│38│ 39│40│ 41│42│ 43│44│ 45│46│ 47│48│
3452 │ Layer Column ID│ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3453 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3454 │ No QN61 Yes QN57 Column ID │ 49│50│ 51│52│ 53│54│ 55│56│ 57│58│ 59│60│ 61│62│ 63│64│
3455 │ Layer Column ID│ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3456 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3457 │ No QN57 Column ID │ 49│50│ 51│52│ 53│54│ 55│56│ 57│58│ 59│60│ 61│62│ 63│64│
3458 │ Layer Column ID│ 17│18│ 19│20│ 21│22│ 23│24│ 25│26│ 27│28│ 29│30│ 31│32│
3459 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3463 AT_SETUP([CTABLES area definitions with CLABELS COLLABELS=OPPOSITE])
3464 AT_KEYWORDS([COLLABELS OPPOSITE])
3465 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3466 AT_DATA([ctables.sps],
3469 /VLABELS VARIABLES=ALL DISPLAY=NAME
3470 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3471 /SLABELS POSITION=ROW
3472 /CLABELS COLLABELS=OPPOSITE
3473 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3474 /SLABELS POSITION=ROW
3475 /CLABELS COLLABELS=OPPOSITE
3476 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3477 /SLABELS POSITION=ROW
3478 /CLABELS COLLABELS=OPPOSITE.
3480 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3483 ╭──────────────────────────────────────────┬───────────────────╮
3485 │ ├─────────┬─────────┤
3487 │ ├─────────┼─────────┤
3489 │ ├────┬────┼────┬────┤
3490 │ │ Yes│ No │ Yes│ No │
3491 │ ├────┼────┼────┼────┤
3492 │ │QN86│QN86│QN86│QN86│
3493 ├──────────────────────────────────────────┼────┼────┼────┼────┤
3494 │QN26 Yes QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3495 │ Layer ID │ 1│ 1│ 1│ 1│
3496 │ Subtable ID│ 1│ 1│ 2│ 2│
3497 │ ╶───────────────┼────┼────┼────┼────┤
3498 │ No Table ID │ 1│ 1│ 1│ 1│
3499 │ Layer ID │ 1│ 1│ 1│ 1│
3500 │ Subtable ID│ 1│ 1│ 2│ 2│
3501 │ ╶───────────────────┼────┼────┼────┼────┤
3502 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3503 │ Layer ID │ 1│ 1│ 1│ 1│
3504 │ Subtable ID│ 3│ 3│ 4│ 4│
3505 │ ╶───────────────┼────┼────┼────┼────┤
3506 │ No Table ID │ 1│ 1│ 1│ 1│
3507 │ Layer ID │ 1│ 1│ 1│ 1│
3508 │ Subtable ID│ 3│ 3│ 4│ 4│
3509 │ ╶────────────────────────────┼────┼────┼────┼────┤
3510 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3511 │ Layer ID │ 1│ 1│ 1│ 1│
3512 │ Subtable ID│ 5│ 5│ 6│ 6│
3513 │ ╶───────────────┼────┼────┼────┼────┤
3514 │ No Table ID │ 1│ 1│ 1│ 1│
3515 │ Layer ID │ 1│ 1│ 1│ 1│
3516 │ Subtable ID│ 5│ 5│ 6│ 6│
3517 │ ╶───────────────────┼────┼────┼────┼────┤
3518 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3519 │ Layer ID │ 1│ 1│ 1│ 1│
3520 │ Subtable ID│ 7│ 7│ 8│ 8│
3521 │ ╶───────────────┼────┼────┼────┼────┤
3522 │ No Table ID │ 1│ 1│ 1│ 1│
3523 │ Layer ID │ 1│ 1│ 1│ 1│
3524 │ Subtable ID│ 7│ 7│ 8│ 8│
3525 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
3526 │ No QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3527 │ Layer ID │ 1│ 1│ 1│ 1│
3528 │ Subtable ID│ 9│ 9│ 10│ 10│
3529 │ ╶───────────────┼────┼────┼────┼────┤
3530 │ No Table ID │ 1│ 1│ 1│ 1│
3531 │ Layer ID │ 1│ 1│ 1│ 1│
3532 │ Subtable ID│ 9│ 9│ 10│ 10│
3533 │ ╶───────────────────┼────┼────┼────┼────┤
3534 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3535 │ Layer ID │ 1│ 1│ 1│ 1│
3536 │ Subtable ID│ 11│ 11│ 12│ 12│
3537 │ ╶───────────────┼────┼────┼────┼────┤
3538 │ No Table ID │ 1│ 1│ 1│ 1│
3539 │ Layer ID │ 1│ 1│ 1│ 1│
3540 │ Subtable ID│ 11│ 11│ 12│ 12│
3541 │ ╶────────────────────────────┼────┼────┼────┼────┤
3542 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3543 │ Layer ID │ 1│ 1│ 1│ 1│
3544 │ Subtable ID│ 13│ 13│ 14│ 14│
3545 │ ╶───────────────┼────┼────┼────┼────┤
3546 │ No Table ID │ 1│ 1│ 1│ 1│
3547 │ Layer ID │ 1│ 1│ 1│ 1│
3548 │ Subtable ID│ 13│ 13│ 14│ 14│
3549 │ ╶───────────────────┼────┼────┼────┼────┤
3550 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3551 │ Layer ID │ 1│ 1│ 1│ 1│
3552 │ Subtable ID│ 15│ 15│ 16│ 16│
3553 │ ╶───────────────┼────┼────┼────┼────┤
3554 │ No Table ID │ 1│ 1│ 1│ 1│
3555 │ Layer ID │ 1│ 1│ 1│ 1│
3556 │ Subtable ID│ 15│ 15│ 16│ 16│
3557 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
3561 ╭──────────────────────────────────────────┬───────────────────╮
3563 │ ├─────────┬─────────┤
3565 │ ├─────────┼─────────┤
3567 │ ├────┬────┼────┬────┤
3568 │ │ Yes│ No │ Yes│ No │
3569 │ ├────┼────┼────┼────┤
3570 │ │QN86│QN86│QN86│QN86│
3571 ├──────────────────────────────────────────┼────┼────┼────┼────┤
3572 │QN26 Yes QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3573 │ Layer ID │ 2│ 2│ 2│ 2│
3574 │ Subtable ID│ 17│ 17│ 18│ 18│
3575 │ ╶───────────────┼────┼────┼────┼────┤
3576 │ No Table ID │ 1│ 1│ 1│ 1│
3577 │ Layer ID │ 2│ 2│ 2│ 2│
3578 │ Subtable ID│ 17│ 17│ 18│ 18│
3579 │ ╶───────────────────┼────┼────┼────┼────┤
3580 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3581 │ Layer ID │ 2│ 2│ 2│ 2│
3582 │ Subtable ID│ 19│ 19│ 20│ 20│
3583 │ ╶───────────────┼────┼────┼────┼────┤
3584 │ No Table ID │ 1│ 1│ 1│ 1│
3585 │ Layer ID │ 2│ 2│ 2│ 2│
3586 │ Subtable ID│ 19│ 19│ 20│ 20│
3587 │ ╶────────────────────────────┼────┼────┼────┼────┤
3588 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3589 │ Layer ID │ 2│ 2│ 2│ 2│
3590 │ Subtable ID│ 21│ 21│ 22│ 22│
3591 │ ╶───────────────┼────┼────┼────┼────┤
3592 │ No Table ID │ 1│ 1│ 1│ 1│
3593 │ Layer ID │ 2│ 2│ 2│ 2│
3594 │ Subtable ID│ 21│ 21│ 22│ 22│
3595 │ ╶───────────────────┼────┼────┼────┼────┤
3596 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3597 │ Layer ID │ 2│ 2│ 2│ 2│
3598 │ Subtable ID│ 23│ 23│ 24│ 24│
3599 │ ╶───────────────┼────┼────┼────┼────┤
3600 │ No Table ID │ 1│ 1│ 1│ 1│
3601 │ Layer ID │ 2│ 2│ 2│ 2│
3602 │ Subtable ID│ 23│ 23│ 24│ 24│
3603 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
3604 │ No QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3605 │ Layer ID │ 2│ 2│ 2│ 2│
3606 │ Subtable ID│ 25│ 25│ 26│ 26│
3607 │ ╶───────────────┼────┼────┼────┼────┤
3608 │ No Table ID │ 1│ 1│ 1│ 1│
3609 │ Layer ID │ 2│ 2│ 2│ 2│
3610 │ Subtable ID│ 25│ 25│ 26│ 26│
3611 │ ╶───────────────────┼────┼────┼────┼────┤
3612 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3613 │ Layer ID │ 2│ 2│ 2│ 2│
3614 │ Subtable ID│ 27│ 27│ 28│ 28│
3615 │ ╶───────────────┼────┼────┼────┼────┤
3616 │ No Table ID │ 1│ 1│ 1│ 1│
3617 │ Layer ID │ 2│ 2│ 2│ 2│
3618 │ Subtable ID│ 27│ 27│ 28│ 28│
3619 │ ╶────────────────────────────┼────┼────┼────┼────┤
3620 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3621 │ Layer ID │ 2│ 2│ 2│ 2│
3622 │ Subtable ID│ 29│ 29│ 30│ 30│
3623 │ ╶───────────────┼────┼────┼────┼────┤
3624 │ No Table ID │ 1│ 1│ 1│ 1│
3625 │ Layer ID │ 2│ 2│ 2│ 2│
3626 │ Subtable ID│ 29│ 29│ 30│ 30│
3627 │ ╶───────────────────┼────┼────┼────┼────┤
3628 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3629 │ Layer ID │ 2│ 2│ 2│ 2│
3630 │ Subtable ID│ 31│ 31│ 32│ 32│
3631 │ ╶───────────────┼────┼────┼────┼────┤
3632 │ No Table ID │ 1│ 1│ 1│ 1│
3633 │ Layer ID │ 2│ 2│ 2│ 2│
3634 │ Subtable ID│ 31│ 31│ 32│ 32│
3635 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
3639 ╭───────────────────────────────────────────┬───────────────────╮
3641 │ ├─────────┬─────────┤
3643 │ ├─────────┼─────────┤
3645 │ ├────┬────┼────┬────┤
3646 │ │ Yes│ No │ Yes│ No │
3647 │ ├────┼────┼────┼────┤
3648 │ │QN86│QN86│QN86│QN86│
3649 ├───────────────────────────────────────────┼────┼────┼────┼────┤
3650 │QN26 Yes QN61 Yes QN57 Yes Yes Row ID │ 1│ 1│ 3│ 3│
3651 │ Layer Row ID│ 1│ 1│ 1│ 1│
3652 │ ╶────────────────┼────┼────┼────┼────┤
3653 │ No Row ID │ 2│ 2│ 4│ 4│
3654 │ Layer Row ID│ 2│ 2│ 2│ 2│
3655 │ ╶────────────────────┼────┼────┼────┼────┤
3656 │ No Yes Row ID │ 5│ 5│ 7│ 7│
3657 │ Layer Row ID│ 3│ 3│ 3│ 3│
3658 │ ╶────────────────┼────┼────┼────┼────┤
3659 │ No Row ID │ 6│ 6│ 8│ 8│
3660 │ Layer Row ID│ 4│ 4│ 4│ 4│
3661 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3662 │ No QN57 Yes Yes Row ID │ 9│ 9│ 11│ 11│
3663 │ Layer Row ID│ 5│ 5│ 5│ 5│
3664 │ ╶────────────────┼────┼────┼────┼────┤
3665 │ No Row ID │ 10│ 10│ 12│ 12│
3666 │ Layer Row ID│ 6│ 6│ 6│ 6│
3667 │ ╶────────────────────┼────┼────┼────┼────┤
3668 │ No Yes Row ID │ 13│ 13│ 15│ 15│
3669 │ Layer Row ID│ 7│ 7│ 7│ 7│
3670 │ ╶────────────────┼────┼────┼────┼────┤
3671 │ No Row ID │ 14│ 14│ 16│ 16│
3672 │ Layer Row ID│ 8│ 8│ 8│ 8│
3673 │ ╶──────────────────────────────────────┼────┼────┼────┼────┤
3674 │ No QN61 Yes QN57 Yes Yes Row ID │ 17│ 17│ 19│ 19│
3675 │ Layer Row ID│ 9│ 9│ 9│ 9│
3676 │ ╶────────────────┼────┼────┼────┼────┤
3677 │ No Row ID │ 18│ 18│ 20│ 20│
3678 │ Layer Row ID│ 10│ 10│ 10│ 10│
3679 │ ╶────────────────────┼────┼────┼────┼────┤
3680 │ No Yes Row ID │ 21│ 21│ 23│ 23│
3681 │ Layer Row ID│ 11│ 11│ 11│ 11│
3682 │ ╶────────────────┼────┼────┼────┼────┤
3683 │ No Row ID │ 22│ 22│ 24│ 24│
3684 │ Layer Row ID│ 12│ 12│ 12│ 12│
3685 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3686 │ No QN57 Yes Yes Row ID │ 25│ 25│ 27│ 27│
3687 │ Layer Row ID│ 13│ 13│ 13│ 13│
3688 │ ╶────────────────┼────┼────┼────┼────┤
3689 │ No Row ID │ 26│ 26│ 28│ 28│
3690 │ Layer Row ID│ 14│ 14│ 14│ 14│
3691 │ ╶────────────────────┼────┼────┼────┼────┤
3692 │ No Yes Row ID │ 29│ 29│ 31│ 31│
3693 │ Layer Row ID│ 15│ 15│ 15│ 15│
3694 │ ╶────────────────┼────┼────┼────┼────┤
3695 │ No Row ID │ 30│ 30│ 32│ 32│
3696 │ Layer Row ID│ 16│ 16│ 16│ 16│
3697 ╰───────────────────────────────────────────┴────┴────┴────┴────╯
3701 ╭───────────────────────────────────────────┬───────────────────╮
3703 │ ├─────────┬─────────┤
3705 │ ├─────────┼─────────┤
3707 │ ├────┬────┼────┬────┤
3708 │ │ Yes│ No │ Yes│ No │
3709 │ ├────┼────┼────┼────┤
3710 │ │QN86│QN86│QN86│QN86│
3711 ├───────────────────────────────────────────┼────┼────┼────┼────┤
3712 │QN26 Yes QN61 Yes QN57 Yes Yes Row ID │ 33│ 33│ 35│ 35│
3713 │ Layer Row ID│ 17│ 17│ 17│ 17│
3714 │ ╶────────────────┼────┼────┼────┼────┤
3715 │ No Row ID │ 34│ 34│ 36│ 36│
3716 │ Layer Row ID│ 18│ 18│ 18│ 18│
3717 │ ╶────────────────────┼────┼────┼────┼────┤
3718 │ No Yes Row ID │ 37│ 37│ 39│ 39│
3719 │ Layer Row ID│ 19│ 19│ 19│ 19│
3720 │ ╶────────────────┼────┼────┼────┼────┤
3721 │ No Row ID │ 38│ 38│ 40│ 40│
3722 │ Layer Row ID│ 20│ 20│ 20│ 20│
3723 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3724 │ No QN57 Yes Yes Row ID │ 41│ 41│ 43│ 43│
3725 │ Layer Row ID│ 21│ 21│ 21│ 21│
3726 │ ╶────────────────┼────┼────┼────┼────┤
3727 │ No Row ID │ 42│ 42│ 44│ 44│
3728 │ Layer Row ID│ 22│ 22│ 22│ 22│
3729 │ ╶────────────────────┼────┼────┼────┼────┤
3730 │ No Yes Row ID │ 45│ 45│ 47│ 47│
3731 │ Layer Row ID│ 23│ 23│ 23│ 23│
3732 │ ╶────────────────┼────┼────┼────┼────┤
3733 │ No Row ID │ 46│ 46│ 48│ 48│
3734 │ Layer Row ID│ 24│ 24│ 24│ 24│
3735 │ ╶──────────────────────────────────────┼────┼────┼────┼────┤
3736 │ No QN61 Yes QN57 Yes Yes Row ID │ 49│ 49│ 51│ 51│
3737 │ Layer Row ID│ 25│ 25│ 25│ 25│
3738 │ ╶────────────────┼────┼────┼────┼────┤
3739 │ No Row ID │ 50│ 50│ 52│ 52│
3740 │ Layer Row ID│ 26│ 26│ 26│ 26│
3741 │ ╶────────────────────┼────┼────┼────┼────┤
3742 │ No Yes Row ID │ 53│ 53│ 55│ 55│
3743 │ Layer Row ID│ 27│ 27│ 27│ 27│
3744 │ ╶────────────────┼────┼────┼────┼────┤
3745 │ No Row ID │ 54│ 54│ 56│ 56│
3746 │ Layer Row ID│ 28│ 28│ 28│ 28│
3747 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3748 │ No QN57 Yes Yes Row ID │ 57│ 57│ 59│ 59│
3749 │ Layer Row ID│ 29│ 29│ 29│ 29│
3750 │ ╶────────────────┼────┼────┼────┼────┤
3751 │ No Row ID │ 58│ 58│ 60│ 60│
3752 │ Layer Row ID│ 30│ 30│ 30│ 30│
3753 │ ╶────────────────────┼────┼────┼────┼────┤
3754 │ No Yes Row ID │ 61│ 61│ 63│ 63│
3755 │ Layer Row ID│ 31│ 31│ 31│ 31│
3756 │ ╶────────────────┼────┼────┼────┼────┤
3757 │ No Row ID │ 62│ 62│ 64│ 64│
3758 │ Layer Row ID│ 32│ 32│ 32│ 32│
3759 ╰───────────────────────────────────────────┴────┴────┴────┴────╯
3763 ╭──────────────────────────────────────────────┬───────────────────╮
3765 │ ├─────────┬─────────┤
3767 │ ├─────────┼─────────┤
3769 │ ├────┬────┼────┬────┤
3770 │ │ Yes│ No │ Yes│ No │
3771 │ ├────┼────┼────┼────┤
3772 │ │QN86│QN86│QN86│QN86│
3773 ├──────────────────────────────────────────────┼────┼────┼────┼────┤
3774 │QN26 Yes QN61 Yes QN57 Yes Yes Column ID │ 1│ 2│ 3│ 4│
3775 │ Layer Column ID│ 1│ 2│ 3│ 4│
3776 │ ╶───────────────────┼────┼────┼────┼────┤
3777 │ No Column ID │ 1│ 2│ 3│ 4│
3778 │ Layer Column ID│ 1│ 2│ 3│ 4│
3779 │ ╶───────────────────────┼────┼────┼────┼────┤
3780 │ No Yes Column ID │ 5│ 6│ 7│ 8│
3781 │ Layer Column ID│ 1│ 2│ 3│ 4│
3782 │ ╶───────────────────┼────┼────┼────┼────┤
3783 │ No Column ID │ 5│ 6│ 7│ 8│
3784 │ Layer Column ID│ 1│ 2│ 3│ 4│
3785 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3786 │ No QN57 Yes Yes Column ID │ 9│ 10│ 11│ 12│
3787 │ Layer Column ID│ 1│ 2│ 3│ 4│
3788 │ ╶───────────────────┼────┼────┼────┼────┤
3789 │ No Column ID │ 9│ 10│ 11│ 12│
3790 │ Layer Column ID│ 1│ 2│ 3│ 4│
3791 │ ╶───────────────────────┼────┼────┼────┼────┤
3792 │ No Yes Column ID │ 13│ 14│ 15│ 16│
3793 │ Layer Column ID│ 1│ 2│ 3│ 4│
3794 │ ╶───────────────────┼────┼────┼────┼────┤
3795 │ No Column ID │ 13│ 14│ 15│ 16│
3796 │ Layer Column ID│ 1│ 2│ 3│ 4│
3797 │ ╶─────────────────────────────────────────┼────┼────┼────┼────┤
3798 │ No QN61 Yes QN57 Yes Yes Column ID │ 17│ 18│ 19│ 20│
3799 │ Layer Column ID│ 1│ 2│ 3│ 4│
3800 │ ╶───────────────────┼────┼────┼────┼────┤
3801 │ No Column ID │ 17│ 18│ 19│ 20│
3802 │ Layer Column ID│ 1│ 2│ 3│ 4│
3803 │ ╶───────────────────────┼────┼────┼────┼────┤
3804 │ No Yes Column ID │ 21│ 22│ 23│ 24│
3805 │ Layer Column ID│ 1│ 2│ 3│ 4│
3806 │ ╶───────────────────┼────┼────┼────┼────┤
3807 │ No Column ID │ 21│ 22│ 23│ 24│
3808 │ Layer Column ID│ 1│ 2│ 3│ 4│
3809 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3810 │ No QN57 Yes Yes Column ID │ 25│ 26│ 27│ 28│
3811 │ Layer Column ID│ 1│ 2│ 3│ 4│
3812 │ ╶───────────────────┼────┼────┼────┼────┤
3813 │ No Column ID │ 25│ 26│ 27│ 28│
3814 │ Layer Column ID│ 1│ 2│ 3│ 4│
3815 │ ╶───────────────────────┼────┼────┼────┼────┤
3816 │ No Yes Column ID │ 29│ 30│ 31│ 32│
3817 │ Layer Column ID│ 1│ 2│ 3│ 4│
3818 │ ╶───────────────────┼────┼────┼────┼────┤
3819 │ No Column ID │ 29│ 30│ 31│ 32│
3820 │ Layer Column ID│ 1│ 2│ 3│ 4│
3821 ╰──────────────────────────────────────────────┴────┴────┴────┴────╯
3825 ╭──────────────────────────────────────────────┬───────────────────╮
3827 │ ├─────────┬─────────┤
3829 │ ├─────────┼─────────┤
3831 │ ├────┬────┼────┬────┤
3832 │ │ Yes│ No │ Yes│ No │
3833 │ ├────┼────┼────┼────┤
3834 │ │QN86│QN86│QN86│QN86│
3835 ├──────────────────────────────────────────────┼────┼────┼────┼────┤
3836 │QN26 Yes QN61 Yes QN57 Yes Yes Column ID │ 33│ 34│ 35│ 36│
3837 │ Layer Column ID│ 5│ 6│ 7│ 8│
3838 │ ╶───────────────────┼────┼────┼────┼────┤
3839 │ No Column ID │ 33│ 34│ 35│ 36│
3840 │ Layer Column ID│ 5│ 6│ 7│ 8│
3841 │ ╶───────────────────────┼────┼────┼────┼────┤
3842 │ No Yes Column ID │ 37│ 38│ 39│ 40│
3843 │ Layer Column ID│ 5│ 6│ 7│ 8│
3844 │ ╶───────────────────┼────┼────┼────┼────┤
3845 │ No Column ID │ 37│ 38│ 39│ 40│
3846 │ Layer Column ID│ 5│ 6│ 7│ 8│
3847 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3848 │ No QN57 Yes Yes Column ID │ 41│ 42│ 43│ 44│
3849 │ Layer Column ID│ 5│ 6│ 7│ 8│
3850 │ ╶───────────────────┼────┼────┼────┼────┤
3851 │ No Column ID │ 41│ 42│ 43│ 44│
3852 │ Layer Column ID│ 5│ 6│ 7│ 8│
3853 │ ╶───────────────────────┼────┼────┼────┼────┤
3854 │ No Yes Column ID │ 45│ 46│ 47│ 48│
3855 │ Layer Column ID│ 5│ 6│ 7│ 8│
3856 │ ╶───────────────────┼────┼────┼────┼────┤
3857 │ No Column ID │ 45│ 46│ 47│ 48│
3858 │ Layer Column ID│ 5│ 6│ 7│ 8│
3859 │ ╶─────────────────────────────────────────┼────┼────┼────┼────┤
3860 │ No QN61 Yes QN57 Yes Yes Column ID │ 49│ 50│ 51│ 52│
3861 │ Layer Column ID│ 5│ 6│ 7│ 8│
3862 │ ╶───────────────────┼────┼────┼────┼────┤
3863 │ No Column ID │ 49│ 50│ 51│ 52│
3864 │ Layer Column ID│ 5│ 6│ 7│ 8│
3865 │ ╶───────────────────────┼────┼────┼────┼────┤
3866 │ No Yes Column ID │ 53│ 54│ 55│ 56│
3867 │ Layer Column ID│ 5│ 6│ 7│ 8│
3868 │ ╶───────────────────┼────┼────┼────┼────┤
3869 │ No Column ID │ 53│ 54│ 55│ 56│
3870 │ Layer Column ID│ 5│ 6│ 7│ 8│
3871 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3872 │ No QN57 Yes Yes Column ID │ 57│ 58│ 59│ 60│
3873 │ Layer Column ID│ 5│ 6│ 7│ 8│
3874 │ ╶───────────────────┼────┼────┼────┼────┤
3875 │ No Column ID │ 57│ 58│ 59│ 60│
3876 │ Layer Column ID│ 5│ 6│ 7│ 8│
3877 │ ╶───────────────────────┼────┼────┼────┼────┤
3878 │ No Yes Column ID │ 61│ 62│ 63│ 64│
3879 │ Layer Column ID│ 5│ 6│ 7│ 8│
3880 │ ╶───────────────────┼────┼────┼────┼────┤
3881 │ No Column ID │ 61│ 62│ 63│ 64│
3882 │ Layer Column ID│ 5│ 6│ 7│ 8│
3883 ╰──────────────────────────────────────────────┴────┴────┴────┴────╯
3887 AT_SETUP([CTABLES area definitions with CLABELS ROWLABELS=LAYER])
3888 AT_KEYWORDS([ROWLABELS LAYER])
3889 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3890 AT_DATA([ctables.sps],
3893 /VLABELS VARIABLES=ALL DISPLAY=NAME
3894 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3895 /SLABELS POSITION=ROW
3896 /CLABELS ROWLABELS=LAYER
3897 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3898 /SLABELS POSITION=ROW
3899 /CLABELS ROWLABELS=LAYER
3900 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3901 /SLABELS POSITION=ROW
3902 /CLABELS ROWLABELS=LAYER.
3904 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3908 ╭──────────────────────────────────┬───────────────────────────╮
3910 │ ├─────────────┬─────────────┤
3912 │ ├─────────────┼─────────────┤
3914 │ ├──────┬──────┼──────┬──────┤
3915 │ │ Yes │ No │ Yes │ No │
3916 │ ├──────┼──────┼──────┼──────┤
3917 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3918 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3919 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3920 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3921 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3922 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3923 │ Subtable ID│ 1│ 1│ 3│ 3│ 5│ 5│ 7│ 7│
3924 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3925 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3926 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3927 │ Subtable ID│ 1│ 1│ 3│ 3│ 5│ 5│ 7│ 7│
3928 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3929 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3930 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3931 │ Subtable ID│ 9│ 9│ 11│11│ 13│13│ 15│15│
3932 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3933 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3934 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3935 │ Subtable ID│ 9│ 9│ 11│11│ 13│13│ 15│15│
3936 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
3941 ╭──────────────────────────────────┬───────────────────────────╮
3943 │ ├─────────────┬─────────────┤
3945 │ ├─────────────┼─────────────┤
3947 │ ├──────┬──────┼──────┬──────┤
3948 │ │ Yes │ No │ Yes │ No │
3949 │ ├──────┼──────┼──────┼──────┤
3950 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3951 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3952 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3953 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3954 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3955 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3956 │ Subtable ID│ 2│ 2│ 4│ 4│ 6│ 6│ 8│ 8│
3957 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3958 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3959 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3960 │ Subtable ID│ 2│ 2│ 4│ 4│ 6│ 6│ 8│ 8│
3961 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3962 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3963 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3964 │ Subtable ID│ 10│10│ 12│12│ 14│14│ 16│16│
3965 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3966 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3967 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3968 │ Subtable ID│ 10│10│ 12│12│ 14│14│ 16│16│
3969 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
3974 ╭──────────────────────────────────┬───────────────────────────╮
3976 │ ├─────────────┬─────────────┤
3978 │ ├─────────────┼─────────────┤
3980 │ ├──────┬──────┼──────┬──────┤
3981 │ │ Yes │ No │ Yes │ No │
3982 │ ├──────┼──────┼──────┼──────┤
3983 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3984 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3985 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3986 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3987 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3988 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3989 │ Subtable ID│ 17│17│ 19│19│ 21│21│ 23│23│
3990 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3991 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3992 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3993 │ Subtable ID│ 17│17│ 19│19│ 21│21│ 23│23│
3994 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3995 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3996 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3997 │ Subtable ID│ 25│25│ 27│27│ 29│29│ 31│31│
3998 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3999 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4000 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4001 │ Subtable ID│ 25│25│ 27│27│ 29│29│ 31│31│
4002 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4007 ╭──────────────────────────────────┬───────────────────────────╮
4009 │ ├─────────────┬─────────────┤
4011 │ ├─────────────┼─────────────┤
4013 │ ├──────┬──────┼──────┬──────┤
4014 │ │ Yes │ No │ Yes │ No │
4015 │ ├──────┼──────┼──────┼──────┤
4016 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4017 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4018 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4019 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4020 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4021 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4022 │ Subtable ID│ 18│18│ 20│20│ 22│22│ 24│24│
4023 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4024 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4025 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4026 │ Subtable ID│ 18│18│ 20│20│ 22│22│ 24│24│
4027 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4028 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4029 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4030 │ Subtable ID│ 26│26│ 28│28│ 30│30│ 32│32│
4031 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4032 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4033 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4034 │ Subtable ID│ 26│26│ 28│28│ 30│30│ 32│32│
4035 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4040 ╭───────────────────────────────────┬───────────────────────────╮
4042 │ ├─────────────┬─────────────┤
4044 │ ├─────────────┼─────────────┤
4046 │ ├──────┬──────┼──────┬──────┤
4047 │ │ Yes │ No │ Yes │ No │
4048 │ ├──────┼──────┼──────┼──────┤
4049 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4050 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4051 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4052 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4053 │QN26 Yes QN61 Yes QN57 Row ID │ 1│ 1│ 3│ 3│ 5│ 5│ 7│ 7│
4054 │ Layer Row ID│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
4055 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4056 │ No QN57 Row ID │ 9│ 9│ 11│11│ 13│13│ 15│15│
4057 │ Layer Row ID│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4058 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4059 │ No QN61 Yes QN57 Row ID │ 17│17│ 19│19│ 21│21│ 23│23│
4060 │ Layer Row ID│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│
4061 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4062 │ No QN57 Row ID │ 25│25│ 27│27│ 29│29│ 31│31│
4063 │ Layer Row ID│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│
4064 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4069 ╭───────────────────────────────────┬───────────────────────────╮
4071 │ ├─────────────┬─────────────┤
4073 │ ├─────────────┼─────────────┤
4075 │ ├──────┬──────┼──────┬──────┤
4076 │ │ Yes │ No │ Yes │ No │
4077 │ ├──────┼──────┼──────┼──────┤
4078 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4079 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4080 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4081 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4082 │QN26 Yes QN61 Yes QN57 Row ID │ 2│ 2│ 4│ 4│ 6│ 6│ 8│ 8│
4083 │ Layer Row ID│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4084 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4085 │ No QN57 Row ID │ 10│10│ 12│12│ 14│14│ 16│16│
4086 │ Layer Row ID│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4087 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4088 │ No QN61 Yes QN57 Row ID │ 18│18│ 20│20│ 22│22│ 24│24│
4089 │ Layer Row ID│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│
4090 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4091 │ No QN57 Row ID │ 26│26│ 28│28│ 30│30│ 32│32│
4092 │ Layer Row ID│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│
4093 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4098 ╭───────────────────────────────────┬───────────────────────────╮
4100 │ ├─────────────┬─────────────┤
4102 │ ├─────────────┼─────────────┤
4104 │ ├──────┬──────┼──────┬──────┤
4105 │ │ Yes │ No │ Yes │ No │
4106 │ ├──────┼──────┼──────┼──────┤
4107 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4108 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4109 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4110 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4111 │QN26 Yes QN61 Yes QN57 Row ID │ 33│33│ 35│35│ 37│37│ 39│39│
4112 │ Layer Row ID│ 9│ 9│ 9│ 9│ 9│ 9│ 9│ 9│
4113 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4114 │ No QN57 Row ID │ 41│41│ 43│43│ 45│45│ 47│47│
4115 │ Layer Row ID│ 11│11│ 11│11│ 11│11│ 11│11│
4116 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4117 │ No QN61 Yes QN57 Row ID │ 49│49│ 51│51│ 53│53│ 55│55│
4118 │ Layer Row ID│ 13│13│ 13│13│ 13│13│ 13│13│
4119 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4120 │ No QN57 Row ID │ 57│57│ 59│59│ 61│61│ 63│63│
4121 │ Layer Row ID│ 15│15│ 15│15│ 15│15│ 15│15│
4122 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4127 ╭───────────────────────────────────┬───────────────────────────╮
4129 │ ├─────────────┬─────────────┤
4131 │ ├─────────────┼─────────────┤
4133 │ ├──────┬──────┼──────┬──────┤
4134 │ │ Yes │ No │ Yes │ No │
4135 │ ├──────┼──────┼──────┼──────┤
4136 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4137 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4138 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4139 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4140 │QN26 Yes QN61 Yes QN57 Row ID │ 34│34│ 36│36│ 38│38│ 40│40│
4141 │ Layer Row ID│ 10│10│ 10│10│ 10│10│ 10│10│
4142 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4143 │ No QN57 Row ID │ 42│42│ 44│44│ 46│46│ 48│48│
4144 │ Layer Row ID│ 12│12│ 12│12│ 12│12│ 12│12│
4145 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4146 │ No QN61 Yes QN57 Row ID │ 50│50│ 52│52│ 54│54│ 56│56│
4147 │ Layer Row ID│ 14│14│ 14│14│ 14│14│ 14│14│
4148 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4149 │ No QN57 Row ID │ 58│58│ 60│60│ 62│62│ 64│64│
4150 │ Layer Row ID│ 16│16│ 16│16│ 16│16│ 16│16│
4151 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4156 ╭──────────────────────────────────────┬───────────────────────────╮
4158 │ ├─────────────┬─────────────┤
4160 │ ├─────────────┼─────────────┤
4162 │ ├──────┬──────┼──────┬──────┤
4163 │ │ Yes │ No │ Yes │ No │
4164 │ ├──────┼──────┼──────┼──────┤
4165 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4166 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4167 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4168 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4169 │QN26 Yes QN61 Yes QN57 Column ID │ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4170 │ Layer Column ID│ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4171 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4172 │ No QN57 Column ID │ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4173 │ Layer Column ID│ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4174 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4175 │ No QN61 Yes QN57 Column ID │ 17│19│ 21│23│ 25│27│ 29│31│
4176 │ Layer Column ID│ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4177 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4178 │ No QN57 Column ID │ 17│19│ 21│23│ 25│27│ 29│31│
4179 │ Layer Column ID│ 1│ 3│ 5│ 7│ 9│11│ 13│15│
4180 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4185 ╭──────────────────────────────────────┬───────────────────────────╮
4187 │ ├─────────────┬─────────────┤
4189 │ ├─────────────┼─────────────┤
4191 │ ├──────┬──────┼──────┬──────┤
4192 │ │ Yes │ No │ Yes │ No │
4193 │ ├──────┼──────┼──────┼──────┤
4194 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4195 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4196 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4197 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4198 │QN26 Yes QN61 Yes QN57 Column ID │ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4199 │ Layer Column ID│ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4200 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4201 │ No QN57 Column ID │ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4202 │ Layer Column ID│ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4203 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4204 │ No QN61 Yes QN57 Column ID │ 18│20│ 22│24│ 26│28│ 30│32│
4205 │ Layer Column ID│ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4206 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4207 │ No QN57 Column ID │ 18│20│ 22│24│ 26│28│ 30│32│
4208 │ Layer Column ID│ 2│ 4│ 6│ 8│ 10│12│ 14│16│
4209 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4214 ╭──────────────────────────────────────┬───────────────────────────╮
4216 │ ├─────────────┬─────────────┤
4218 │ ├─────────────┼─────────────┤
4220 │ ├──────┬──────┼──────┬──────┤
4221 │ │ Yes │ No │ Yes │ No │
4222 │ ├──────┼──────┼──────┼──────┤
4223 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4224 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4225 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4226 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4227 │QN26 Yes QN61 Yes QN57 Column ID │ 33│35│ 37│39│ 41│43│ 45│47│
4228 │ Layer Column ID│ 17│19│ 21│23│ 25│27│ 29│31│
4229 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4230 │ No QN57 Column ID │ 33│35│ 37│39│ 41│43│ 45│47│
4231 │ Layer Column ID│ 17│19│ 21│23│ 25│27│ 29│31│
4232 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4233 │ No QN61 Yes QN57 Column ID │ 49│51│ 53│55│ 57│59│ 61│63│
4234 │ Layer Column ID│ 17│19│ 21│23│ 25│27│ 29│31│
4235 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4236 │ No QN57 Column ID │ 49│51│ 53│55│ 57│59│ 61│63│
4237 │ Layer Column ID│ 17│19│ 21│23│ 25│27│ 29│31│
4238 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4243 ╭──────────────────────────────────────┬───────────────────────────╮
4245 │ ├─────────────┬─────────────┤
4247 │ ├─────────────┼─────────────┤
4249 │ ├──────┬──────┼──────┬──────┤
4250 │ │ Yes │ No │ Yes │ No │
4251 │ ├──────┼──────┼──────┼──────┤
4252 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4253 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4254 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4255 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4256 │QN26 Yes QN61 Yes QN57 Column ID │ 34│36│ 38│40│ 42│44│ 46│48│
4257 │ Layer Column ID│ 18│20│ 22│24│ 26│28│ 30│32│
4258 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4259 │ No QN57 Column ID │ 34│36│ 38│40│ 42│44│ 46│48│
4260 │ Layer Column ID│ 18│20│ 22│24│ 26│28│ 30│32│
4261 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4262 │ No QN61 Yes QN57 Column ID │ 50│52│ 54│56│ 58│60│ 62│64│
4263 │ Layer Column ID│ 18│20│ 22│24│ 26│28│ 30│32│
4264 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4265 │ No QN57 Column ID │ 50│52│ 54│56│ 58│60│ 62│64│
4266 │ Layer Column ID│ 18│20│ 22│24│ 26│28│ 30│32│
4267 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4271 AT_SETUP([CTABLES area definitions with CLABELS COLLABELS=LAYER])
4272 AT_KEYWORDS([COLLABELS LAYER])
4273 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4274 AT_DATA([ctables.sps],
4277 /VLABELS VARIABLES=ALL DISPLAY=NAME
4278 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
4279 /SLABELS POSITION=ROW
4280 /CLABELS COLLABELS=LAYER
4281 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
4282 /SLABELS POSITION=ROW
4283 /CLABELS COLLABELS=LAYER
4284 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
4285 /SLABELS POSITION=ROW
4286 /CLABELS COLLABELS=LAYER.
4288 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
4292 ╭──────────────────────────────────────┬───────────────────╮
4294 │ ├─────────┬─────────┤
4296 │ ├─────────┼─────────┤
4298 │ ├────┬────┼────┬────┤
4299 │ │ Yes│ No │ Yes│ No │
4300 │ ├────┼────┼────┼────┤
4301 │ │QN86│QN86│QN86│QN86│
4302 ├──────────────────────────────────────┼────┼────┼────┼────┤
4303 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4304 │ Layer ID │ 1│ 1│ 1│ 1│
4305 │ Subtable ID│ 1│ 1│ 3│ 3│
4306 │ ╶───────────────┼────┼────┼────┼────┤
4307 │ No Table ID │ 1│ 1│ 1│ 1│
4308 │ Layer ID │ 1│ 1│ 1│ 1│
4309 │ Subtable ID│ 1│ 1│ 3│ 3│
4310 │ ╶────────────────────────┼────┼────┼────┼────┤
4311 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4312 │ Layer ID │ 1│ 1│ 1│ 1│
4313 │ Subtable ID│ 5│ 5│ 7│ 7│
4314 │ ╶───────────────┼────┼────┼────┼────┤
4315 │ No Table ID │ 1│ 1│ 1│ 1│
4316 │ Layer ID │ 1│ 1│ 1│ 1│
4317 │ Subtable ID│ 5│ 5│ 7│ 7│
4318 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4319 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4320 │ Layer ID │ 1│ 1│ 1│ 1│
4321 │ Subtable ID│ 9│ 9│ 11│ 11│
4322 │ ╶───────────────┼────┼────┼────┼────┤
4323 │ No Table ID │ 1│ 1│ 1│ 1│
4324 │ Layer ID │ 1│ 1│ 1│ 1│
4325 │ Subtable ID│ 9│ 9│ 11│ 11│
4326 │ ╶────────────────────────┼────┼────┼────┼────┤
4327 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4328 │ Layer ID │ 1│ 1│ 1│ 1│
4329 │ Subtable ID│ 13│ 13│ 15│ 15│
4330 │ ╶───────────────┼────┼────┼────┼────┤
4331 │ No Table ID │ 1│ 1│ 1│ 1│
4332 │ Layer ID │ 1│ 1│ 1│ 1│
4333 │ Subtable ID│ 13│ 13│ 15│ 15│
4334 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4339 ╭──────────────────────────────────────┬───────────────────╮
4341 │ ├─────────┬─────────┤
4343 │ ├─────────┼─────────┤
4345 │ ├────┬────┼────┬────┤
4346 │ │ Yes│ No │ Yes│ No │
4347 │ ├────┼────┼────┼────┤
4348 │ │QN86│QN86│QN86│QN86│
4349 ├──────────────────────────────────────┼────┼────┼────┼────┤
4350 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4351 │ Layer ID │ 2│ 2│ 2│ 2│
4352 │ Subtable ID│ 2│ 2│ 4│ 4│
4353 │ ╶───────────────┼────┼────┼────┼────┤
4354 │ No Table ID │ 1│ 1│ 1│ 1│
4355 │ Layer ID │ 2│ 2│ 2│ 2│
4356 │ Subtable ID│ 2│ 2│ 4│ 4│
4357 │ ╶────────────────────────┼────┼────┼────┼────┤
4358 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4359 │ Layer ID │ 2│ 2│ 2│ 2│
4360 │ Subtable ID│ 6│ 6│ 8│ 8│
4361 │ ╶───────────────┼────┼────┼────┼────┤
4362 │ No Table ID │ 1│ 1│ 1│ 1│
4363 │ Layer ID │ 2│ 2│ 2│ 2│
4364 │ Subtable ID│ 6│ 6│ 8│ 8│
4365 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4366 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4367 │ Layer ID │ 2│ 2│ 2│ 2│
4368 │ Subtable ID│ 10│ 10│ 12│ 12│
4369 │ ╶───────────────┼────┼────┼────┼────┤
4370 │ No Table ID │ 1│ 1│ 1│ 1│
4371 │ Layer ID │ 2│ 2│ 2│ 2│
4372 │ Subtable ID│ 10│ 10│ 12│ 12│
4373 │ ╶────────────────────────┼────┼────┼────┼────┤
4374 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4375 │ Layer ID │ 2│ 2│ 2│ 2│
4376 │ Subtable ID│ 14│ 14│ 16│ 16│
4377 │ ╶───────────────┼────┼────┼────┼────┤
4378 │ No Table ID │ 1│ 1│ 1│ 1│
4379 │ Layer ID │ 2│ 2│ 2│ 2│
4380 │ Subtable ID│ 14│ 14│ 16│ 16│
4381 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4386 ╭──────────────────────────────────────┬───────────────────╮
4388 │ ├─────────┬─────────┤
4390 │ ├─────────┼─────────┤
4392 │ ├────┬────┼────┬────┤
4393 │ │ Yes│ No │ Yes│ No │
4394 │ ├────┼────┼────┼────┤
4395 │ │QN86│QN86│QN86│QN86│
4396 ├──────────────────────────────────────┼────┼────┼────┼────┤
4397 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4398 │ Layer ID │ 3│ 3│ 3│ 3│
4399 │ Subtable ID│ 17│ 17│ 19│ 19│
4400 │ ╶───────────────┼────┼────┼────┼────┤
4401 │ No Table ID │ 1│ 1│ 1│ 1│
4402 │ Layer ID │ 3│ 3│ 3│ 3│
4403 │ Subtable ID│ 17│ 17│ 19│ 19│
4404 │ ╶────────────────────────┼────┼────┼────┼────┤
4405 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4406 │ Layer ID │ 3│ 3│ 3│ 3│
4407 │ Subtable ID│ 21│ 21│ 23│ 23│
4408 │ ╶───────────────┼────┼────┼────┼────┤
4409 │ No Table ID │ 1│ 1│ 1│ 1│
4410 │ Layer ID │ 3│ 3│ 3│ 3│
4411 │ Subtable ID│ 21│ 21│ 23│ 23│
4412 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4413 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4414 │ Layer ID │ 3│ 3│ 3│ 3│
4415 │ Subtable ID│ 25│ 25│ 27│ 27│
4416 │ ╶───────────────┼────┼────┼────┼────┤
4417 │ No Table ID │ 1│ 1│ 1│ 1│
4418 │ Layer ID │ 3│ 3│ 3│ 3│
4419 │ Subtable ID│ 25│ 25│ 27│ 27│
4420 │ ╶────────────────────────┼────┼────┼────┼────┤
4421 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4422 │ Layer ID │ 3│ 3│ 3│ 3│
4423 │ Subtable ID│ 29│ 29│ 31│ 31│
4424 │ ╶───────────────┼────┼────┼────┼────┤
4425 │ No Table ID │ 1│ 1│ 1│ 1│
4426 │ Layer ID │ 3│ 3│ 3│ 3│
4427 │ Subtable ID│ 29│ 29│ 31│ 31│
4428 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4433 ╭──────────────────────────────────────┬───────────────────╮
4435 │ ├─────────┬─────────┤
4437 │ ├─────────┼─────────┤
4439 │ ├────┬────┼────┬────┤
4440 │ │ Yes│ No │ Yes│ No │
4441 │ ├────┼────┼────┼────┤
4442 │ │QN86│QN86│QN86│QN86│
4443 ├──────────────────────────────────────┼────┼────┼────┼────┤
4444 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4445 │ Layer ID │ 4│ 4│ 4│ 4│
4446 │ Subtable ID│ 18│ 18│ 20│ 20│
4447 │ ╶───────────────┼────┼────┼────┼────┤
4448 │ No Table ID │ 1│ 1│ 1│ 1│
4449 │ Layer ID │ 4│ 4│ 4│ 4│
4450 │ Subtable ID│ 18│ 18│ 20│ 20│
4451 │ ╶────────────────────────┼────┼────┼────┼────┤
4452 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4453 │ Layer ID │ 4│ 4│ 4│ 4│
4454 │ Subtable ID│ 22│ 22│ 24│ 24│
4455 │ ╶───────────────┼────┼────┼────┼────┤
4456 │ No Table ID │ 1│ 1│ 1│ 1│
4457 │ Layer ID │ 4│ 4│ 4│ 4│
4458 │ Subtable ID│ 22│ 22│ 24│ 24│
4459 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4460 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4461 │ Layer ID │ 4│ 4│ 4│ 4│
4462 │ Subtable ID│ 26│ 26│ 28│ 28│
4463 │ ╶───────────────┼────┼────┼────┼────┤
4464 │ No Table ID │ 1│ 1│ 1│ 1│
4465 │ Layer ID │ 4│ 4│ 4│ 4│
4466 │ Subtable ID│ 26│ 26│ 28│ 28│
4467 │ ╶────────────────────────┼────┼────┼────┼────┤
4468 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4469 │ Layer ID │ 4│ 4│ 4│ 4│
4470 │ Subtable ID│ 30│ 30│ 32│ 32│
4471 │ ╶───────────────┼────┼────┼────┼────┤
4472 │ No Table ID │ 1│ 1│ 1│ 1│
4473 │ Layer ID │ 4│ 4│ 4│ 4│
4474 │ Subtable ID│ 30│ 30│ 32│ 32│
4475 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4480 ╭───────────────────────────────────────┬───────────────────╮
4482 │ ├─────────┬─────────┤
4484 │ ├─────────┼─────────┤
4486 │ ├────┬────┼────┬────┤
4487 │ │ Yes│ No │ Yes│ No │
4488 │ ├────┼────┼────┼────┤
4489 │ │QN86│QN86│QN86│QN86│
4490 ├───────────────────────────────────────┼────┼────┼────┼────┤
4491 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 1│ 1│ 3│ 3│
4492 │ Layer Row ID│ 1│ 1│ 1│ 1│
4493 │ ╶────────────────┼────┼────┼────┼────┤
4494 │ No Row ID │ 5│ 5│ 7│ 7│
4495 │ Layer Row ID│ 3│ 3│ 3│ 3│
4496 │ ╶─────────────────────────┼────┼────┼────┼────┤
4497 │ No QN57 Yes Row ID │ 9│ 9│ 11│ 11│
4498 │ Layer Row ID│ 5│ 5│ 5│ 5│
4499 │ ╶────────────────┼────┼────┼────┼────┤
4500 │ No Row ID │ 13│ 13│ 15│ 15│
4501 │ Layer Row ID│ 7│ 7│ 7│ 7│
4502 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4503 │ No QN61 Yes QN57 Yes Row ID │ 17│ 17│ 19│ 19│
4504 │ Layer Row ID│ 9│ 9│ 9│ 9│
4505 │ ╶────────────────┼────┼────┼────┼────┤
4506 │ No Row ID │ 21│ 21│ 23│ 23│
4507 │ Layer Row ID│ 11│ 11│ 11│ 11│
4508 │ ╶─────────────────────────┼────┼────┼────┼────┤
4509 │ No QN57 Yes Row ID │ 25│ 25│ 27│ 27│
4510 │ Layer Row ID│ 13│ 13│ 13│ 13│
4511 │ ╶────────────────┼────┼────┼────┼────┤
4512 │ No Row ID │ 29│ 29│ 31│ 31│
4513 │ Layer Row ID│ 15│ 15│ 15│ 15│
4514 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4519 ╭───────────────────────────────────────┬───────────────────╮
4521 │ ├─────────┬─────────┤
4523 │ ├─────────┼─────────┤
4525 │ ├────┬────┼────┬────┤
4526 │ │ Yes│ No │ Yes│ No │
4527 │ ├────┼────┼────┼────┤
4528 │ │QN86│QN86│QN86│QN86│
4529 ├───────────────────────────────────────┼────┼────┼────┼────┤
4530 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 2│ 2│ 4│ 4│
4531 │ Layer Row ID│ 2│ 2│ 2│ 2│
4532 │ ╶────────────────┼────┼────┼────┼────┤
4533 │ No Row ID │ 6│ 6│ 8│ 8│
4534 │ Layer Row ID│ 4│ 4│ 4│ 4│
4535 │ ╶─────────────────────────┼────┼────┼────┼────┤
4536 │ No QN57 Yes Row ID │ 10│ 10│ 12│ 12│
4537 │ Layer Row ID│ 6│ 6│ 6│ 6│
4538 │ ╶────────────────┼────┼────┼────┼────┤
4539 │ No Row ID │ 14│ 14│ 16│ 16│
4540 │ Layer Row ID│ 8│ 8│ 8│ 8│
4541 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4542 │ No QN61 Yes QN57 Yes Row ID │ 18│ 18│ 20│ 20│
4543 │ Layer Row ID│ 10│ 10│ 10│ 10│
4544 │ ╶────────────────┼────┼────┼────┼────┤
4545 │ No Row ID │ 22│ 22│ 24│ 24│
4546 │ Layer Row ID│ 12│ 12│ 12│ 12│
4547 │ ╶─────────────────────────┼────┼────┼────┼────┤
4548 │ No QN57 Yes Row ID │ 26│ 26│ 28│ 28│
4549 │ Layer Row ID│ 14│ 14│ 14│ 14│
4550 │ ╶────────────────┼────┼────┼────┼────┤
4551 │ No Row ID │ 30│ 30│ 32│ 32│
4552 │ Layer Row ID│ 16│ 16│ 16│ 16│
4553 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4558 ╭───────────────────────────────────────┬───────────────────╮
4560 │ ├─────────┬─────────┤
4562 │ ├─────────┼─────────┤
4564 │ ├────┬────┼────┬────┤
4565 │ │ Yes│ No │ Yes│ No │
4566 │ ├────┼────┼────┼────┤
4567 │ │QN86│QN86│QN86│QN86│
4568 ├───────────────────────────────────────┼────┼────┼────┼────┤
4569 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 33│ 33│ 35│ 35│
4570 │ Layer Row ID│ 17│ 17│ 17│ 17│
4571 │ ╶────────────────┼────┼────┼────┼────┤
4572 │ No Row ID │ 37│ 37│ 39│ 39│
4573 │ Layer Row ID│ 19│ 19│ 19│ 19│
4574 │ ╶─────────────────────────┼────┼────┼────┼────┤
4575 │ No QN57 Yes Row ID │ 41│ 41│ 43│ 43│
4576 │ Layer Row ID│ 21│ 21│ 21│ 21│
4577 │ ╶────────────────┼────┼────┼────┼────┤
4578 │ No Row ID │ 45│ 45│ 47│ 47│
4579 │ Layer Row ID│ 23│ 23│ 23│ 23│
4580 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4581 │ No QN61 Yes QN57 Yes Row ID │ 49│ 49│ 51│ 51│
4582 │ Layer Row ID│ 25│ 25│ 25│ 25│
4583 │ ╶────────────────┼────┼────┼────┼────┤
4584 │ No Row ID │ 53│ 53│ 55│ 55│
4585 │ Layer Row ID│ 27│ 27│ 27│ 27│
4586 │ ╶─────────────────────────┼────┼────┼────┼────┤
4587 │ No QN57 Yes Row ID │ 57│ 57│ 59│ 59│
4588 │ Layer Row ID│ 29│ 29│ 29│ 29│
4589 │ ╶────────────────┼────┼────┼────┼────┤
4590 │ No Row ID │ 61│ 61│ 63│ 63│
4591 │ Layer Row ID│ 31│ 31│ 31│ 31│
4592 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4597 ╭───────────────────────────────────────┬───────────────────╮
4599 │ ├─────────┬─────────┤
4601 │ ├─────────┼─────────┤
4603 │ ├────┬────┼────┬────┤
4604 │ │ Yes│ No │ Yes│ No │
4605 │ ├────┼────┼────┼────┤
4606 │ │QN86│QN86│QN86│QN86│
4607 ├───────────────────────────────────────┼────┼────┼────┼────┤
4608 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 34│ 34│ 36│ 36│
4609 │ Layer Row ID│ 18│ 18│ 18│ 18│
4610 │ ╶────────────────┼────┼────┼────┼────┤
4611 │ No Row ID │ 38│ 38│ 40│ 40│
4612 │ Layer Row ID│ 20│ 20│ 20│ 20│
4613 │ ╶─────────────────────────┼────┼────┼────┼────┤
4614 │ No QN57 Yes Row ID │ 42│ 42│ 44│ 44│
4615 │ Layer Row ID│ 22│ 22│ 22│ 22│
4616 │ ╶────────────────┼────┼────┼────┼────┤
4617 │ No Row ID │ 46│ 46│ 48│ 48│
4618 │ Layer Row ID│ 24│ 24│ 24│ 24│
4619 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4620 │ No QN61 Yes QN57 Yes Row ID │ 50│ 50│ 52│ 52│
4621 │ Layer Row ID│ 26│ 26│ 26│ 26│
4622 │ ╶────────────────┼────┼────┼────┼────┤
4623 │ No Row ID │ 54│ 54│ 56│ 56│
4624 │ Layer Row ID│ 28│ 28│ 28│ 28│
4625 │ ╶─────────────────────────┼────┼────┼────┼────┤
4626 │ No QN57 Yes Row ID │ 58│ 58│ 60│ 60│
4627 │ Layer Row ID│ 30│ 30│ 30│ 30│
4628 │ ╶────────────────┼────┼────┼────┼────┤
4629 │ No Row ID │ 62│ 62│ 64│ 64│
4630 │ Layer Row ID│ 32│ 32│ 32│ 32│
4631 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4636 ╭──────────────────────────────────────────┬───────────────────╮
4638 │ ├─────────┬─────────┤
4640 │ ├─────────┼─────────┤
4642 │ ├────┬────┼────┬────┤
4643 │ │ Yes│ No │ Yes│ No │
4644 │ ├────┼────┼────┼────┤
4645 │ │QN86│QN86│QN86│QN86│
4646 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4647 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 1│ 3│ 5│ 7│
4648 │ Layer Column ID│ 1│ 3│ 5│ 7│
4649 │ ╶───────────────────┼────┼────┼────┼────┤
4650 │ No Column ID │ 1│ 3│ 5│ 7│
4651 │ Layer Column ID│ 1│ 3│ 5│ 7│
4652 │ ╶────────────────────────────┼────┼────┼────┼────┤
4653 │ No QN57 Yes Column ID │ 9│ 11│ 13│ 15│
4654 │ Layer Column ID│ 1│ 3│ 5│ 7│
4655 │ ╶───────────────────┼────┼────┼────┼────┤
4656 │ No Column ID │ 9│ 11│ 13│ 15│
4657 │ Layer Column ID│ 1│ 3│ 5│ 7│
4658 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4659 │ No QN61 Yes QN57 Yes Column ID │ 17│ 19│ 21│ 23│
4660 │ Layer Column ID│ 1│ 3│ 5│ 7│
4661 │ ╶───────────────────┼────┼────┼────┼────┤
4662 │ No Column ID │ 17│ 19│ 21│ 23│
4663 │ Layer Column ID│ 1│ 3│ 5│ 7│
4664 │ ╶────────────────────────────┼────┼────┼────┼────┤
4665 │ No QN57 Yes Column ID │ 25│ 27│ 29│ 31│
4666 │ Layer Column ID│ 1│ 3│ 5│ 7│
4667 │ ╶───────────────────┼────┼────┼────┼────┤
4668 │ No Column ID │ 25│ 27│ 29│ 31│
4669 │ Layer Column ID│ 1│ 3│ 5│ 7│
4670 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4675 ╭──────────────────────────────────────────┬───────────────────╮
4677 │ ├─────────┬─────────┤
4679 │ ├─────────┼─────────┤
4681 │ ├────┬────┼────┬────┤
4682 │ │ Yes│ No │ Yes│ No │
4683 │ ├────┼────┼────┼────┤
4684 │ │QN86│QN86│QN86│QN86│
4685 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4686 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 2│ 4│ 6│ 8│
4687 │ Layer Column ID│ 2│ 4│ 6│ 8│
4688 │ ╶───────────────────┼────┼────┼────┼────┤
4689 │ No Column ID │ 2│ 4│ 6│ 8│
4690 │ Layer Column ID│ 2│ 4│ 6│ 8│
4691 │ ╶────────────────────────────┼────┼────┼────┼────┤
4692 │ No QN57 Yes Column ID │ 10│ 12│ 14│ 16│
4693 │ Layer Column ID│ 2│ 4│ 6│ 8│
4694 │ ╶───────────────────┼────┼────┼────┼────┤
4695 │ No Column ID │ 10│ 12│ 14│ 16│
4696 │ Layer Column ID│ 2│ 4│ 6│ 8│
4697 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4698 │ No QN61 Yes QN57 Yes Column ID │ 18│ 20│ 22│ 24│
4699 │ Layer Column ID│ 2│ 4│ 6│ 8│
4700 │ ╶───────────────────┼────┼────┼────┼────┤
4701 │ No Column ID │ 18│ 20│ 22│ 24│
4702 │ Layer Column ID│ 2│ 4│ 6│ 8│
4703 │ ╶────────────────────────────┼────┼────┼────┼────┤
4704 │ No QN57 Yes Column ID │ 26│ 28│ 30│ 32│
4705 │ Layer Column ID│ 2│ 4│ 6│ 8│
4706 │ ╶───────────────────┼────┼────┼────┼────┤
4707 │ No Column ID │ 26│ 28│ 30│ 32│
4708 │ Layer Column ID│ 2│ 4│ 6│ 8│
4709 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4714 ╭──────────────────────────────────────────┬───────────────────╮
4716 │ ├─────────┬─────────┤
4718 │ ├─────────┼─────────┤
4720 │ ├────┬────┼────┬────┤
4721 │ │ Yes│ No │ Yes│ No │
4722 │ ├────┼────┼────┼────┤
4723 │ │QN86│QN86│QN86│QN86│
4724 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4725 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 33│ 35│ 37│ 39│
4726 │ Layer Column ID│ 9│ 11│ 13│ 15│
4727 │ ╶───────────────────┼────┼────┼────┼────┤
4728 │ No Column ID │ 33│ 35│ 37│ 39│
4729 │ Layer Column ID│ 9│ 11│ 13│ 15│
4730 │ ╶────────────────────────────┼────┼────┼────┼────┤
4731 │ No QN57 Yes Column ID │ 41│ 43│ 45│ 47│
4732 │ Layer Column ID│ 9│ 11│ 13│ 15│
4733 │ ╶───────────────────┼────┼────┼────┼────┤
4734 │ No Column ID │ 41│ 43│ 45│ 47│
4735 │ Layer Column ID│ 9│ 11│ 13│ 15│
4736 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4737 │ No QN61 Yes QN57 Yes Column ID │ 49│ 51│ 53│ 55│
4738 │ Layer Column ID│ 9│ 11│ 13│ 15│
4739 │ ╶───────────────────┼────┼────┼────┼────┤
4740 │ No Column ID │ 49│ 51│ 53│ 55│
4741 │ Layer Column ID│ 9│ 11│ 13│ 15│
4742 │ ╶────────────────────────────┼────┼────┼────┼────┤
4743 │ No QN57 Yes Column ID │ 57│ 59│ 61│ 63│
4744 │ Layer Column ID│ 9│ 11│ 13│ 15│
4745 │ ╶───────────────────┼────┼────┼────┼────┤
4746 │ No Column ID │ 57│ 59│ 61│ 63│
4747 │ Layer Column ID│ 9│ 11│ 13│ 15│
4748 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4753 ╭──────────────────────────────────────────┬───────────────────╮
4755 │ ├─────────┬─────────┤
4757 │ ├─────────┼─────────┤
4759 │ ├────┬────┼────┬────┤
4760 │ │ Yes│ No │ Yes│ No │
4761 │ ├────┼────┼────┼────┤
4762 │ │QN86│QN86│QN86│QN86│
4763 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4764 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 34│ 36│ 38│ 40│
4765 │ Layer Column ID│ 10│ 12│ 14│ 16│
4766 │ ╶───────────────────┼────┼────┼────┼────┤
4767 │ No Column ID │ 34│ 36│ 38│ 40│
4768 │ Layer Column ID│ 10│ 12│ 14│ 16│
4769 │ ╶────────────────────────────┼────┼────┼────┼────┤
4770 │ No QN57 Yes Column ID │ 42│ 44│ 46│ 48│
4771 │ Layer Column ID│ 10│ 12│ 14│ 16│
4772 │ ╶───────────────────┼────┼────┼────┼────┤
4773 │ No Column ID │ 42│ 44│ 46│ 48│
4774 │ Layer Column ID│ 10│ 12│ 14│ 16│
4775 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4776 │ No QN61 Yes QN57 Yes Column ID │ 50│ 52│ 54│ 56│
4777 │ Layer Column ID│ 10│ 12│ 14│ 16│
4778 │ ╶───────────────────┼────┼────┼────┼────┤
4779 │ No Column ID │ 50│ 52│ 54│ 56│
4780 │ Layer Column ID│ 10│ 12│ 14│ 16│
4781 │ ╶────────────────────────────┼────┼────┼────┼────┤
4782 │ No QN57 Yes Column ID │ 58│ 60│ 62│ 64│
4783 │ Layer Column ID│ 10│ 12│ 14│ 16│
4784 │ ╶───────────────────┼────┼────┼────┼────┤
4785 │ No Column ID │ 58│ 60│ 62│ 64│
4786 │ Layer Column ID│ 10│ 12│ 14│ 16│
4787 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4791 AT_SETUP([CTABLES categorical summary functions])
4792 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4793 AT_DATA([ctables.sps],
4796 /TABLE region BY qnd5a[COUNT, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, TOTAL[COUNT, VALIDN, TOTALN]]
4797 /CATEGORIES VARIABLES=qnd5a TOTAL=YES MISSING=INCLUDE
4798 /SLABELS POSITION=ROW.
4800 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
4802 ╭─────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────╮
4803 │ │ D5a. What would you say is your primary ethnic background? │
4804 │ ├─────┬───────┬───────┬──────────┬──────────┬─────────┬──────────┬──────────────┬──────┬───────┬─────┤
4805 │ │ │ │ │ │ │ │ │ Multiple - │ │ │ │
4806 │ │ │ │ │ South │ Central │ Puerto │ Something│ cannot choose│ Don't│ │ │
4807 │ │Cuban│Mexican│Spanish│ American │ American │Rican, OR│ else │ one │ know │Refused│Total│
4808 ├─────────────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4809 │Region NE Count │ 6│ 8│ 8│ 11│ 7│ 39│ 23│ 2│ 0│ 1│ 105│
4810 │ Row % │ 5.7%│ 7.6%│ 7.6%│ 10.5%│ 6.7%│ 37.1%│ 21.9%│ 1.9%│ .0%│ 1.0%│ │
4811 │ Row │ 5.8%│ 7.7%│ 7.7%│ 10.6%│ 6.7%│ 37.5%│ 22.1%│ 1.9%│ .0%│ .0%│ │
4812 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
4813 │ % │ │ │ │ │ │ │ │ │ │ │ │
4814 │ Row │ .4%│ .6%│ .6%│ .8%│ .5%│ 2.8%│ 1.6%│ .1%│ .0%│ .1%│ │
4815 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
4816 │ % │ │ │ │ │ │ │ │ │ │ │ │
4817 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 104│
4818 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1409│
4819 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4820 │ MW Count │ 3│ 24│ 1│ 4│ 5│ 9│ 6│ 0│ 0│ 1│ 53│
4821 │ Row % │ 5.7%│ 45.3%│ 1.9%│ 7.5%│ 9.4%│ 17.0%│ 11.3%│ .0%│ .0%│ 1.9%│ │
4822 │ Row │ 5.8%│ 46.2%│ 1.9%│ 7.7%│ 9.6%│ 17.3%│ 11.5%│ .0%│ .0%│ .0%│ │
4823 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
4824 │ % │ │ │ │ │ │ │ │ │ │ │ │
4825 │ Row │ .2%│ 1.5%│ .1%│ .2%│ .3%│ .5%│ .4%│ .0%│ .0%│ .1%│ │
4826 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
4827 │ % │ │ │ │ │ │ │ │ │ │ │ │
4828 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 52│
4829 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1654│
4830 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4831 │ S Count │ 10│ 113│ 11│ 14│ 25│ 23│ 20│ 2│ 3│ 2│ 223│
4832 │ Row % │ 4.5%│ 50.7%│ 4.9%│ 6.3%│ 11.2%│ 10.3%│ 9.0%│ .9%│ 1.3%│ .9%│ │
4833 │ Row │ 4.6%│ 51.8%│ 5.0%│ 6.4%│ 11.5%│ 10.6%│ 9.2%│ .9%│ .0%│ .0%│ │
4834 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
4835 │ % │ │ │ │ │ │ │ │ │ │ │ │
4836 │ Row │ .4%│ 4.7%│ .5%│ .6%│ 1.0%│ 1.0%│ .8%│ .1%│ .1%│ .1%│ │
4837 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
4838 │ % │ │ │ │ │ │ │ │ │ │ │ │
4839 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 218│
4840 │ Total N│ │ │ │ │ │ │ │ │ │ │ 2390│
4841 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4842 │ W Count │ 1│ 166│ 28│ 5│ 15│ 7│ 19│ 3│ 0│ 1│ 245│
4843 │ Row % │ .4%│ 67.8%│ 11.4%│ 2.0%│ 6.1%│ 2.9%│ 7.8%│ 1.2%│ .0%│ .4%│ │
4844 │ Row │ .4%│ 68.0%│ 11.5%│ 2.0%│ 6.1%│ 2.9%│ 7.8%│ 1.2%│ .0%│ .0%│ │
4845 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
4846 │ % │ │ │ │ │ │ │ │ │ │ │ │
4847 │ Row │ .1%│ 10.7%│ 1.8%│ .3%│ 1.0%│ .5%│ 1.2%│ .2%│ .0%│ .1%│ │
4848 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
4849 │ % │ │ │ │ │ │ │ │ │ │ │ │
4850 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 244│
4851 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1546│
4852 ╰─────────────────┴─────┴───────┴───────┴──────────┴──────────┴─────────┴──────────┴──────────────┴──────┴───────┴─────╯
4856 AT_SETUP([CTABLES scale summary functions])
4857 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4858 AT_DATA([ctables.sps],
4862 * Use SPLIT FILE with FREQUENCIES to generate output equivalent to
4863 CTABLES later, to make the results easier to verify.
4864 SPLIT FILE BY REGION.
4867 /STATISTICS=MEAN SEMEAN MEDIAN MODE STDDEV VARIANCE RANGE MINIMUM MAXIMUM SUM
4868 /FORMAT NOTABLE /MISSING=INCLUDE.
4872 /VLABELS VARIABLE=qn19a DISPLAY=NONE
4873 /TABLE region BY qn19a[VALIDN, MISSING, MEAN, SEMEAN, MEDIAN, MODE, STDDEV, VARIANCE, RANGE, MINIMUM, MAXIMUM, SUM, COUNT, TOTALN, ROWPCT.SUM]
4874 /CATEGORIES VARIABLES=qn19a TOTAL=YES MISSING=INCLUDE
4875 /SLABELS POSITION=ROW
4876 /CLABELS ROWLABELS=OPPOSITE.
4878 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
4880 ╭─────────┬───────────────────────────────────╮
4882 │ ├────────┬────────┬────────┬────────┤
4883 │ │ NE │ MW │ S │ W │
4884 │ ├────────┼────────┼────────┼────────┤
4885 │ │ QN19A │ QN19A │ QN19A │ QN19A │
4886 ├─────────┼────────┼────────┼────────┼────────┤
4887 │N Valid │ 936│ 1019│ 1276│ 950│
4888 │ Missing│ 473│ 635│ 1114│ 596│
4889 ├─────────┼────────┼────────┼────────┼────────┤
4890 │Mean │ 19.33│ 19.83│ 20.29│ 19.87│
4891 ├─────────┼────────┼────────┼────────┼────────┤
4892 │S.E. Mean│ .14│ .16│ .18│ .17│
4893 ├─────────┼────────┼────────┼────────┼────────┤
4894 │Median │ 18.00│ 19.00│ 19.00│ 19.00│
4895 ├─────────┼────────┼────────┼────────┼────────┤
4896 │Mode │ 18.00│ 18.00│ 18.00│ 18.00│
4897 ├─────────┼────────┼────────┼────────┼────────┤
4898 │Std Dev │ 4.41│ 5.15│ 6.44│ 5.25│
4899 ├─────────┼────────┼────────┼────────┼────────┤
4900 │Variance │ 19.41│ 26.47│ 41.43│ 27.59│
4901 ├─────────┼────────┼────────┼────────┼────────┤
4902 │Range │ 59.00│ 71.00│ 75.00│ 61.00│
4903 ├─────────┼────────┼────────┼────────┼────────┤
4904 │Minimum │ .00│ 4.00│ 4.00│ 4.00│
4905 ├─────────┼────────┼────────┼────────┼────────┤
4906 │Maximum │ 59.00│ 75.00│ 79.00│ 65.00│
4907 ├─────────┼────────┼────────┼────────┼────────┤
4908 │Sum │18092.00│20206.00│25886.00│18877.00│
4909 ╰─────────┴────────┴────────┴────────┴────────╯
4912 ╭────────────────────────┬────────┬────────┬────────┬────────╮
4913 │ │ NE │ MW │ S │ W │
4914 ├────────────────────────┼────────┼────────┼────────┼────────┤
4915 │REGION Valid N │ 936│ 1019│ 1276│ 950│
4916 │ Missing │ 473.00│ 635.00│ 1114.00│ 596.00│
4917 │ Mean │ 19.33│ 19.83│ 20.29│ 19.87│
4918 │ Std Error of Mean│ .14│ .16│ .18│ .17│
4919 │ Median │ 18.00│ 19.00│ 19.00│ 19.00│
4920 │ Mode │ 18.00│ 18.00│ 18.00│ 18.00│
4921 │ Std Deviation │ 4.41│ 5.15│ 6.44│ 5.25│
4922 │ Variance │ 19.41│ 26.47│ 41.43│ 27.59│
4923 │ Range │ 59.00│ 71.00│ 75.00│ 61.00│
4924 │ Minimum │ .00│ 4.00│ 4.00│ 4.00│
4925 │ Maximum │ 59.00│ 75.00│ 79.00│ 65.00│
4926 │ Sum │18092.00│20206.00│25886.00│18877.00│
4927 │ Count │ 1409│ 1654│ 2390│ 1546│
4928 │ Total N │ 1409│ 1654│ 2390│ 1546│
4929 │ Row Sum % │ 21.8%│ 24.3%│ 31.2%│ 22.7%│
4930 ╰────────────────────────┴────────┴────────┴────────┴────────╯
4934 AT_SETUP([CTABLES scale summary functions - weighting])
4939 for n in 1 2 3 4 5 6 7 8 9 10; do
4940 if test $c -lt 15; then
4945 printf "$weight $a $b $cval\n"
4946 weight=$(expr \( $weight + 3 \) % 7 + 2)
4947 c=$(expr \( $c + 13 \) % 29 + 7)
4952 AT_DATA([analysis.sps],
4953 [[* Use SPLIT FILE with FREQUENCIES to generate output equivalent to
4954 CTABLES later, to make the results easier to verify.
4958 /STATISTICS=MEAN SEMEAN MEDIAN MODE STDDEV VARIANCE RANGE MINIMUM MAXIMUM SUM
4959 /FORMAT NOTABLE /MISSING=INCLUDE.
4963 /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
4964 /SLABELS POSITION=ROW
4965 /CATEGORIES VARIABLES=a b MISSING=INCLUDE.
4968 AT_DATA([ctables.sps],
4969 [[DATA LIST LIST NOTABLE FILE='ctables.txt'
4970 /w (F5.0) a b c (f2.0).
4971 VAR LEVEL w c (SCALE) a b (NOMINAL).
4972 MISSING VALUES a b (9).
4974 INCLUDE 'analysis.sps'.
4977 INCLUDE 'analysis.sps'.
4979 * Same as original analysis using unweighted versions of summaries.
4981 /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
4982 /SLABELS POSITION=ROW
4983 /CATEGORIES VARIABLES=a b MISSING=INCLUDE.
4985 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
4987 ╭─────────┬──────────────────────────────────────────────────────────────╮
4989 │ ├────────────────────┬────────────────────┬────────────────────┤
4991 │ ├────────────────────┼────────────────────┼────────────────────┤
4993 │ ├──────┬──────┬──────┼──────┬──────┬──────┼──────┬──────┬──────┤
4994 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
4995 │ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4996 │ │ c │ c │ c │ c │ c │ c │ c │ c │ c │
4997 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4998 │N Valid │ 7│ 6│ 8│ 7│ 7│ 8│ 7│ 7│ 8│
4999 │ Missing│ 3│ 4│ 2│ 3│ 3│ 2│ 3│ 3│ 2│
5000 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5001 │Mean │ 25.86│ 24.50│ 24.63│ 25.86│ 25.71│ 24.25│ 25.43│ 25.29│ 23.88│
5002 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5003 │S.E. Mean│ 2.44│ 2.14│ 2.58│ 2.44│ 2.18│ 2.43│ 2.36│ 2.18│ 2.47│
5004 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5005 │Median │ 25.00│ 24.50│ 25.00│ 25.00│ 27.00│ 25.00│ 25.00│ 24.00│ 23.50│
5006 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5007 │Mode │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5008 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5009 │Std Dev │ 6.47│ 5.24│ 7.31│ 6.47│ 5.77│ 6.88│ 6.24│ 5.77│ 6.98│
5010 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5011 │Variance │ 41.81│ 27.50│ 53.41│ 41.81│ 33.24│ 47.36│ 38.95│ 33.24│ 48.70│
5012 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5013 │Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5014 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5015 │Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5016 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5017 │Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5018 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5019 │Sum │181.00│147.00│197.00│181.00│180.00│194.00│178.00│177.00│191.00│
5020 ╰─────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
5023 ╭───────────────────┬──────────────────────────────────────────────────────────────╮
5025 │ ├────────────────────┬────────────────────┬────────────────────┤
5027 │ ├────────────────────┼────────────────────┼────────────────────┤
5029 │ ├──────┬──────┬──────┼──────┬──────┬──────┼──────┬──────┬──────┤
5030 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5031 ├───────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5032 │c Valid N │ 7│ 6│ 8│ 7│ 7│ 8│ 7│ 7│ 8│
5033 │ Missing │ 3│ 4│ 2│ 3│ 3│ 2│ 3│ 3│ 2│
5034 │ Mean │ 25.86│ 24.50│ 24.63│ 25.86│ 25.71│ 24.25│ 25.43│ 25.29│ 23.88│
5035 │ Std Error of Mean│ 2.44│ 2.14│ 2.58│ 2.44│ 2.18│ 2.43│ 2.36│ 2.18│ 2.47│
5036 │ Median │ 25.00│ 24.50│ 25.00│ 25.00│ 27.00│ 25.00│ 25.00│ 24.00│ 23.50│
5037 │ Mode │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5038 │ Std Deviation │ 6.47│ 5.24│ 7.31│ 6.47│ 5.77│ 6.88│ 6.24│ 5.77│ 6.98│
5039 │ Variance │ 41.81│ 27.50│ 53.41│ 41.81│ 33.24│ 47.36│ 38.95│ 33.24│ 48.70│
5040 │ Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5041 │ Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5042 │ Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5043 │ Sum │181.00│147.00│197.00│181.00│180.00│194.00│178.00│177.00│191.00│
5044 │ Count │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5045 │ Total N │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5046 │ Layer Row Sum % │ 11.1%│ 9.0%│ 12.1%│ 11.1%│ 11.1%│ 11.9%│ 10.9%│ 10.9%│ 11.7%│
5047 ╰───────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
5050 ╭─────────┬─────────────────────────────────────────────────────────────────╮
5052 │ ├─────────────────────┬─────────────────────┬─────────────────────┤
5054 │ ├─────────────────────┼─────────────────────┼─────────────────────┤
5056 │ ├───────┬──────┬──────┼──────┬───────┬──────┼──────┬──────┬───────┤
5057 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5058 │ ├───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5059 │ │ c │ c │ c │ c │ c │ c │ c │ c │ c │
5060 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5061 │N Valid │ 40│ 35│ 41│ 26│ 38│ 40│ 34│ 32│ 39│
5062 │ Missing│ 6│ 14│ 11│ 22│ 13│ 7│ 16│ 21│ 10│
5063 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5064 │Mean │ 27.23│ 24.20│ 22.63│ 27.96│ 27.21│ 23.48│ 23.71│ 25.47│ 26.03│
5065 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5066 │S.E. Mean│ .93│ .75│ 1.03│ 1.12│ .84│ .87│ 1.01│ 1.05│ 1.01│
5067 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5068 │Median │ 30.00│ 22.00│ 19.00│ 30.00│ 29.00│ 24.00│ 23.00│ 24.00│ 28.00│
5069 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5070 │Mode │ 34│ 29│ 19│ 34│ 33│ 28│ 23│ 18│ 30│
5071 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5072 │Std Dev │ 5.89│ 4.42│ 6.59│ 5.69│ 5.16│ 5.50│ 5.87│ 5.94│ 6.30│
5073 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5074 │Variance │ 34.64│ 19.52│ 43.39│ 32.36│ 26.66│ 30.20│ 34.46│ 35.29│ 39.71│
5075 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5076 │Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5077 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5078 │Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5079 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5080 │Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5081 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5082 │Sum │1089.00│847.00│928.00│727.00│1034.00│939.00│806.00│815.00│1015.00│
5083 ╰─────────┴───────┴──────┴──────┴──────┴───────┴──────┴──────┴──────┴───────╯
5086 ╭───────────────────┬─────────────────────────────────────────────────────────────────╮
5088 │ ├─────────────────────┬─────────────────────┬─────────────────────┤
5090 │ ├─────────────────────┼─────────────────────┼─────────────────────┤
5092 │ ├───────┬──────┬──────┼──────┬───────┬──────┼──────┬──────┬───────┤
5093 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5094 ├───────────────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5095 │c Valid N │ 40│ 35│ 41│ 26│ 38│ 40│ 34│ 32│ 39│
5096 │ Missing │ 6│ 14│ 11│ 22│ 13│ 7│ 16│ 21│ 10│
5097 │ Mean │ 27.22│ 24.20│ 22.63│ 27.96│ 27.21│ 23.48│ 23.71│ 25.47│ 26.03│
5098 │ Std Error of Mean│ .93│ .75│ 1.03│ 1.12│ .84│ .87│ 1.01│ 1.05│ 1.01│
5099 │ Median │ 30.00│ 22.00│ 19.00│ 30.00│ 29.00│ 24.00│ 23.00│ 24.00│ 28.00│
5100 │ Mode │ 34│ 29│ 19│ 34│ 33│ 28│ 23│ 18│ 30│
5101 │ Std Deviation │ 5.89│ 4.42│ 6.59│ 5.69│ 5.16│ 5.50│ 5.87│ 5.94│ 6.30│
5102 │ Variance │ 34.64│ 19.52│ 43.39│ 32.36│ 26.66│ 30.20│ 34.46│ 35.29│ 39.71│
5103 │ Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5104 │ Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5105 │ Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5106 │ Sum │1089.00│847.00│928.00│727.00│1034.00│939.00│806.00│815.00│1015.00│
5107 │ Count │ 46│ 49│ 52│ 48│ 51│ 47│ 50│ 53│ 49│
5108 │ Total N │ 46│ 49│ 52│ 48│ 51│ 47│ 50│ 53│ 49│
5109 │ Layer Row Sum % │ 13.3%│ 10.3%│ 11.3%│ 8.9%│ 12.6%│ 11.5%│ 9.8%│ 9.9%│ 12.4%│
5110 ╰───────────────────┴───────┴──────┴──────┴──────┴───────┴──────┴──────┴──────┴───────╯
5113 ╭──────────────────────────────┬──────────────────────────────────────────────────────────────╮
5115 │ ├────────────────────┬────────────────────┬────────────────────┤
5117 │ ├────────────────────┼────────────────────┼────────────────────┤
5119 │ ├──────┬──────┬──────┼──────┬──────┬──────┼──────┬──────┬──────┤
5120 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5121 ├──────────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5122 │c Unweighted Valid N │ 7│ 6│ 8│ 7│ 7│ 8│ 7│ 7│ 8│
5123 │ Unweighted Missing │ 3│ 4│ 2│ 3│ 3│ 2│ 3│ 3│ 2│
5124 │ Unweighted Mean │ 25.86│ 24.50│ 24.63│ 25.86│ 25.71│ 24.25│ 25.43│ 25.29│ 23.88│
5125 │ Unweighted Std Error of Mean│ 2.44│ 2.14│ 2.58│ 2.44│ 2.18│ 2.43│ 2.36│ 2.18│ 2.47│
5126 │ Unweighted Median │ 25.00│ 24.50│ 25.00│ 25.00│ 27.00│ 25.00│ 25.00│ 24.00│ 23.50│
5127 │ Unweighted Mode │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5128 │ Unweighted Std Deviation │ 6.47│ 5.24│ 7.31│ 6.47│ 5.77│ 6.88│ 6.24│ 5.77│ 6.98│
5129 │ Unweighted Variance │ 41.81│ 27.50│ 53.41│ 41.81│ 33.24│ 47.36│ 38.95│ 33.24│ 48.70│
5130 │ Unweighted Sum │181.00│147.00│197.00│181.00│180.00│194.00│178.00│177.00│191.00│
5131 │ Unweighted Count │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5132 │ Unweighted Total N │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5133 │ Unweighted Layer Row Sum % │ 11.1%│ 9.0%│ 12.1%│ 11.1%│ 11.1%│ 11.9%│ 10.9%│ 10.9%│ 11.7%│
5134 ╰──────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
5138 AT_SETUP([CTABLES hidden scale VLABELS])
5139 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
5140 AT_DATA([ctables.sps],
5143 /TABLE region BY qn19a + qn35
5144 /SLABELS POSITION=ROW.
5146 /VLABELS VARIABLE=qn19a DISPLAY=NONE
5147 /TABLE region BY qn19a + qn35
5148 /SLABELS POSITION=ROW.
5150 /VLABELS VARIABLE=qn35 DISPLAY=NONE
5151 /TABLE region BY qn19a + qn35
5152 /SLABELS POSITION=ROW.
5154 * This one in particular caused a crash because no categories were
5155 created on the column axis, so passing in 0 for the index was still
5156 too big for that number of categories. It was fixed by creating a
5157 name-only category for each variable despite the "NONE" request,
5158 then hiding the entire dimension's labels if all its labels were
5161 /VLABELS VARIABLE=qn19a qn35 DISPLAY=NONE
5162 /TABLE region BY qn19a + qn35
5163 /SLABELS POSITION=ROW.
5165 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
5167 ╭──────────────┬────────────────────────────┬─────────────────────────────────╮
5168 │ │ 19a. About how old were you│ 35. In the past thirty days, how│
5169 │ │ when you first starting │ many times have you driven a │
5170 │ │ drinking alcohol, not │ motor vehicle WITHIN TWO HOURS │
5171 │ │ counting small tastes or │ AFTER drinking alcoholic │
5172 │ │ sips of alcohol. │ beverages? │
5173 ├──────────────┼────────────────────────────┼─────────────────────────────────┤
5174 │Region NE Mean│ 19.33│ 2│
5175 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5176 │ MW Mean│ 19.83│ 2│
5177 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5179 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5181 ╰──────────────┴────────────────────────────┴─────────────────────────────────╯
5184 ╭──────────────┬─────┬────────────────────────────────────────────────────────╮
5185 │ │ │ 35. In the past thirty days, how many times have you │
5186 │ │ │ driven a motor vehicle WITHIN TWO HOURS AFTER drinking │
5187 │ │QN19A│ alcoholic beverages? │
5188 ├──────────────┼─────┼────────────────────────────────────────────────────────┤
5189 │Region NE Mean│19.33│ 2│
5190 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5192 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5194 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5196 ╰──────────────┴─────┴────────────────────────────────────────────────────────╯
5199 ╭──────────────┬─────────────────────────────────────────────────────────┬────╮
5200 │ │ 19a. About how old were you when you first starting │ │
5201 │ │ drinking alcohol, not counting small tastes or sips of │ │
5203 ├──────────────┼─────────────────────────────────────────────────────────┼────┤
5204 │Region NE Mean│ 19.33│ 2│
5205 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5206 │ MW Mean│ 19.83│ 2│
5207 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5209 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5211 ╰──────────────┴─────────────────────────────────────────────────────────┴────╯
5214 ╭──────────────┬───────╮
5215 │Region NE Mean│19.33 2│
5222 ╰──────────────┴───────╯
5226 AT_SETUP([CTABLES with SPLIT FILE])
5227 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
5228 AT_DATA([ctables.sps],
5231 SORT CASES BY qns3a.
5233 CTABLES /TABLE qn105ba.
5235 * Layered split has no effect on output.
5236 SPLIT FILE BY qns3a.
5237 CTABLES /TABLE qn105ba.
5239 * Add column variable qns3a to compare against separate splits.
5240 CTABLES /TABLE qn105ba BY qns3a.
5242 * Separate splits are truly output separately.
5243 SPLIT FILE SEPARATE BY qns3a.
5244 CTABLES /TABLE qn105ba.
5246 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
5248 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5250 ├────────────────────────────────────────────────────────────────────────┼─────┤
5251 │105b. How likely is it that drivers who have had too much Almost │ 700│
5252 │to drink to drive safely will A. Get stopped by the police? certain │ │
5253 │ Very likely │ 1502│
5260 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5263 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5265 ├────────────────────────────────────────────────────────────────────────┼─────┤
5266 │105b. How likely is it that drivers who have had too much Almost │ 700│
5267 │to drink to drive safely will A. Get stopped by the police? certain │ │
5268 │ Very likely │ 1502│
5275 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5278 ╭─────────────────────────────────────────────────────────────────┬────────────╮
5284 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
5285 │105b. How likely is it that drivers who have had too Almost │ 297│ 403│
5286 │much to drink to drive safely will A. Get stopped by certain │ │ │
5287 │the police? Very likely │ 660│ 842│
5288 │ Somewhat │ 1174│ 1589│
5290 │ Somewhat │ 640│ 667│
5294 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
5297 ╭────────────┬─────╮
5299 ├────────────┼─────┤
5300 │S3a. GENDER:│Male │
5301 ╰────────────┴─────╯
5304 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5306 ├────────────────────────────────────────────────────────────────────────┼─────┤
5307 │105b. How likely is it that drivers who have had too much Almost │ 297│
5308 │to drink to drive safely will A. Get stopped by the police? certain │ │
5309 │ Very likely │ 660│
5316 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5319 ╭────────────┬──────╮
5321 ├────────────┼──────┤
5322 │S3a. GENDER:│Female│
5323 ╰────────────┴──────╯
5326 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5328 ├────────────────────────────────────────────────────────────────────────┼─────┤
5329 │105b. How likely is it that drivers who have had too much Almost │ 403│
5330 │to drink to drive safely will A. Get stopped by the police? certain │ │
5331 │ Very likely │ 842│
5338 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5342 AT_SETUP([CTABLES variable level inference])
5343 AT_DATA([data.txt], [dnl
5344 dnl n1 has 10 unique small values -> nominal.
5345 dnl n2 has 23 unique small values -> nominal.
5346 dnl n3 is all missing -> nominal.
5347 dnl s1 has 24 unique small values -> scale.
5348 dnl s2 has one negative value -> scale.
5349 dnl s3 has one non-integer value -> scale.
5350 dnl s4 has no valid values less than 10 -> scale.
5351 dnl s5 has no valid values less than 10,000 -> scale.
5352 1 1 . 1 1 1 10 10001
5353 2 2 . 2 2 2 11 10002
5354 3 3 . 3 3 3 12 10003
5355 4 4 . 4 4 4 13 10004
5356 5 5 . 5 5 5 14 10005
5357 6 6 . 6 6 6 15 10006
5358 7 7 . 7 7 7 16 10007
5359 8 8 . 8 8 8 17 10008
5360 9 9 . 9 9 9 18 10009
5361 10 10 . 10 10 10.5 19 110000
5362 1 11 . 11 -1 1 11 10001
5363 2 12 . 12 2 2 12 10002
5364 3 13 . 13 3 3 13 10003
5365 4 14 . 14 4 4 14 10004
5366 5 15 . 15 5 5 15 10005
5367 6 16 . 16 6 6 16 10006
5368 7 17 . 17 7 7 17 10007
5369 8 18 . 18 8 8 18 10008
5370 9 19 . 19 9 9 19 10009
5371 1 20 . 20 1 1 20 10001
5372 2 21 . 21 2 2 21 10002
5373 3 22 . 22 3 3 22 10003
5374 4 23 . 23 4 4 23 10004
5375 5 23 . 24 5 5 24 10005
5376 6 23 . 24 6 6 25 10006
5379 AT_DATA([ctables.sps], [dnl
5380 DATA LIST LIST file='data.txt' NOTABLE /n1 to n3 s1 to s5.
5382 * Nominal formats (copied from data that will default to scale).
5385 FORMATS n4(WKDAY5) n5(MONTH5).
5387 * Scale formats (copied from data that will default to nominal).
5391 FORMATS s6(DOLLAR6.2) s7(CCA8.2) s8(DATETIME17).
5396 CTABLES /TABLE n1 + n2 + n3 + string + s1 + s2 + s3 + s4 + s5.
5400 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
5402 ╭──────┬────────┬──────────────┬─────┬─────┬─────────┬────────────┬────────────╮
5403 │ │ │ Measurement │ │ │ │ │ │
5404 │Name │Position│ Level │ Role│Width│Alignment│Print Format│Write Format│
5405 ├──────┼────────┼──────────────┼─────┼─────┼─────────┼────────────┼────────────┤
5406 │n1 │ 1│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5407 │n2 │ 2│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5408 │n3 │ 3│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5409 │s1 │ 4│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5410 │s2 │ 5│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5411 │s3 │ 6│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5412 │s4 │ 7│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5413 │s5 │ 8│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5414 │n4 │ 9│Unknown │Input│ 8│Right │WKDAY5 │WKDAY5 │
5415 │n5 │ 10│Unknown │Input│ 8│Right │MONTH5 │MONTH5 │
5416 │s6 │ 11│Unknown │Input│ 8│Right │DOLLAR6.2 │DOLLAR6.2 │
5417 │s7 │ 12│Unknown │Input│ 8│Right │CCA8.2 │CCA8.2 │
5418 │s8 │ 13│Unknown │Input│ 8│Right │DATETIME17.0│DATETIME17.0│
5419 │string│ 14│Nominal │Input│ 8│Left │A8 │A8 │
5420 ╰──────┴────────┴──────────────┴─────┴─────┴─────────┴────────────┴────────────╯
5423 ╭────────────┬─────┬────────╮
5425 ├────────────┼─────┼────────┤
5436 ├────────────┼─────┼────────┤
5460 ├────────────┼─────┼────────┤
5462 ├────────────┼─────┼────────┤
5464 ├────────────┼─────┼────────┤
5466 ├────────────┼─────┼────────┤
5468 ├────────────┼─────┼────────┤
5470 ├────────────┼─────┼────────┤
5472 ╰────────────┴─────┴────────╯
5475 ╭──────┬────────┬──────────────┬─────┬─────┬─────────┬────────────┬────────────╮
5476 │ │ │ Measurement │ │ │ │ │ │
5477 │Name │Position│ Level │ Role│Width│Alignment│Print Format│Write Format│
5478 ├──────┼────────┼──────────────┼─────┼─────┼─────────┼────────────┼────────────┤
5479 │n1 │ 1│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5480 │n2 │ 2│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5481 │n3 │ 3│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5482 │s1 │ 4│Scale │Input│ 8│Right │F8.2 │F8.2 │
5483 │s2 │ 5│Scale │Input│ 8│Right │F8.2 │F8.2 │
5484 │s3 │ 6│Scale │Input│ 8│Right │F8.2 │F8.2 │
5485 │s4 │ 7│Scale │Input│ 8│Right │F8.2 │F8.2 │
5486 │s5 │ 8│Scale │Input│ 8│Right │F8.2 │F8.2 │
5487 │n4 │ 9│Nominal │Input│ 8│Right │WKDAY5 │WKDAY5 │
5488 │n5 │ 10│Nominal │Input│ 8│Right │MONTH5 │MONTH5 │
5489 │s6 │ 11│Scale │Input│ 8│Right │DOLLAR6.2 │DOLLAR6.2 │
5490 │s7 │ 12│Scale │Input│ 8│Right │CCA8.2 │CCA8.2 │
5491 │s8 │ 13│Scale │Input│ 8│Right │DATETIME17.0│DATETIME17.0│
5492 │string│ 14│Nominal │Input│ 8│Left │A8 │A8 │
5493 ╰──────┴────────┴──────────────┴─────┴─────┴─────────┴────────────┴────────────╯