3 dnl Features not yet tested:
4 dnl - Summary functions:
5 dnl * Separate summary functions for totals and subtotals.
6 dnl * U-prefix for unweighted summaries.
7 dnl * areaPCT.SUM and UareaPCT.SUM functions.
8 dnl * WEIGHT and adjustment weights.
9 dnl * details of missing value handling in summaries.
12 dnl - Multiple response sets
13 dnl - MRSETS subcommand.
14 dnl - CATEGORIES: Special case for explicit category specifications and multiple dichotomy sets.
17 dnl - Summary functions:
18 dnl * .LCL and .UCL suffixes.
20 dnl - Summary functions:
21 dnl * )CILEVEL in summary label specification
23 dnl * Data-dependent sorting.
25 AT_SETUP([CTABLES parsing])
26 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
27 AT_DATA([ctables.sps],
30 /FORMAT MINCOLWIDTH=10 MAXCOLWIDTH=20 UNITS=POINTS EMPTY=ZERO MISSING="x"
31 /FORMAT MINCOLWIDTH=DEFAULT MAXCOLWIDTH=DEFAULT UNITS=INCHES EMPTY=BLANK MISSING="."
32 /FORMAT UNITS=CM EMPTY="(-)"
33 /VLABELS VARIABLES=qn1 DISPLAY=DEFAULT
34 /VLABELS VARIABLES=qn17 DISPLAY=NAME
35 /VLABELS VARIABLES=qns3a DISPLAY=LABEL
36 /VLABELS VARIABLES=qnd1 DISPLAY=BOTH
37 /VLABELS VARIABLES=qn20 DISPLAY=NONE
38 /MRSETS COUNTDUPLICATES=NO
39 /MRSETS COUNTDUPLICATES=YES
42 /WEIGHT VARIABLE=qns3a
44 /HIDESMALLCOUNTS COUNT=10
46 /SLABELS POSITION=COLUMN VISIBLE=YES
47 /SLABELS VISIBLE=NO POSITION=ROW
48 /SLABELS POSITION=LAYER
50 /CLABELS ROWLABELS=OPPOSITE
52 /CATEGORIES VARIABLES=qn1 qn17
53 ORDER=A KEY=VALUE MISSING=INCLUDE TOTAL=YES LABEL="xyzzy"
54 POSITION=BEFORE EMPTY=INCLUDE.
55 CTABLES /TABLE qnsa1 /CLABELS ROWLABELS=LAYER.
56 CTABLES /TABLE qnsa1 /CLABELS COLLABELS=OPPOSITE.
57 CTABLES /TABLE qnsa1 /CLABELS COLLABELS=LAYER.
59 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
62 ╭───────────────────┬────┬────╮
64 ├───────────────────┼────┼────┤
65 │Sa1. SAMPLE SOURCE:│5392│1607│
66 ╰───────────────────┴────┴────╯
70 ╭───────────────────┬─────╮
72 ├───────────────────┼─────┤
73 │Sa1. SAMPLE SOURCE:│ 5392│
74 ╰───────────────────┴─────╯
77 ╭────────────────────────┬─────╮
79 ├────────────────────────┼─────┤
80 │Sa1. SAMPLE SOURCE: RDD │ 5392│
82 ╰────────────────────────┴─────╯
85 ╭────────────────────────┬─────╮
87 ├────────────────────────┼─────┤
88 │Sa1. SAMPLE SOURCE: RDD │ 5392│
90 ╰────────────────────────┴─────╯
94 AT_SETUP([CTABLES parsing - negative])
95 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
96 AT_DATA([ctables.sps],
99 CTABLES /FORMAT MINCOLWIDTH='foo'.
100 CTABLES /TABLE qn1 [**].
101 CTABLES /TABLE qn1 [NOTAFUNCTION].
104 CTABLES /TABLE NOTAVAR.
106 CTABLES /TABLE string[S].
107 CTABLES /TABLE qn1 [PTILE 101].
108 CTABLES /TABLE qn1 [MEAN F0.1].
109 CTABLES /TABLE qn1 [MEAN NEGPAREN1.2].
110 CTABLES /TABLE qn1 [MEAN NEGPAREN3.4].
111 CTABLES /TABLE qn1 [MEAN TOTALS].
112 CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
113 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [SUBTOTAL=x].
114 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [LO **].
115 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [LO THRU x].
116 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1 THRU **].
117 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['x' THRU **].
118 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&**].
119 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&x].
120 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=PTILE(qn1, 101).
121 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1.
122 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=MEAN.
123 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 MISSING=**.
124 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 TOTAL=**.
125 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 LABEL=**.
126 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 POSITION=**.
127 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 EMPTY=**.
128 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 **.
129 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1,2,3] **.
130 CTABLES /PCOMPUTE &k=EXPR(SUBTOTAL[0]).
131 CTABLES /PCOMPUTE &k=EXPR(SUBTOTAL[1**]).
132 CTABLES /PCOMPUTE &k=EXPR([LO **]).
133 CTABLES /PCOMPUTE &k=EXPR([LO THRU **]).
134 CTABLES /PCOMPUTE &k=EXPR([1 THRU **]).
135 CTABLES /PCOMPUTE &k=EXPR([1**]).
136 CTABLES /PCOMPUTE &k=EXPR((1x)).
137 CTABLES /PCOMPUTE **k.
138 CTABLES /PCOMPUTE &1.
139 CTABLES /PCOMPUTE &k**.
140 CTABLES /PCOMPUTE &k=**.
141 CTABLES /PCOMPUTE &k=EXPR**.
142 CTABLES /PCOMPUTE &k=EXPR(1x).
143 CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
144 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k FORMAT=NOTAFUNCTION.
145 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k FORMAT=PTILE **.
146 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k LABEL=**.
147 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k HIDESOURCECATS=**.
148 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k **.
149 CTABLES /FORMAT EMPTY=**.
150 CTABLES /FORMAT MISSING=**.
152 CTABLES /FORMAT MINCOLWIDTH=20 MAXCOLWIDTH=10/.
154 CTABLES /VLABELS VARIABLES=NOTAVAR.
155 CTABLES /VLABELS VARIABLES=qn1 **.
156 CTABLES /VLABELS VARIABLES=qn1 DISPLAY=**.
158 CTABLES /MRSETS COUNTDUPLICATES=**.
159 CTABLES /SMISSING **.
161 CTABLES /WEIGHT VARIABLE=NOTAVAR.
162 CTABLES /HIDESMALLCOUNTS COUNT=1.
164 CTABLES /HIDESMALLCOUNTS COUNT=2.
165 CTABLES /TABLE qn1**.
166 CTABLES /TABLE qn1 /SLABELS POSITION=**.
167 CTABLES /TABLE qn1 /SLABELS VISIBLE=**.
168 CTABLES /TABLE qn1 /SLABELS **.
169 CTABLES /TABLE qn1 /CLABELS ROWLABELS=**.
170 CTABLES /TABLE qn1 /CLABELS COLLABELS=**.
171 CTABLES /TABLE qn1 /CLABELS **.
172 CTABLES /TABLE qn1 /CRITERIA **.
173 CTABLES /TABLE qn1 /CRITERIA CILEVEL=101.
174 CTABLES /TABLE qn1 /TITLES **.
175 CTABLES /TABLE qn1 /SIGTEST TYPE=**.
176 CTABLES /TABLE qn1 /SIGTEST ALPHA=**.
177 CTABLES /TABLE qn1 /SIGTEST INCLUDEMRSETS=**.
178 CTABLES /TABLE qn1 /SIGTEST CATEGORIES=**.
179 CTABLES /TABLE qn1 /SIGTEST **.
180 CTABLES /TABLE qn1 /COMPARETEST TYPE=**.
181 CTABLES /TABLE qn1 /COMPARETEST ALPHA=**.
182 CTABLES /TABLE qn1 /COMPARETEST ALPHA=0,5.
183 CTABLES /TABLE qn1 /COMPARETEST ADJUST=**.
184 CTABLES /TABLE qn1 /COMPARETEST INCLUDEMRSETS=**.
185 CTABLES /TABLE qn1 /COMPARETEST MEANSVARIANCE=**.
186 CTABLES /TABLE qn1 /COMPARETEST CATEGORIES=**.
187 CTABLES /TABLE qn1 /COMPARETEST MERGE=**.
188 CTABLES /TABLE qn1 /COMPARETEST STYLE=**.
189 CTABLES /TABLE qn1 /COMPARETEST SHOWSIG=**.
190 CTABLES /TABLE qn1 /COMPARETEST **.
191 CTABLES /TABLE qn1 / **.
192 CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CLABELS COLLABELS=OPPOSITE.
193 CTABLES /TABLE qn20 > qnd1.
194 CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
195 NUMERIC datetime (DATETIME17.0).
196 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=datetime ['123'].
198 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [1],
199 [[ctables.sps:2.8: error: CTABLES: Syntax error at end of command: expecting `/'.
201 ctables.sps:3.29-3.33: error: CTABLES: Syntax error at `'foo'': Expected non-
202 negative number for MINCOLWIDTH.
204 ctables.sps:4.21-4.22: error: CTABLES: Syntax error at `**': expecting
207 ctables.sps:5.21-5.32: error: CTABLES: Syntax error at `NOTAFUNCTION': Expecting
208 summary function name.
210 ctables.sps:6.20: error: CTABLES: Syntax error at end of command: expecting `@:}@'.
212 ctables.sps:7.16-7.17: error: CTABLES: Syntax error at `**': expecting
215 ctables.sps:8: error: CTABLES: NOTAVAR is not a variable name.
217 ctables.sps:10.16-10.24: error: CTABLES: Cannot use string variable string as a
219 10 | CTABLES /TABLE string[S].
222 ctables.sps:11.27-11.29: error: CTABLES: Syntax error at `101': Expected number
223 between 0 and 100 for PTILE.
225 ctables.sps:12: error: CTABLES: Output format F0.1 specifies width 0, but F
226 requires a width between 1 and 40.
228 ctables.sps:13.26-13.36: error: CTABLES: Syntax error at `NEGPAREN1.2': Output
229 format NEGPAREN requires width 2 or greater.
231 ctables.sps:14.26-14.36: error: CTABLES: Syntax error at `NEGPAREN3.4': Output
232 format NEGPAREN requires width greater than decimals.
234 ctables.sps:15.21-15.24: error: CTABLES: Summary function MEAN applies only to
236 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
239 ctables.sps:15.16-15.18: note: CTABLES: 'QN1' is not a scale variable.
240 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
243 ctables.sps:15.32: error: CTABLES: Syntax error at `@:>@': expecting `@<:@'.
245 ctables.sps:16.21-16.24: error: CTABLES: Summary function MEAN applies only to
247 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
250 ctables.sps:16.16-16.18: note: CTABLES: 'QN1' is not a scale variable.
251 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
254 ctables.sps:16.40: error: CTABLES: Syntax error at `%': expecting `@:>@'.
256 ctables.sps:17.56: error: CTABLES: Syntax error at `x': expecting string.
258 ctables.sps:18.50-18.51: error: CTABLES: Syntax error at `**': expecting THRU.
260 ctables.sps:19.55: error: CTABLES: Syntax error at `x': expecting number.
262 ctables.sps:20.54-20.55: error: CTABLES: Syntax error at `**': expecting number.
264 ctables.sps:21.56-21.57: error: CTABLES: Syntax error at `**': expecting string.
266 ctables.sps:22.48-22.49: error: CTABLES: Syntax error at `**': expecting
269 ctables.sps:23.47-23.48: error: CTABLES: Unknown postcompute &x.
270 23 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&x].
273 ctables.sps:24.61-24.63: error: CTABLES: Syntax error at `101': Expected number
274 between 0 and 100 for PTILE.
276 ctables.sps:25.58: error: CTABLES: Syntax error at end of command: expecting
279 ctables.sps:26.54: error: CTABLES: Syntax error at end of command: expecting
282 ctables.sps:27.54-27.55: error: CTABLES: Syntax error at `**': expecting INCLUDE
285 ctables.sps:28.52-28.53: error: CTABLES: Syntax error at `**': expecting YES or
288 ctables.sps:29.52-29.53: error: CTABLES: Syntax error at `**': expecting string.
290 ctables.sps:30.55-30.56: error: CTABLES: Syntax error at `**': expecting BEFORE
293 ctables.sps:31.52-31.53: error: CTABLES: Syntax error at `**': expecting INCLUDE
296 ctables.sps:32.46-32.47: error: CTABLES: Syntax error at `**': expecting ORDER,
297 KEY, MISSING, TOTAL, LABEL, POSITION, or EMPTY.
299 ctables.sps:33.54-33.55: error: CTABLES: Syntax error at `**': expecting TOTAL,
300 LABEL, POSITION, or EMPTY.
302 ctables.sps:34.36: error: CTABLES: Syntax error at `0': Expected positive
303 integer for SUBTOTAL.
305 ctables.sps:35.37-35.38: error: CTABLES: Syntax error at `**': expecting `@:>@'.
307 ctables.sps:36.31-36.32: error: CTABLES: Syntax error at `**': expecting THRU.
309 ctables.sps:37.36-37.37: error: CTABLES: Syntax error at `**': expecting number.
311 ctables.sps:38.35-38.36: error: CTABLES: Syntax error at `**': expecting number.
313 ctables.sps:39.29-39.30: error: CTABLES: Syntax error at `**': expecting `@:>@'.
315 ctables.sps:40.29: error: CTABLES: Syntax error at `x': expecting `@:}@'.
317 ctables.sps:41.19-41.20: error: CTABLES: Syntax error at `**': expecting &.
319 ctables.sps:42.20: error: CTABLES: Syntax error at `1': expecting identifier.
321 ctables.sps:43.21-43.22: error: CTABLES: Syntax error at `**': expecting `='.
323 ctables.sps:44.22-44.23: error: CTABLES: Syntax error at `**': expecting EXPR.
325 ctables.sps:45.26-45.27: error: CTABLES: Syntax error at `**': expecting `('.
327 ctables.sps:46.28: error: CTABLES: Syntax error at `x': expecting `)'.
329 ctables.sps:47.31-47.49: warning: CTABLES: New definition of &k will override
330 the previous definition.
331 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
332 | ^~~~~~~~~~~~~~~~~~~
334 ctables.sps:47.10-47.28: note: CTABLES: This is the previous definition.
335 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
336 | ^~~~~~~~~~~~~~~~~~~
338 ctables.sps:47.50: error: CTABLES: Syntax error at end of command: expecting
341 ctables.sps:48.53-48.64: error: CTABLES: Syntax error at `NOTAFUNCTION':
342 Expecting summary function name.
344 ctables.sps:49.59-49.60: error: CTABLES: Syntax error at `**': Expected number
345 between 0 and 100 for PTILE.
347 ctables.sps:50.52-50.53: error: CTABLES: Syntax error at `**': expecting string.
349 ctables.sps:51.61-51.62: error: CTABLES: Syntax error at `**': expecting YES or
352 ctables.sps:52.46-52.47: error: CTABLES: Syntax error at `**': expecting LABEL,
353 FORMAT, or HIDESOURCECATS.
355 ctables.sps:53.23-53.24: error: CTABLES: Syntax error at `**': expecting string.
357 ctables.sps:54.25-54.26: error: CTABLES: Syntax error at `**': expecting string.
359 ctables.sps:55.17-55.18: error: CTABLES: Syntax error at `**': expecting
360 MINCOLWIDTH, MAXCOLWIDTH, UNITS, EMPTY, or MISSING.
362 ctables.sps:56: error: CTABLES: MINCOLWIDTH must not be greater than
365 ctables.sps:57.18-57.19: error: CTABLES: Syntax error at `**': expecting
368 ctables.sps:58: error: CTABLES: NOTAVAR is not a variable name.
370 ctables.sps:59.32-59.33: error: CTABLES: Syntax error at `**': expecting
373 ctables.sps:60.40-60.41: error: CTABLES: Syntax error at `**': expecting
374 DEFAULT, NAME, LABEL, BOTH, or NONE.
376 ctables.sps:61.17-61.18: error: CTABLES: Syntax error at `**': expecting
379 ctables.sps:62.33-62.34: error: CTABLES: Syntax error at `**': expecting YES or
382 ctables.sps:63.19-63.20: error: CTABLES: Syntax error at `**': expecting
383 VARIABLE or LISTWISE.
385 ctables.sps:64.17-64.18: error: CTABLES: Syntax error at `**': expecting
388 ctables.sps:65: error: CTABLES: NOTAVAR is not a variable name.
390 ctables.sps:66.32: error: CTABLES: Syntax error at `1': Expected integer 2 or
391 greater for HIDESMALLCOUNTS COUNT.
393 ctables.sps:67.10-67.13: error: CTABLES: Syntax error at `QUUX': expecting
394 FORMAT, VLABELS, MRSETS, SMISSING, PCOMPUTE, PPROPERTIES, WEIGHT,
395 HIDESMALLCOUNTS, or TABLE.
397 ctables.sps:68.33: error: CTABLES: Syntax error at end of command: expecting
400 ctables.sps:69.19-69.20: error: CTABLES: Syntax error at `**': expecting `/'.
402 ctables.sps:70.38-70.39: error: CTABLES: Syntax error at `**': expecting COLUMN,
405 ctables.sps:71.37-71.38: error: CTABLES: Syntax error at `**': expecting YES or
408 ctables.sps:72.29-72.30: error: CTABLES: Syntax error at `**': expecting
411 ctables.sps:73.39-73.40: error: CTABLES: Syntax error at `**': expecting
414 ctables.sps:74.39-74.40: error: CTABLES: Syntax error at `**': expecting
417 ctables.sps:75.29-75.30: error: CTABLES: Syntax error at `**': expecting AUTO,
418 ROWLABELS, or COLLABELS.
420 ctables.sps:76.30-76.31: error: CTABLES: Syntax error at `**': expecting
423 ctables.sps:77.38-77.40: error: CTABLES: Syntax error at `101': Expected number
424 in @<:@0,100@:}@ for CILEVEL.
426 ctables.sps:78.28-78.29: error: CTABLES: Syntax error at `**': expecting
427 CAPTION, CORNER, or TITLE.
429 ctables.sps:79.34-79.35: error: CTABLES: Syntax error at `**': expecting
432 ctables.sps:80.35-80.36: error: CTABLES: Syntax error at `**': Expected number
433 in @<:@0,1@:}@ for ALPHA.
435 ctables.sps:81.43-81.44: error: CTABLES: Syntax error at `**': expecting YES or
438 ctables.sps:82.40-82.41: error: CTABLES: Syntax error at `**': expecting
439 ALLVISIBLE or SUBTOTALS.
441 ctables.sps:83.29-83.30: error: CTABLES: Syntax error at `**': expecting TYPE,
442 ALPHA, INCLUDEMRSETS, or CATEGORIES.
444 ctables.sps:84.38-84.39: error: CTABLES: Syntax error at `**': expecting PROP or
447 ctables.sps:85.39-85.40: error: CTABLES: Syntax error at `**': Expected number
450 ctables.sps:86.39: error: CTABLES: Syntax error at `0': Expected number in (0,1)
453 ctables.sps:87.40-87.41: error: CTABLES: Syntax error at `**': expecting
454 BONFERRONI, BH, or NONE.
456 ctables.sps:88.47-88.48: error: CTABLES: Syntax error at `**': expecting YES or
459 ctables.sps:89.47-89.48: error: CTABLES: Syntax error at `**': expecting ALLCATS
462 ctables.sps:90.44-90.45: error: CTABLES: Syntax error at `**': expecting
463 ALLVISIBLE or SUBTOTALS.
465 ctables.sps:91.39-91.40: error: CTABLES: Syntax error at `**': expecting YES or
468 ctables.sps:92.39-92.40: error: CTABLES: Syntax error at `**': expecting APA or
471 ctables.sps:93.41-93.42: error: CTABLES: Syntax error at `**': expecting YES or
474 ctables.sps:94.33-94.34: error: CTABLES: Syntax error at `**': expecting TYPE,
475 ALPHA, ADJUST, INCLUDEMRSETS, MEANSVARIANCE, CATEGORIES, MERGE, STYLE, or
478 ctables.sps:95.22-95.23: error: CTABLES: Syntax error at `**': expecting TABLE,
479 SLABELS, CLABELS, CRITERIA, CATEGORIES, TITLES, SIGTEST, or COMPARETEST.
481 ctables.sps:96: error: CTABLES: ROWLABELS and COLLABELS may not both be
484 ctables.sps:97.16-97.26: error: CTABLES: Cannot nest scale variables.
485 97 | CTABLES /TABLE qn20 > qnd1.
488 ctables.sps:97.16-97.19: note: CTABLES: This is an outer scale variable.
489 97 | CTABLES /TABLE qn20 > qnd1.
492 ctables.sps:97.23-97.26: note: CTABLES: This is an inner scale variable.
493 97 | CTABLES /TABLE qn20 > qnd1.
496 ctables.sps:98.16-98.35: error: CTABLES: Summaries may only be requested for
497 categorical variables at the innermost nesting level.
498 98 | CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
499 | ^~~~~~~~~~~~~~~~~~~~
501 ctables.sps:98.16-98.18: note: CTABLES: This outer categorical variable has a
503 98 | CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
506 ctables.sps:100.52-100.56: error: CTABLES: Failed to parse category
507 specification as format DATETIME: Day (123) must be between 1 and 31..
508 100 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=datetime ['123'].
513 AT_SETUP([CTABLES parsing - more negative])
514 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
515 AT_DATA([ctables.sps],
517 CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
518 CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
519 CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
522 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['string'].
523 CTABLES /TABLE string /CATEGORIES VARIABLES=string [1].
525 CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1).
527 CTABLES /TABLE qnd1 /CLABELS ROWLABELS=OPPOSITE.
528 CTABLES /TABLE qn1 + string /CLABELS ROWLABELS=OPPOSITE.
529 CTABLES /TABLE qn1 + qnsa1 /CLABELS ROWLABELS=OPPOSITE.
530 CTABLES /TABLE qn105ba + qn105bb /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn105ba [1,2,3].
532 CTABLES /PCOMPUTE &x=EXPR(1**2**3).
533 CTABLES /PCOMPUTE &x=EXPR([**]).
534 CTABLES /PCOMPUTE &x=EXPR(**).
538 CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
540 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [1],
541 [[ctables.sps:2.76-2.78: error: CTABLES: Computed category &pc references a
542 category not included in the category list.
543 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
548 ctables.sps:2.28-2.35: note: CTABLES: This is the missing category.
549 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
553 ctables.sps:2.76-2.79: note: CTABLES: To fix the problem, add subtotals to the
554 list of categories here.
555 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
560 ctables.sps:3.73-3.75: error: CTABLES: Computed category &pc references a
561 category not included in the category list.
562 3 | CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1
567 ctables.sps:3.28-3.32: note: CTABLES: This is the missing category.
568 3 | CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1
572 ctables.sps:3: note: CTABLES: To fix the problem, add TOTAL=YES to the
573 variable's CATEGORIES specification.
575 ctables.sps:4.76-4.99: error: CTABLES: These categories include 2 instances of
576 SUBTOTAL or HSUBTOTAL, so references from computed categories must refer to
577 subtotals by position, e.g. SUBTOTAL[1].
578 4 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
579 VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
581 ^~~~~~~~~~~~~~~~~~~~~~~~
583 ctables.sps:4.28-4.35: note: CTABLES: This is the reference that lacks a
585 4 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
586 VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
589 ctables.sps:7.47-7.54: error: CTABLES: This category specification may be
590 applied only to string variables, but this subcommand tries to apply it to
591 numeric variable QN1.
592 7 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['string'].
595 ctables.sps:8.53: error: CTABLES: This category specification may be applied
596 only to numeric variables, but this subcommand tries to apply it to string
598 8 | CTABLES /TABLE string /CATEGORIES VARIABLES=string [1].
601 ctables.sps:10: error: CTABLES: ROWLABELS=OPPOSITE is not allowed with sorting
602 based on a summary function.
604 ctables.sps:12: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
605 moved to be categorical, but qnd1 is a scale variable.
607 ctables.sps:13: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
608 moved to have the same width, but QN1 has width 0 and string has width 8.
610 ctables.sps:14: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
611 moved to have the same value labels, but QN1 and QNSA1 have different value
614 ctables.sps:15: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
615 moved to have the same category specifications, but QN105BA and QN105BB have
616 different category specifications.
618 ctables.sps:17.27-17.33: warning: CTABLES: The exponentiation operator (`**') is
619 left-associative: `a**b**c' equals `(a**b)**c', not `a**(b**c)'. To disable
620 this warning, insert parentheses.
621 17 | CTABLES /PCOMPUTE &x=EXPR(1**2**3).
624 ctables.sps:17.35: error: CTABLES: Syntax error at end of command: expecting
627 ctables.sps:18.28-18.29: error: CTABLES: Syntax error at `**'.
629 ctables.sps:19.27-19.28: error: CTABLES: Syntax error at `**'.
631 ctables.sps:21.15: error: CTABLES: Syntax error at end of command: At least one
632 variable must be specified.
634 ctables.sps:23: error: CTABLES: Summaries may appear only on one axis.
636 ctables.sps:23.50-23.54: note: CTABLES: This variable on the layers axis has a
638 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
641 ctables.sps:23.16-23.20: note: CTABLES: This variable on the rows axis has a
643 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
646 ctables.sps:23.33-23.37: note: CTABLES: This variable on the columns axis has a
648 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
651 ctables.sps:23.33-23.37: note: CTABLES: This is a scale variable, so it always
652 has a summary even if the syntax does not explicitly specify one.
653 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
658 AT_SETUP([CTABLES one categorical variable])
659 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
660 AT_DATA([ctables.sps],
663 CTABLES /TABLE BY qn1.
664 CTABLES /TABLE BY BY qn1.
666 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
668 ╭────────────────────────────────────────────────────────────────────────┬─────╮
670 ├────────────────────────────────────────────────────────────────────────┼─────┤
671 │ 1. How often do you usually drive a car or other Every day │ 4667│
672 │motor vehicle? Several days a week │ 1274│
673 │ Once a week or less │ 361│
674 │ Only certain times a │ 130│
677 ╰────────────────────────────────────────────────────────────────────────┴─────╯
680 ╭──────────────────────────────────────────────────────────────────────────────╮
681 │ 1. How often do you usually drive a car or other motor vehicle? │
682 ├─────────┬──────────────────┬──────────────────┬────────────────────────┬─────┤
683 │ │ Several days a │ Once a week or │ Only certain times a │ │
684 │Every day│ week │ less │ year │Never│
685 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
686 │ Count │ Count │ Count │ Count │Count│
687 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
688 │ 4667│ 1274│ 361│ 130│ 540│
689 ╰─────────┴──────────────────┴──────────────────┴────────────────────────┴─────╯
701 AT_SETUP([CTABLES one string variable])
702 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
703 AT_DATA([ctables.sps],
706 MISSING VALUES licensed('DontKnow', 'Refused').
707 RECODE qnd7a(1='Yes')(2='No')(3='DontKnow')(4='Refused') INTO licensed.
708 CTABLES /TABLE licensed.
709 CTABLES /TABLE licensed [COUNT, TOTALS[COUNT, VALIDN]] /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
710 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['Yes', 'No'] TOTAL=YES.
711 * Notice that the string matching is case-sensitive.
712 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['Yes', 'no'] TOTAL=YES.
713 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['No' THRU 'yes'] TOTAL=YES.
715 /PCOMPUTE ¬yes=EXPR(['No']+['DontKnow']+['Refused'])
716 /PPROPERTIES ¬yes LABEL='Not Yes' HIDESOURCECATS=YES
718 /CATEGORIES VARIABLES=licensed ['Yes', ¬yes, 'No', 'DontKnow', 'Refused'].
720 /PCOMPUTE ¬yes=EXPR(['DontKnow' THRU 'No'] + ['Refused'])
721 /PPROPERTIES ¬yes LABEL='Not Yes' HIDESOURCECATS=YES
723 /CATEGORIES VARIABLES=licensed ['Yes', ¬yes, 'DontKnow' THRU 'No', 'Refused'].
725 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
735 ╭─────────────────┬─────┬───────╮
737 ├─────────────────┼─────┼───────┤
738 │licensed DontKnow│ 4│ │
742 │ Total │ 6999│ 6951│
743 ╰─────────────────┴─────┴───────╯
746 ╭──────────────┬─────╮
748 ├──────────────┼─────┤
749 │licensed Yes │ 6379│
752 ╰──────────────┴─────╯
755 ╭──────────────┬─────╮
757 ├──────────────┼─────┤
758 │licensed Yes │ 6379│
761 ╰──────────────┴─────╯
764 ╭────────────────┬─────╮
766 ├────────────────┼─────┤
771 ╰────────────────┴─────╯
774 ╭────────────────┬─────╮
776 ├────────────────┼─────┤
777 │licensed Yes │ 6379│
779 ╰────────────────┴─────╯
782 ╭────────────────┬─────╮
784 ├────────────────┼─────┤
785 │licensed Yes │ 6379│
787 ╰────────────────┴─────╯
791 AT_SETUP([CTABLES one scale variable])
792 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
793 AT_DATA([ctables.sps],
795 CTABLES /TABLE qnd1[COUNT, VALIDN, TOTALN, MEAN, STDDEV, MINIMUM, MAXIMUM].
796 CTABLES /TABLE BY qnd1.
797 CTABLES /TABLE BY BY qnd1.
799 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
801 ╭──────────────────────┬─────┬───────┬───────┬────┬────────────┬───────┬───────╮
802 │ │ │ │ │ │ Std │ │ │
803 │ │Count│Valid N│Total N│Mean│ Deviation │Minimum│Maximum│
804 ├──────────────────────┼─────┼───────┼───────┼────┼────────────┼───────┼───────┤
805 │D1. AGE: What is your │ 6999│ 6930│ 6999│ 48│ 19│ 16│ 86│
806 │age? │ │ │ │ │ │ │ │
807 ╰──────────────────────┴─────┴───────┴───────┴────┴────────────┴───────┴───────╯
810 ╭──────────────────────────╮
811 │D1. AGE: What is your age?│
812 ├──────────────────────────┤
814 ├──────────────────────────┤
816 ╰──────────────────────────╯
819 D1. AGE: What is your age?
828 AT_SETUP([CTABLES simple stacking])
829 AT_KEYWORDS([stack stacked])
830 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
831 AT_DATA([ctables.sps],
833 CTABLES /TABLE qn105ba + qn105bb + qn105bc + qn105bd BY qns3a [COLPCT PCT8.0].
835 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
837 ╭───────────────────────────────────────────────────────────────┬──────────────╮
844 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
845 │105b. How likely is it that drivers who have had Almost │ 10%│ 11%│
846 │too much to drink to drive safely will A. Get certain │ │ │
847 │stopped by the police? Very likely │ 21%│ 22%│
848 │ Somewhat │ 38%│ 42%│
850 │ Somewhat │ 21%│ 18%│
854 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
855 │105b. How likely is it that drivers who have had Almost │ 14%│ 18%│
856 │too much to drink to drive safely will B. Have an certain │ │ │
857 │accident? Very likely │ 36%│ 45%│
858 │ Somewhat │ 39%│ 32%│
864 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
865 │105b. How likely is it that drivers who have had Almost │ 18%│ 16%│
866 │too much to drink to drive safely will C. Be certain │ │ │
867 │convicted for drunk driving? Very likely │ 32%│ 28%│
868 │ Somewhat │ 27%│ 32%│
870 │ Somewhat │ 15%│ 15%│
874 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
875 │105b. How likely is it that drivers who have had Almost │ 16%│ 16%│
876 │too much to drink to drive safely will D. Be certain │ │ │
877 │arrested for drunk driving? Very likely │ 26%│ 27%│
878 │ Somewhat │ 32%│ 35%│
880 │ Somewhat │ 17%│ 15%│
884 ╰───────────────────────────────────────────────────────────────┴──────┴───────╯
888 AT_SETUP([CTABLES show or hide empty categories])
889 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
890 AT_DATA([ctables.sps],
892 IF (qn105ba = 2) qn105ba = 1.
893 IF (qns3a = 1) qns3a = 2.
894 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0].
895 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
896 /CATEGORIES VAR=qn105ba EMPTY=EXCLUDE.
897 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
898 /CATEGORIES VAR=qns3a EMPTY=EXCLUDE.
899 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
900 /CATEGORIES VAR=ALL EMPTY=EXCLUDE.
902 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
904 ╭──────────────────────────────────────────────────────────────┬───────────────╮
911 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
912 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
913 │too much to drink to drive safely will A. Get certain │ │ │
914 │stopped by the police? Very likely│ .│ 0%│
921 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
924 ╭──────────────────────────────────────────────────────────────┬───────────────╮
931 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
932 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
933 │too much to drink to drive safely will A. Get certain │ │ │
934 │stopped by the police? Somewhat │ .│ 40%│
940 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
943 ╭────────────────────────────────────────────────────────────────────┬─────────╮
950 ├────────────────────────────────────────────────────────────────────┼─────────┤
951 │105b. How likely is it that drivers who have had too Almost │ 32%│
952 │much to drink to drive safely will A. Get stopped by certain │ │
953 │the police? Very likely │ 0%│
960 ╰────────────────────────────────────────────────────────────────────┴─────────╯
963 ╭────────────────────────────────────────────────────────────────────┬─────────╮
970 ├────────────────────────────────────────────────────────────────────┼─────────┤
971 │105b. How likely is it that drivers who have had too Almost │ 32%│
972 │much to drink to drive safely will A. Get stopped by certain │ │
973 │the police? Somewhat │ 40%│
979 ╰────────────────────────────────────────────────────────────────────┴─────────╯
983 AT_SETUP([CTABLES sorting categories])
984 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
985 AT_DATA([ctables.sps],
987 IF (QND5A=6) QND5A=-1.
988 IF (QND5A=5) QND5A=-2.
989 CTABLES /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=VALUE ORDER=A
990 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=VALUE ORDER=D
991 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=LABEL ORDER=A
992 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=LABEL ORDER=D.
994 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
996 ╭────────────────────────────────────────────────────────────────────────┬─────╮
998 ├────────────────────────────────────────────────────────────────────────┼─────┤
999 │D5a. What would you say is your primary ethnic -2.00 │ 52│
1000 │background? -1.00 │ 78│
1004 │ South American │ 34│
1005 │ Central American │ 0│
1006 │ Puerto Rican, OR │ 0│
1007 │ Something else │ 68│
1008 │ Multiple - cannot choose│ 7│
1010 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1013 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1015 ├────────────────────────────────────────────────────────────────────────┼─────┤
1016 │D5a. What would you say is your primary ethnic Multiple - cannot choose│ 7│
1017 │background? one │ │
1018 │ Something else │ 68│
1019 │ Puerto Rican, OR │ 0│
1020 │ Central American │ 0│
1021 │ South American │ 34│
1027 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1030 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1032 ├────────────────────────────────────────────────────────────────────────┼─────┤
1033 │D5a. What would you say is your primary ethnic Central American │ 0│
1034 │background? Cuban │ 20│
1036 │ Multiple - cannot choose│ 7│
1038 │ Puerto Rican, OR │ 0│
1039 │ Something else │ 68│
1040 │ South American │ 34│
1044 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1047 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1049 ├────────────────────────────────────────────────────────────────────────┼─────┤
1050 │D5a. What would you say is your primary ethnic Spanish │ 48│
1051 │background? South American │ 34│
1052 │ Something else │ 68│
1053 │ Puerto Rican, OR │ 0│
1054 │ Multiple - cannot choose│ 7│
1058 │ Central American │ 0│
1061 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1065 AT_SETUP([CTABLES simple nesting])
1066 AT_KEYWORDS([nest nested])
1067 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1068 AT_DATA([ctables.sps],
1070 CTABLES /TABLE (qn105ba + qn105bb + qn105bc + qn105bd) > qns3a [COUNT, TABLEPCT PCT8.0]
1071 /CATEGORIES VARIABLES=qns3a TOTAL=YES.
1072 CTABLES /TABLE qns3a > (qn105ba + qn105bb + qn105bc + qn105bd) [TABLEPCT PCT8.0]
1073 /CATEGORIES VARIABLES=qns3a TOTAL=YES
1074 /CLABELS ROW=OPPOSITE.
1076 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1078 ╭─────────────────────────────────────────────────────────────────┬─────┬──────╮
1081 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1082 │105b. How likely is it that drivers Almost S3a. Male │ 297│ 4%│
1083 │who have had too much to drink to certain GENDER: Female│ 403│ 6%│
1084 │drive safely will A. Get stopped by Total │ 700│ 10%│
1085 │the police? ╶──────────────────────────┼─────┼──────┤
1086 │ Very S3a. Male │ 660│ 10%│
1087 │ likely GENDER: Female│ 842│ 12%│
1088 │ Total │ 1502│ 22%│
1089 │ ╶──────────────────────────┼─────┼──────┤
1090 │ Somewhat S3a. Male │ 1174│ 17%│
1091 │ likely GENDER: Female│ 1589│ 23%│
1092 │ Total │ 2763│ 40%│
1093 │ ╶──────────────────────────┼─────┼──────┤
1094 │ Somewhat S3a. Male │ 640│ 9%│
1095 │ unlikely GENDER: Female│ 667│ 10%│
1096 │ Total │ 1307│ 19%│
1097 │ ╶──────────────────────────┼─────┼──────┤
1098 │ Very S3a. Male │ 311│ 5%│
1099 │ unlikely GENDER: Female│ 298│ 4%│
1101 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1102 │105b. How likely is it that drivers Almost S3a. Male │ 429│ 6%│
1103 │who have had too much to drink to certain GENDER: Female│ 671│ 10%│
1104 │drive safely will B. Have an accident? Total │ 1100│ 16%│
1105 │ ╶──────────────────────────┼─────┼──────┤
1106 │ Very S3a. Male │ 1104│ 16%│
1107 │ likely GENDER: Female│ 1715│ 25%│
1108 │ Total │ 2819│ 41%│
1109 │ ╶──────────────────────────┼─────┼──────┤
1110 │ Somewhat S3a. Male │ 1203│ 17%│
1111 │ likely GENDER: Female│ 1214│ 18%│
1112 │ Total │ 2417│ 35%│
1113 │ ╶──────────────────────────┼─────┼──────┤
1114 │ Somewhat S3a. Male │ 262│ 4%│
1115 │ unlikely GENDER: Female│ 168│ 2%│
1117 │ ╶──────────────────────────┼─────┼──────┤
1118 │ Very S3a. Male │ 81│ 1%│
1119 │ unlikely GENDER: Female│ 59│ 1%│
1121 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1122 │105b. How likely is it that drivers Almost S3a. Male │ 539│ 8%│
1123 │who have had too much to drink to certain GENDER: Female│ 610│ 9%│
1124 │drive safely will C. Be convicted for Total │ 1149│ 17%│
1125 │drunk driving? ╶──────────────────────────┼─────┼──────┤
1126 │ Very S3a. Male │ 988│ 14%│
1127 │ likely GENDER: Female│ 1049│ 15%│
1128 │ Total │ 2037│ 30%│
1129 │ ╶──────────────────────────┼─────┼──────┤
1130 │ Somewhat S3a. Male │ 822│ 12%│
1131 │ likely GENDER: Female│ 1210│ 18%│
1132 │ Total │ 2032│ 30%│
1133 │ ╶──────────────────────────┼─────┼──────┤
1134 │ Somewhat S3a. Male │ 446│ 7%│
1135 │ unlikely GENDER: Female│ 548│ 8%│
1137 │ ╶──────────────────────────┼─────┼──────┤
1138 │ Very S3a. Male │ 268│ 4%│
1139 │ unlikely GENDER: Female│ 354│ 5%│
1141 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1142 │105b. How likely is it that drivers Almost S3a. Male │ 498│ 7%│
1143 │who have had too much to drink to certain GENDER: Female│ 603│ 9%│
1144 │drive safely will D. Be arrested for Total │ 1101│ 16%│
1145 │drunk driving? ╶──────────────────────────┼─────┼──────┤
1146 │ Very S3a. Male │ 805│ 12%│
1147 │ likely GENDER: Female│ 1029│ 15%│
1148 │ Total │ 1834│ 27%│
1149 │ ╶──────────────────────────┼─────┼──────┤
1150 │ Somewhat S3a. Male │ 975│ 14%│
1151 │ likely GENDER: Female│ 1332│ 19%│
1152 │ Total │ 2307│ 34%│
1153 │ ╶──────────────────────────┼─────┼──────┤
1154 │ Somewhat S3a. Male │ 535│ 8%│
1155 │ unlikely GENDER: Female│ 560│ 8%│
1156 │ Total │ 1095│ 16%│
1157 │ ╶──────────────────────────┼─────┼──────┤
1158 │ Very S3a. Male │ 270│ 4%│
1159 │ unlikely GENDER: Female│ 279│ 4%│
1161 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
1164 ╭─────────────────────────────────┬────────┬──────┬─────────┬─────────┬────────╮
1165 │ │ Almost │ Very │ Somewhat│ Somewhat│ Very │
1166 │ │ certain│likely│ likely │ unlikely│unlikely│
1167 │ ├────────┼──────┼─────────┼─────────┼────────┤
1169 │ │ Table %│ % │ Table % │ Table % │ Table %│
1170 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1171 │S3a. Male 105b. How likely │ 4%│ 10%│ 17%│ 9%│ 5%│
1172 │GENDER: is it that drivers│ │ │ │ │ │
1173 │ who have had too │ │ │ │ │ │
1174 │ much to drink to │ │ │ │ │ │
1175 │ drive safely will │ │ │ │ │ │
1176 │ A. Get stopped by │ │ │ │ │ │
1177 │ the police? │ │ │ │ │ │
1178 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1179 │ Female 105b. How likely │ 6%│ 12%│ 23%│ 10%│ 4%│
1180 │ is it that drivers│ │ │ │ │ │
1181 │ who have had too │ │ │ │ │ │
1182 │ much to drink to │ │ │ │ │ │
1183 │ drive safely will │ │ │ │ │ │
1184 │ A. Get stopped by │ │ │ │ │ │
1185 │ the police? │ │ │ │ │ │
1186 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1187 │ Total 105b. How likely │ 10%│ 22%│ 40%│ 19%│ 9%│
1188 │ is it that drivers│ │ │ │ │ │
1189 │ who have had too │ │ │ │ │ │
1190 │ much to drink to │ │ │ │ │ │
1191 │ drive safely will │ │ │ │ │ │
1192 │ A. Get stopped by │ │ │ │ │ │
1193 │ the police? │ │ │ │ │ │
1194 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1195 │S3a. Male 105b. How likely │ 6%│ 16%│ 17%│ 4%│ 1%│
1196 │GENDER: is it that drivers│ │ │ │ │ │
1197 │ who have had too │ │ │ │ │ │
1198 │ much to drink to │ │ │ │ │ │
1199 │ drive safely will │ │ │ │ │ │
1200 │ B. Have an │ │ │ │ │ │
1201 │ accident? │ │ │ │ │ │
1202 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1203 │ Female 105b. How likely │ 10%│ 25%│ 18%│ 2%│ 1%│
1204 │ is it that drivers│ │ │ │ │ │
1205 │ who have had too │ │ │ │ │ │
1206 │ much to drink to │ │ │ │ │ │
1207 │ drive safely will │ │ │ │ │ │
1208 │ B. Have an │ │ │ │ │ │
1209 │ accident? │ │ │ │ │ │
1210 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1211 │ Total 105b. How likely │ 16%│ 41%│ 35%│ 6%│ 2%│
1212 │ is it that drivers│ │ │ │ │ │
1213 │ who have had too │ │ │ │ │ │
1214 │ much to drink to │ │ │ │ │ │
1215 │ drive safely will │ │ │ │ │ │
1216 │ B. Have an │ │ │ │ │ │
1217 │ accident? │ │ │ │ │ │
1218 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1219 │S3a. Male 105b. How likely │ 8%│ 14%│ 12%│ 7%│ 4%│
1220 │GENDER: is it that drivers│ │ │ │ │ │
1221 │ who have had too │ │ │ │ │ │
1222 │ much to drink to │ │ │ │ │ │
1223 │ drive safely will │ │ │ │ │ │
1224 │ C. Be convicted │ │ │ │ │ │
1225 │ for drunk driving?│ │ │ │ │ │
1226 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1227 │ Female 105b. How likely │ 9%│ 15%│ 18%│ 8%│ 5%│
1228 │ is it that drivers│ │ │ │ │ │
1229 │ who have had too │ │ │ │ │ │
1230 │ much to drink to │ │ │ │ │ │
1231 │ drive safely will │ │ │ │ │ │
1232 │ C. Be convicted │ │ │ │ │ │
1233 │ for drunk driving?│ │ │ │ │ │
1234 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1235 │ Total 105b. How likely │ 17%│ 30%│ 30%│ 15%│ 9%│
1236 │ is it that drivers│ │ │ │ │ │
1237 │ who have had too │ │ │ │ │ │
1238 │ much to drink to │ │ │ │ │ │
1239 │ drive safely will │ │ │ │ │ │
1240 │ C. Be convicted │ │ │ │ │ │
1241 │ for drunk driving?│ │ │ │ │ │
1242 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1243 │S3a. Male 105b. How likely │ 7%│ 12%│ 14%│ 8%│ 4%│
1244 │GENDER: is it that drivers│ │ │ │ │ │
1245 │ who have had too │ │ │ │ │ │
1246 │ much to drink to │ │ │ │ │ │
1247 │ drive safely will │ │ │ │ │ │
1248 │ D. Be arrested for│ │ │ │ │ │
1249 │ drunk driving? │ │ │ │ │ │
1250 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1251 │ Female 105b. How likely │ 9%│ 15%│ 19%│ 8%│ 4%│
1252 │ is it that drivers│ │ │ │ │ │
1253 │ who have had too │ │ │ │ │ │
1254 │ much to drink to │ │ │ │ │ │
1255 │ drive safely will │ │ │ │ │ │
1256 │ D. Be arrested for│ │ │ │ │ │
1257 │ drunk driving? │ │ │ │ │ │
1258 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1259 │ Total 105b. How likely │ 16%│ 27%│ 34%│ 16%│ 8%│
1260 │ is it that drivers│ │ │ │ │ │
1261 │ who have had too │ │ │ │ │ │
1262 │ much to drink to │ │ │ │ │ │
1263 │ drive safely will │ │ │ │ │ │
1264 │ D. Be arrested for│ │ │ │ │ │
1265 │ drunk driving? │ │ │ │ │ │
1266 ╰─────────────────────────────────┴────────┴──────┴─────────┴─────────┴────────╯
1270 AT_SETUP([CTABLES nesting and scale variables])
1271 AT_KEYWORDS([nest nested])
1272 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1273 AT_DATA([ctables.sps],
1275 CTABLES /TABLE=qnd1 > qn1 BY qns3a.
1276 CTABLES /TABLE=qnd1 [MINIMUM, MAXIMUM, MEAN] > qns3a > (qn26 + qn27).
1277 CTABLES /TABLE=qnsa1 > qn105ba [COLPCT] BY qns1
1278 /CATEGORIES VAR=qnsa1 EMPTY=EXCLUDE.
1279 CTABLES /TABLE=AgeGroup > qn20 [MEAN F8.1, STDDEV F8.1].
1281 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1283 ╭─────────────────────────────────────────────────────────────────┬────────────╮
1289 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1290 │D1. AGE: What 1. How often do you usually drive Every day │ 46│ 46│
1291 │is your age? a car or other motor vehicle? Several days a │ 51│ 59│
1293 │ Once a week or │ 44│ 54│
1295 │ Only certain │ 34│ 41│
1296 │ times a year │ │ │
1298 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
1301 ╭─────────────────────────────────────────────────────────┬───────┬───────┬────╮
1302 │ │Minimum│Maximum│Mean│
1303 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
1304 │D1. AGE: S3a. Male 26. During the last 12 Yes│ 16│ 86│ 42│
1305 │What is GENDER: months, has there been a │ │ │ │
1306 │your time when you felt you │ │ │ │
1307 │age? should cut down on your No │ 16│ 86│ 46│
1309 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
1310 │ Female 26. During the last 12 Yes│ 16│ 86│ 43│
1311 │ months, has there been a │ │ │ │
1312 │ time when you felt you │ │ │ │
1313 │ should cut down on your No │ 16│ 86│ 48│
1315 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
1316 │D1. AGE: S3a. Male 27. During the last 12 Yes│ 16│ 86│ 38│
1317 │What is GENDER: months, has there been a │ │ │ │
1318 │your time when people criticized No │ 16│ 86│ 46│
1319 │age? your drinking? │ │ │ │
1320 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
1321 │ Female 27. During the last 12 Yes│ 17│ 69│ 37│
1322 │ months, has there been a │ │ │ │
1323 │ time when people criticized No │ 16│ 86│ 48│
1324 │ your drinking? │ │ │ │
1325 ╰─────────────────────────────────────────────────────────┴───────┴───────┴────╯
1328 ╭─────────────────────────────┬────────────────────────────────────────────────╮
1329 │ │S1. Including yourself, how many members of this│
1330 │ │ household are age 16 or older? │
1331 │ ├──────┬──────┬──────┬──────┬──────┬──────┬──────┤
1332 │ │ │ │ │ │ │ │ 6 or │
1333 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
1334 │ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
1335 │ │Column│Column│Column│Column│Column│Column│Column│
1336 │ │ % │ % │ % │ % │ % │ % │ % │
1337 ├─────────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
1338 │Sa1. RDD 105b. Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
1339 │SAMPLE How certain │ │ │ │ │ │ │ │
1340 │SOURCE: likely │ │ │ │ │ │ │ │
1341 │ is it Very │ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
1342 │ that likely │ │ │ │ │ │ │ │
1343 │ drivers │ │ │ │ │ │ │ │
1344 │ who have │ │ │ │ │ │ │ │
1345 │ had too Somewhat│ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
1346 │ much to likely │ │ │ │ │ │ │ │
1347 │ drink to │ │ │ │ │ │ │ │
1348 │ drive │ │ │ │ │ │ │ │
1349 │ safely Somewhat│ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
1350 │ will A. unlikely│ │ │ │ │ │ │ │
1351 │ Get │ │ │ │ │ │ │ │
1352 │ stopped Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
1353 │ by the unlikely│ │ │ │ │ │ │ │
1354 │ police? │ │ │ │ │ │ │ │
1355 ╰─────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
1358 ╭──────────────────────────────────────────────────────────────┬────┬──────────╮
1361 ├──────────────────────────────────────────────────────────────┼────┼──────────┤
1362 │Age 16 to 25 20. On how many of the thirty days in this │ 5.2│ 6.0│
1363 │group typical month did you have one or more │ │ │
1364 │ alcoholic beverages to drink? │ │ │
1365 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1366 │ 26 to 35 20. On how many of the thirty days in this │ 4.7│ 5.9│
1367 │ typical month did you have one or more │ │ │
1368 │ alcoholic beverages to drink? │ │ │
1369 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1370 │ 36 to 45 20. On how many of the thirty days in this │ 5.5│ 6.8│
1371 │ typical month did you have one or more │ │ │
1372 │ alcoholic beverages to drink? │ │ │
1373 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1374 │ 46 to 55 20. On how many of the thirty days in this │ 5.8│ 7.7│
1375 │ typical month did you have one or more │ │ │
1376 │ alcoholic beverages to drink? │ │ │
1377 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1378 │ 56 to 65 20. On how many of the thirty days in this │ 6.3│ 8.2│
1379 │ typical month did you have one or more │ │ │
1380 │ alcoholic beverages to drink? │ │ │
1381 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1382 │ 66 or 20. On how many of the thirty days in this │ 7.1│ 9.2│
1383 │ older typical month did you have one or more │ │ │
1384 │ alcoholic beverages to drink? │ │ │
1385 ╰──────────────────────────────────────────────────────────────┴────┴──────────╯
1390 AT_SETUP([CTABLES SLABELS])
1391 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1392 AT_DATA([ctables.sps],
1394 CTABLES /TABLE qn1 [COUNT COLPCT].
1395 CTABLES /TABLE qn1 [COUNT COLPCT]
1396 /SLABELS POSITION=ROW.
1397 CTABLES /TABLE qn1 [COUNT COLPCT]
1398 /SLABELS POSITION=ROW VISIBLE=NO.
1400 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1402 ╭────────────────────────────────────────────────────────────────┬─────┬───────╮
1405 ├────────────────────────────────────────────────────────────────┼─────┼───────┤
1406 │ 1. How often do you usually drive a car or Every day │ 4667│ 66.9%│
1407 │other motor vehicle? Several days a week│ 1274│ 18.3%│
1408 │ Once a week or less│ 361│ 5.2%│
1409 │ Only certain times │ 130│ 1.9%│
1411 │ Never │ 540│ 7.7%│
1412 ╰────────────────────────────────────────────────────────────────┴─────┴───────╯
1415 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1416 │ 1. How often do you usually drive a car or Every day Count │ 4667│
1417 │other motor vehicle? Column │66.9%│
1419 │ ╶───────────────────────────┼─────┤
1420 │ Several days a week Count │ 1274│
1423 │ ╶───────────────────────────┼─────┤
1424 │ Once a week or less Count │ 361│
1427 │ ╶───────────────────────────┼─────┤
1428 │ Only certain times Count │ 130│
1429 │ a year Column │ 1.9%│
1431 │ ╶───────────────────────────┼─────┤
1432 │ Never Count │ 540│
1435 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1438 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1439 │ 1. How often do you usually drive a car or other Every day │ 4667│
1440 │motor vehicle? │66.9%│
1441 │ Several days a week │ 1274│
1443 │ Once a week or less │ 361│
1445 │ Only certain times a │ 130│
1449 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1453 AT_SETUP([CTABLES simple totals])
1454 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1455 AT_DATA([ctables.sps],
1458 /CATEGORIES VARIABLES=qn17 TOTAL=YES LABEL='Number responding'.
1459 DESCRIPTIVES qn18/STATISTICS=MEAN.
1460 CTABLES /TABLE=region > qn18 [MEAN, COUNT, VALIDN, TOTALN]
1461 /CATEGORIES VARIABLES=region TOTAL=YES LABEL='All regions'.
1463 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1465 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1467 ├────────────────────────────────────────────────────────────────────────┼─────┤
1468 │17. When you drink alcoholic beverages, which ONE of OR, something else│ 2│
1469 │the following beverages do you drink MOST OFTEN? Beer │ 1073│
1472 │ Wine coolers │ 137│
1473 │ Hard liquor or │ 888│
1475 │ Flavored malt │ 83│
1477 │ Number responding │ 4221│
1478 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1480 Descriptive Statistics
1481 ╭────────────────────────────────────────────────────────────────────┬────┬────╮
1483 ├────────────────────────────────────────────────────────────────────┼────┼────┤
1484 │18. When you drink ANSWERFROM(QN17R1), about how many │4218│4.62│
1485 │ANSWERFROM(QN17R2) do you usually drink per sitting? │ │ │
1486 │Valid N (listwise) │6999│ │
1487 │Missing N (listwise) │2781│ │
1488 ╰────────────────────────────────────────────────────────────────────┴────┴────╯
1491 ╭──────────────────────────────────────────────────────┬────┬─────┬──────┬─────╮
1492 │ │ │ │ Valid│Total│
1493 │ │Mean│Count│ N │ N │
1494 ├──────────────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1495 │Region NE 18. When you drink ANSWERFROM(QN17R1),│4.36│ 1409│ 949│ 1409│
1496 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1497 │ you usually drink per sitting? │ │ │ │ │
1498 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1499 │ MW 18. When you drink ANSWERFROM(QN17R1),│4.67│ 1654│ 1027│ 1654│
1500 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1501 │ you usually drink per sitting? │ │ │ │ │
1502 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1503 │ S 18. When you drink ANSWERFROM(QN17R1),│4.71│ 2390│ 1287│ 2390│
1504 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1505 │ you usually drink per sitting? │ │ │ │ │
1506 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1507 │ W 18. When you drink ANSWERFROM(QN17R1),│4.69│ 1546│ 955│ 1546│
1508 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1509 │ you usually drink per sitting? │ │ │ │ │
1510 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1511 │ All 18. When you drink ANSWERFROM(QN17R1),│4.62│ 6999│ 4218│ 6999│
1512 │ regions about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1513 │ you usually drink per sitting? │ │ │ │ │
1514 ╰──────────────────────────────────────────────────────┴────┴─────┴──────┴─────╯
1518 AT_SETUP([CTABLES subtotals])
1519 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1520 AT_DATA([ctables.sps],
1522 CTABLES /TABLE=qn105ba BY qns1
1523 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
1524 CTABLES /TABLE=qn105ba [COLPCT] BY qns1
1525 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL].
1526 CTABLES /TABLE=qn105ba BY qns1
1527 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL]
1528 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
1530 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1532 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
1533 │ │ S1. Including yourself, how many members of this household │
1534 │ │ are age 16 or older? │
1535 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
1536 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
1537 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1538 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1539 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1540 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
1541 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
1542 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
1543 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
1544 │ likely │ │ │ │ │ │ │ │
1545 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
1546 │ unlikely │ │ │ │ │ │ │ │
1547 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
1548 │ unlikely │ │ │ │ │ │ │ │
1549 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
1552 ╭────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────╮
1553 │ │ S1. Including yourself, how many members of this household │
1554 │ │ are age 16 or older? │
1555 │ ├────────┬────────┬────────┬────────┬───────┬────────┬────────┤
1556 │ │ │ │ │ │ │ │ 6 or │
1557 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
1558 │ ├────────┼────────┼────────┼────────┼───────┼────────┼────────┤
1559 │ │ │ │ │ │ Column│ │ │
1560 │ │Column %│Column %│Column %│Column %│ % │Column %│Column %│
1561 ├────────────────────────────────────────────────────────┼────────┼────────┼────────┼────────┼───────┼────────┼────────┤
1562 │105b. How likely is it that drivers who have Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
1563 │had too much to drink to drive safely will certain │ │ │ │ │ │ │ │
1564 │A. Get stopped by the police? Very likely│ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
1565 │ Somewhat │ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
1566 │ likely │ │ │ │ │ │ │ │
1567 │ Subtotal │ │ 72.8%│ 68.6%│ 75.0%│ 74.0%│ 81.8%│ 81.0%│
1568 │ Somewhat │ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
1569 │ unlikely │ │ │ │ │ │ │ │
1570 │ Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
1571 │ unlikely │ │ │ │ │ │ │ │
1572 │ Subtotal │ │ 27.2%│ 31.4%│ 25.0%│ 26.0%│ 18.2%│ 19.0%│
1573 ╰────────────────────────────────────────────────────────┴────────┴────────┴────────┴────────┴───────┴────────┴────────╯
1576 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
1577 │ │ S1. Including yourself, how many members of this household │
1578 │ │ are age 16 or older? │
1579 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
1580 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
1581 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1582 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1583 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1584 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
1585 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
1586 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
1587 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
1588 │ likely │ │ │ │ │ │ │ │
1589 │ Subtotal │ 1121│ 2047│ 3168│ 375│ 142│ 45│ 562│
1590 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
1591 │ unlikely │ │ │ │ │ │ │ │
1592 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
1593 │ unlikely │ │ │ │ │ │ │ │
1594 │ Subtotal │ 419│ 937│ 1356│ 125│ 50│ 10│ 185│
1595 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
1599 AT_SETUP([CTABLES PCOMPUTE])
1600 AT_KEYWORDS([postcompute])
1601 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1602 AT_DATA([ctables.sps],
1605 /PCOMPUTE &x=EXPR([3] + [4])
1606 /PCOMPUTE &y=EXPR([4] + [5])
1607 /PPROPERTIES &x LABEL='3+4' FORMAT=COUNT F8.2
1608 /PPROPERTIES &y LABEL=')LABEL[5]+)LABEL[6]'
1609 /TABLE=qn105ba [COUNT, ROWPCT] BY qns1
1610 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, &x, &y, SUBTOTAL] TOTAL=YES
1612 * Adding HIDESOURCECATS=YES for one PPROPERTIES.
1614 /PCOMPUTE &x=EXPR([3] + [4])
1615 /PCOMPUTE &y=EXPR([4] + [5])
1616 /PPROPERTIES &x LABEL='3+4' FORMAT=COUNT F8.2
1617 /PPROPERTIES &y LABEL=')LABEL[5]+)LABEL[6]' HIDESOURCECATS=YES
1618 /TABLE=qn105ba [COUNT, ROWPCT] BY qns1
1619 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, &x, &y, SUBTOTAL] TOTAL=YES
1621 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1623 ╭───────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
1624 │ │ S1. Including yourself, how many members of this household are age 16 or older? │
1625 │ ├───────────┬───────────┬───────────┬───────────┬──────────┬──────────┬────────────┬──────────┬───────────┬────────────┤
1626 │ │ 1 │ 2 │ Subtotal │ 3 │ 4 │ 5 │ 3+4 │ 4+5 │ Subtotal │ Total │
1627 │ ├─────┬─────┼─────┬─────┼─────┬─────┼─────┬─────┼─────┬────┼─────┬────┼──────┬─────┼─────┬────┼─────┬─────┼─────┬──────┤
1628 │ │ │ │ │ │ │ │ │ │ │ Row│ │ Row│ │ │ │ Row│ │ │ │ │
1629 │ │Count│Row %│Count│Row %│Count│Row %│Count│Row %│Count│ % │Count│ % │ Count│Row %│Count│ % │Count│Row %│Count│ Row %│
1630 ├───────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼────┼─────┼────┼──────┼─────┼─────┼────┼─────┼─────┼─────┼──────┤
1631 │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%│
1632 │likely is certain │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1633 │it that │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1634 │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%│
1635 │who have likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1636 │had too │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1637 │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%│
1638 │drink to likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1639 │drive │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1640 │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%│
1641 │will A. unlikely│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1642 │Get │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1643 │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%│
1644 │the unlikely│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1645 │police? │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1646 ╰───────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴────┴─────┴────┴──────┴─────┴─────┴────┴─────┴─────┴─────┴──────╯
1649 ╭─────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────╮
1650 │ │ S1. Including yourself, how many members of this household are age 16 or older? │
1651 │ ├───────────┬───────────┬───────────┬───────────┬────────────┬──────────┬───────────┬────────────┤
1652 │ │ 1 │ 2 │ Subtotal │ 3 │ 3+4 │ 4+5 │ Subtotal │ Total │
1653 │ ├─────┬─────┼─────┬─────┼─────┬─────┼─────┬─────┼──────┬─────┼─────┬────┼─────┬─────┼─────┬──────┤
1654 │ │ │ │ │ │ │ │ │ │ │ │ │ Row│ │ │ │ │
1655 │ │Count│Row %│Count│Row %│Count│Row %│Count│Row %│ Count│Row %│Count│ % │Count│Row %│Count│ Row %│
1656 ├─────────────────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼──────┼─────┼─────┼────┼─────┼─────┼─────┼──────┤
1657 │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%│
1658 │drivers who have had too much certain │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1659 │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%│
1660 │A. Get stopped by the police? likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1661 │ 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%│
1662 │ likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1663 │ 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%│
1664 │ unlikely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1665 │ 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%│
1666 │ unlikely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1667 ╰─────────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴──────┴─────┴─────┴────┴─────┴─────┴─────┴──────╯
1671 AT_SETUP([CTABLES PCOMPUTE - OTHERNM and MISSING])
1672 AT_KEYWORDS([postcompute])
1673 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1674 AT_DATA([ctables.sps],
1677 /PCOMPUTE &x=EXPR(OTHERNM)
1678 /PCOMPUTE &y=EXPR(MISSING)
1679 /PPROPERTIES &x LABEL='Drivers'
1680 /PPROPERTIES &y LABEL='Missing Values 2'
1682 /CATEGORIES VARIABLES=qn1 [OTHERNM, 5, &x, SUBTOTAL='Valid Values', MISSING, SUBTOTAL='Missing Values', &y]
1684 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1686 ╭──────────────────────────────────────────────────────────────────────────────────────────┬────────────╮
1692 ├──────────────────────────────────────────────────────────────────────────────────────────┼─────┼──────┤
1693 │ 1. How often do you usually drive a car or other motor vehicle? Every day │ 2305│ 2362│
1694 │ Several days a week │ 440│ 834│
1695 │ Once a week or less │ 125│ 236│
1696 │ Only certain times a year│ 58│ 72│
1698 │ Drivers │ 2928│ 3504│
1699 │ Valid Values │ 3120│ 3852│
1700 │ Don't know │ 3│ 5│
1702 │ Missing Values │ 12│ 15│
1703 │ Missing Values 2 │ 12│ 15│
1704 ╰──────────────────────────────────────────────────────────────────────────────────────────┴─────┴──────╯
1708 AT_SETUP([CTABLES PCOMPUTE - THRU])
1709 AT_KEYWORDS([postcompute])
1710 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1711 AT_DATA([ctables.sps],
1714 /PCOMPUTE &x=EXPR([1 THRU 2])
1715 /PCOMPUTE &y=EXPR([3 THRU 4])
1716 /PCOMPUTE &z=EXPR([5] + MISSING)
1717 /PPROPERTIES &x LABEL='Frequent Drivers'
1718 /PPROPERTIES &y LABEL='Infrequent Drivers'
1719 /PPROPERTIES &z LABEL='Not Drivers or Missing'
1721 /CATEGORIES VARIABLES=qn1 [1 THRU 2, &x, 3 THRU 4, &y, SUBTOTAL='Drivers', 5, MISSING, &z]
1723 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1725 ╭──────────────────────────────────────────────────────────────────────────────────────────┬────────────╮
1731 ├──────────────────────────────────────────────────────────────────────────────────────────┼─────┼──────┤
1732 │ 1. How often do you usually drive a car or other motor vehicle? Every day │ 2305│ 2362│
1733 │ Several days a week │ 440│ 834│
1734 │ Frequent Drivers │ 2745│ 3196│
1735 │ Once a week or less │ 125│ 236│
1736 │ Only certain times a year│ 58│ 72│
1737 │ Infrequent Drivers │ 183│ 308│
1738 │ Drivers │ 2928│ 3504│
1740 │ Don't know │ 3│ 5│
1742 │ Not Drivers or Missing │ 204│ 363│
1743 ╰──────────────────────────────────────────────────────────────────────────────────────────┴─────┴──────╯
1747 dnl I'm not sure that this is the correct behavior (see
1748 dnl https://mail.gnu.org/archive/html/pspp-users/2022-07/msg00002.html)
1749 dnl but at least this test will notify us if the behavior changes.
1750 AT_SETUP([CTABLES intersecting PCOMPUTEs])
1751 AT_KEYWORDS([PCOMPUTE postcompute])
1752 AT_DATA([ctables.sps],
1753 [[DATA LIST LIST NOTABLE/x y z.
1756 VARIABLE LEVEL x y (NOMINAL).
1770 /PCOMPUTE &a = EXPR([1] + [2])
1771 /PCOMPUTE &b = EXPR([2] + [3])
1772 /PCOMPUTE &c = EXPR([4] * [5])
1773 /PCOMPUTE &d = EXPR([5] * [6])
1775 /CATEGORIES VARIABLES=x [1, &a, 2, &b, 3]
1776 /CATEGORIES VARIABLES=y [4, &c, 5, &d, 6].
1778 AT_CHECK([pspp ctables.sps -O box=unicode], [0],
1780 ╭───────────┬─────────────────────────────────────╮
1782 │ ├─────┬─────────┬─────┬─────────┬─────┤
1783 │ │ 4 │[4] * [5]│ 5 │[5] * [6]│ 6 │
1784 │ ├─────┼─────────┼─────┼─────────┼─────┤
1785 │ │Count│ Count │Count│ Count │Count│
1786 ├───────────┼─────┼─────────┼─────┼─────────┼─────┤
1787 │x 1 │ 5│ 10│ 2│ 18│ 9│
1788 │ [1] + [2]│ 7│ .│ 5│ .│ 13│
1789 │ 2 │ 2│ 6│ 3│ 12│ 4│
1790 │ [2] + [3]│ 3│ .│ 9│ .│ 5│
1791 │ 3 │ 1│ 6│ 6│ 6│ 1│
1792 ╰───────────┴─────┴─────────┴─────┴─────────┴─────╯
1796 AT_SETUP([CTABLES string and date and time])
1799 for gender in F M; do
1800 for month in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec; do
1801 for wkday in Sun Mon Tue Wed Thu Fri Sat Sun; do
1802 printf "$weight $gender $month $wkday\n"
1803 weight=$(expr \( $weight + 3 \) % 7 + 2)
1808 AT_DATA([ctables.sps],
1809 [[DATA LIST LIST NOTABLE FILE='ctables.txt'
1810 /w (F5.0) gender (A1) fmon (MONTH3) fday (WKDAY3).
1812 VARIABLE LEVEL w (SCALE).
1813 VARIABLE LEVEL gender fmon fday (NOMINAL).
1816 fmon 'Favorite month'
1817 fday 'Favorite day of the week'.
1818 VALUE LABELS /gender 'M' 'Male' 'F' 'Female'.
1820 /PCOMPUTE &q2 = EXPR(['APR' THRU 'June'])
1821 /PPROPERTIES &q2 LABEL='Q2'
1822 /PCOMPUTE &weekend = EXPR(['sun'] + ['Sat'])
1823 /PPROPERTIES &weekend LABEL='Weekend'
1824 /TABLE fmon BY gender > fday
1825 /CATEGORIES VARIABLES=fmon ['JAN', 'FEB', 'Mar', SUBTOTAL="Q1",
1827 'JUL' THRU 'sep', SUBTOTAL="Q3",
1828 OTHERNM, SUBTOTAL='Q4']
1829 /CATEGORIES VARIABLES=gender ['M', 'F']
1830 /CATEGORIES VARIABLE=fday ['Sun', 2 THRU 6, 'Sat', &weekend] TOTAL=YES
1831 /SLABELS VISIBLE=NO.
1833 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1835 ╭──────────────────┬───────────────────────────────────────────────────────────────────────────────────╮
1837 │ ├─────────────────────────────────────────┬─────────────────────────────────────────┤
1839 │ ├─────────────────────────────────────────┼─────────────────────────────────────────┤
1840 │ │ Favorite day of the week │ Favorite day of the week │
1841 │ ├───┬───┬───┬───┬───┬───┬───┬───────┬─────┼───┬───┬───┬───┬───┬───┬───┬───────┬─────┤
1842 │ │SUN│MON│TUE│WED│THU│FRI│SAT│Weekend│Total│SUN│MON│TUE│WED│THU│FRI│SAT│Weekend│Total│
1843 ├──────────────────┼───┼───┼───┼───┼───┼───┼───┼───────┼─────┼───┼───┼───┼───┼───┼───┼───┼───────┼─────┤
1844 │Favorite month JAN│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│ 9│ 6│ 4│ 2│ 7│ 5│ 3│ 12│ 36│
1845 │ FEB│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│
1846 │ MAR│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│
1847 │ Q1 │ 32│ 17│ 18│ 12│ 13│ 14│ 15│ │ │ 29│ 12│ 13│ 14│ 15│ 16│ 17│ │ │
1848 │ APR│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│
1849 │ MAY│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│
1850 │ JUN│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│
1851 │ Q2 │ 24│ 13│ 14│ 15│ 16│ 17│ 18│ .│ │ 28│ 15│ 16│ 17│ 18│ 12│ 13│ .│ │
1852 │ JUL│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│
1853 │ AUG│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│
1854 │ SEP│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│
1855 │ Q3 │ 54│ 29│ 31│ 33│ 28│ 30│ 32│ │ │ 62│ 33│ 28│ 30│ 32│ 27│ 29│ │ │
1856 │ OCT│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│
1857 │ NOV│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│
1858 │ DEC│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│
1859 │ Q4 │ 36│ 12│ 13│ 14│ 15│ 16│ 17│ │ │ 26│ 14│ 15│ 16│ 17│ 18│ 12│ │ │
1860 ╰──────────────────┴───┴───┴───┴───┴───┴───┴───┴───────┴─────┴───┴───┴───┴───┴───┴───┴───┴───────┴─────╯
1864 AT_SETUP([CTABLES CLABELS])
1865 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1866 AT_DATA([ctables.sps],
1868 CTABLES /TABLE AgeGroup BY qns3a.
1869 CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=OPPOSITE.
1870 CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=OPPOSITE.
1871 CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=LAYER.
1872 CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=LAYER.
1874 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
1876 ╭───────────────────────┬────────────╮
1882 ├───────────────────────┼─────┼──────┤
1883 │Age group 15 or younger│ 0│ 0│
1884 │ 16 to 25 │ 594│ 505│
1885 │ 26 to 35 │ 476│ 491│
1886 │ 36 to 45 │ 489│ 548│
1887 │ 46 to 55 │ 526│ 649│
1888 │ 56 to 65 │ 516│ 731│
1889 │ 66 or older │ 531│ 943│
1890 ╰───────────────────────┴─────┴──────╯
1893 ╭───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
1895 │ ├──────────────────────────────────────────────────────┬───────────────────────────────────────────────────────┤
1897 │ ├─────────┬───────┬──────┬──────┬──────┬───────┬───────┼──────────┬──────┬───────┬──────┬──────┬──────┬────────┤
1898 │ │ 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 │
1899 │ │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │
1900 │ ├─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
1901 │ │ Count │ Count │ Count│ Count│ Count│ Count │ Count │ Count │ Count│ Count │ Count│ Count│ Count│ Count │
1902 ├───────┼─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
1903 │Age │ 0│ 594│ 476│ 489│ 526│ 516│ 531│ 0│ 505│ 491│ 548│ 649│ 731│ 943│
1904 │group │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1905 ╰───────┴─────────┴───────┴──────┴──────┴──────┴───────┴───────┴──────────┴──────┴───────┴──────┴──────┴──────┴────────╯
1908 ╭──────────────────────────────┬────────────╮
1912 ├──────────────────────────────┼────────────┤
1913 │Age group 15 or younger Male │ 0│
1915 │ ╶────────────────────┼────────────┤
1916 │ 16 to 25 Male │ 594│
1918 │ ╶────────────────────┼────────────┤
1919 │ 26 to 35 Male │ 476│
1921 │ ╶────────────────────┼────────────┤
1922 │ 36 to 45 Male │ 489│
1924 │ ╶────────────────────┼────────────┤
1925 │ 46 to 55 Male │ 526│
1927 │ ╶────────────────────┼────────────┤
1928 │ 56 to 65 Male │ 516│
1930 │ ╶────────────────────┼────────────┤
1931 │ 66 or older Male │ 531│
1933 ╰──────────────────────────────┴────────────╯
1937 ╭─────────┬────────────╮
1943 ├─────────┼─────┼──────┤
1945 ╰─────────┴─────┴──────╯
1949 ╭─────────┬────────────╮
1955 ├─────────┼─────┼──────┤
1956 │Age group│ 594│ 505│
1957 ╰─────────┴─────┴──────╯
1961 ╭─────────┬────────────╮
1967 ├─────────┼─────┼──────┤
1968 │Age group│ 476│ 491│
1969 ╰─────────┴─────┴──────╯
1973 ╭─────────┬────────────╮
1979 ├─────────┼─────┼──────┤
1980 │Age group│ 489│ 548│
1981 ╰─────────┴─────┴──────╯
1985 ╭─────────┬────────────╮
1991 ├─────────┼─────┼──────┤
1992 │Age group│ 526│ 649│
1993 ╰─────────┴─────┴──────╯
1997 ╭─────────┬────────────╮
2003 ├─────────┼─────┼──────┤
2004 │Age group│ 516│ 731│
2005 ╰─────────┴─────┴──────╯
2009 ╭─────────┬────────────╮
2015 ├─────────┼─────┼──────┤
2016 │Age group│ 531│ 943│
2017 ╰─────────┴─────┴──────╯
2021 ╭───────────────────────┬────────────╮
2025 ├───────────────────────┼────────────┤
2026 │Age group 15 or younger│ 0│
2032 │ 66 or older │ 531│
2033 ╰───────────────────────┴────────────╯
2037 ╭───────────────────────┬────────────╮
2041 ├───────────────────────┼────────────┤
2042 │Age group 15 or younger│ 0│
2048 │ 66 or older │ 943│
2049 ╰───────────────────────┴────────────╯
2053 AT_SETUP([CTABLES missing values])
2054 AT_DATA([ctables.sps],
2055 [[DATA LIST LIST NOTABLE/x y.
2094 MISSING VALUES x (1, 2) y (2, 3).
2095 VARIABLE LEVEL ALL (NOMINAL).
2097 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN,
2098 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
2099 /CATEGORIES VARIABLES=ALL TOTAL=YES.
2100 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN,
2101 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
2102 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
2103 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2104 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2105 /CATEGORIES VARIABLES=ALL TOTAL=YES
2106 /SLABELS POSITION=ROW.
2107 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2108 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2109 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE
2110 /SLABELS POSITION=ROW.
2111 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2112 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2113 /CATEGORIES VARIABLES=x [1, 2, 3, 4] TOTAL=YES
2114 /CATEGORIES VARIABLES=y [1, 3, 4, 5] TOTAL=YES
2115 /SLABELS POSITION=ROW.
2117 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
2119 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
2120 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
2121 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
2122 │x 3.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2123 │ 4.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2124 │ 5.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2125 │ Total│ 18│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
2126 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
2127 dnl Note that Column Total N % doesn't add up to 100 because missing
2128 dnl values are included in the total but not shown as a category and this
2129 dnl is expected behavior.
2132 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
2133 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
2134 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
2135 │x 1.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
2136 │ 2.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
2137 │ 3.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2138 │ 4.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2139 │ 5.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2140 │ Total│ 30│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
2141 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
2142 dnl Note that Column Total N % doesn't add up to 100 because system-missing
2143 dnl values are included in the total but not shown as a category and this
2144 dnl is expected behavior.
2147 ╭────────────────────────┬───────────────────────────╮
2149 │ ├──────┬──────┬──────┬──────┤
2150 │ │ 1.00 │ 4.00 │ 5.00 │ Total│
2151 ├────────────────────────┼──────┼──────┼──────┼──────┤
2152 │x 3.00 Count │ 1│ 1│ 1│ 3│
2153 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2154 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2155 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ .│
2156 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2157 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2158 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2159 │ Valid N │ │ │ │ 3│
2160 │ Total N │ │ │ │ 6│
2161 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2162 │ 4.00 Count │ 1│ 1│ 1│ 3│
2163 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2164 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2165 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ .│
2166 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2167 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2168 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2169 │ Valid N │ │ │ │ 3│
2170 │ Total N │ │ │ │ 6│
2171 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2172 │ 5.00 Count │ 1│ 1│ 1│ 3│
2173 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2174 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2175 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ .│
2176 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2177 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2178 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2179 │ Valid N │ │ │ │ 3│
2180 │ Total N │ │ │ │ 6│
2181 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2182 │ Total Count │ 3│ 3│ 3│ 9│
2183 │ Column % │100.0%│100.0%│100.0%│ .│
2184 │ Column Valid N %│100.0%│100.0%│100.0%│ .│
2185 │ Column Total N %│100.0%│100.0%│100.0%│ .│
2186 │ Row % │ .│ .│ .│ .│
2187 │ Row Valid N % │ .│ .│ .│ .│
2188 │ Row Total N % │ .│ .│ .│ .│
2189 │ Valid N │ 3│ 3│ 3│ 9│
2190 │ Total N │ 6│ 6│ 6│ 36│
2191 ╰────────────────────────┴──────┴──────┴──────┴──────╯
2194 ╭────────────────────────┬─────────────────────────────────────────╮
2196 │ ├──────┬──────┬──────┬──────┬──────┬──────┤
2197 │ │ 1.00 │ 2.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
2198 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2199 │x 1.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2200 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2201 │ Column Valid N %│ .0%│ .│ .│ .0%│ .0%│ .│
2202 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
2203 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2204 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
2205 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2206 │ Valid N │ │ │ │ │ │ 0│
2207 │ Total N │ │ │ │ │ │ 6│
2208 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2209 │ 2.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2210 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2211 │ Column Valid N %│ .0%│ .│ .│ .0%│ .0%│ .│
2212 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
2213 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2214 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
2215 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2216 │ Valid N │ │ │ │ │ │ 0│
2217 │ Total N │ │ │ │ │ │ 6│
2218 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2219 │ 3.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2220 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2221 │ Column Valid N %│ 33.3%│ .│ .│ 33.3%│ 33.3%│ .│
2222 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
2223 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2224 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2225 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2226 │ Valid N │ │ │ │ │ │ 3│
2227 │ Total N │ │ │ │ │ │ 6│
2228 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2229 │ 4.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2230 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2231 │ Column Valid N %│ 33.3%│ .│ .│ 33.3%│ 33.3%│ .│
2232 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
2233 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2234 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2235 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2236 │ Valid N │ │ │ │ │ │ 3│
2237 │ Total N │ │ │ │ │ │ 6│
2238 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2239 │ 5.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2240 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2241 │ Column Valid N %│ 33.3%│ .│ .│ 33.3%│ 33.3%│ .│
2242 │ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
2243 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2244 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2245 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2246 │ Valid N │ │ │ │ │ │ 3│
2247 │ Total N │ │ │ │ │ │ 6│
2248 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2249 │ Total Count │ 5│ 5│ 5│ 5│ 5│ 25│
2250 │ Column % │100.0%│100.0%│100.0%│100.0%│100.0%│ .│
2251 │ Column Valid N %│100.0%│ .│ .│100.0%│100.0%│ .│
2252 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│100.0%│ .│
2253 │ Row % │ .│ .│ .│ .│ .│ .│
2254 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
2255 │ Row Total N % │ .│ .│ .│ .│ .│ .│
2256 │ Valid N │ 3│ 0│ 0│ 3│ 3│ 9│
2257 │ Total N │ 6│ 6│ 6│ 6│ 6│ 36│
2258 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────╯
2261 ╭────────────────────────┬──────────────────────────────────╮
2263 │ ├──────┬──────┬──────┬──────┬──────┤
2264 │ │ 1.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
2265 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┤
2266 │x 1.00 Count │ 1│ 1│ 1│ 1│ 4│
2267 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2268 │ Column Valid N %│ .0%│ .│ .0%│ .0%│ .│
2269 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2270 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2271 │ Row Valid N % │ .│ .│ .│ .│ .│
2272 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2273 │ Valid N │ │ │ │ │ 0│
2274 │ Total N │ │ │ │ │ 6│
2275 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2276 │ 2.00 Count │ 1│ 1│ 1│ 1│ 4│
2277 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2278 │ Column Valid N %│ .0%│ .│ .0%│ .0%│ .│
2279 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2280 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2281 │ Row Valid N % │ .│ .│ .│ .│ .│
2282 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2283 │ Valid N │ │ │ │ │ 0│
2284 │ Total N │ │ │ │ │ 6│
2285 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2286 │ 3.00 Count │ 1│ 1│ 1│ 1│ 4│
2287 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2288 │ Column Valid N %│ 50.0%│ .│ 50.0%│ 50.0%│ .│
2289 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2290 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2291 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2292 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2293 │ Valid N │ │ │ │ │ 3│
2294 │ Total N │ │ │ │ │ 6│
2295 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2296 │ 4.00 Count │ 1│ 1│ 1│ 1│ 4│
2297 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2298 │ Column Valid N %│ 50.0%│ .│ 50.0%│ 50.0%│ .│
2299 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2300 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2301 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2302 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2303 │ Valid N │ │ │ │ │ 3│
2304 │ Total N │ │ │ │ │ 6│
2305 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2306 │ Total Count │ 4│ 4│ 4│ 4│ 16│
2307 │ Column % │100.0%│100.0%│100.0%│100.0%│ .│
2308 │ Column Valid N %│100.0%│ .│100.0%│100.0%│ .│
2309 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│ .│
2310 │ Row % │ .│ .│ .│ .│ .│
2311 │ Row Valid N % │ .│ .│ .│ .│ .│
2312 │ Row Total N % │ .│ .│ .│ .│ .│
2313 │ Valid N │ 2│ 0│ 2│ 2│ 6│
2314 │ Total N │ 5│ 5│ 5│ 5│ 30│
2315 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────╯
2319 AT_SETUP([CTABLES SMISSING=LISTWISE])
2320 AT_KEYWORDS([SMISSING LISTWISE])
2321 AT_DATA([ctables.sps],
2322 [[DATA LIST LIST NOTABLE/x y z.
2330 VARIABLE LEVEL x (NOMINAL).
2332 CTABLES /TABLE (y + z) > x.
2333 CTABLES /SMISSING LISTWISE /TABLE (y + z) > x.
2335 * The following doesn't come out as listwise because the tables are
2336 separate, not linked by an > operator.
2337 CTABLES /SMISSING LISTWISE /TABLE (y > x) + (z > x).
2339 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
2369 AT_SETUP([CTABLES VLABELS - variables on different axes])
2370 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2371 AT_DATA([ctables.sps],
2373 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=DEFAULT /TABLE qnd5a BY qns3a.
2374 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NAME /TABLE qnd5a BY qns3a.
2375 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=LABEL /TABLE qnd5a BY qns3a.
2376 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=BOTH /TABLE qnd5a BY qns3a.
2377 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a BY qns3a.
2379 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2381 ╭────────────────────────────────────────────────────────────────┬────────────╮
2387 ├────────────────────────────────────────────────────────────────┼─────┼──────┤
2388 │D5a. What would you say is your primary Cuban │ 13│ 7│
2389 │ethnic background? Mexican │ 175│ 136│
2391 │ South American │ 21│ 13│
2392 │ Central American │ 27│ 25│
2393 │ Puerto Rican, OR │ 37│ 41│
2394 │ Something else │ 35│ 33│
2395 │ Multiple - cannot │ 2│ 5│
2397 ╰────────────────────────────────────────────────────────────────┴─────┴──────╯
2400 ╭──────────────────────────────────┬────────────╮
2406 ├──────────────────────────────────┼─────┼──────┤
2407 │QND5A Cuban │ 13│ 7│
2408 │ Mexican │ 175│ 136│
2410 │ South American │ 21│ 13│
2411 │ Central American │ 27│ 25│
2412 │ Puerto Rican, OR │ 37│ 41│
2413 │ Something else │ 35│ 33│
2414 │ Multiple - cannot choose one│ 2│ 5│
2415 ╰──────────────────────────────────┴─────┴──────╯
2418 ╭────────────────────────────────────────────────────────────────┬────────────╮
2424 ├────────────────────────────────────────────────────────────────┼─────┼──────┤
2425 │D5a. What would you say is your primary Cuban │ 13│ 7│
2426 │ethnic background? Mexican │ 175│ 136│
2428 │ South American │ 21│ 13│
2429 │ Central American │ 27│ 25│
2430 │ Puerto Rican, OR │ 37│ 41│
2431 │ Something else │ 35│ 33│
2432 │ Multiple - cannot │ 2│ 5│
2434 ╰────────────────────────────────────────────────────────────────┴─────┴──────╯
2437 ╭────────────────────────────────────────────────────────────┬────────────────╮
2440 │ ├───────┬────────┤
2442 │ ├───────┼────────┤
2444 ├────────────────────────────────────────────────────────────┼───────┼────────┤
2445 │QND5A D5a. What would you say is your Cuban │ 13│ 7│
2446 │primary ethnic background? Mexican │ 175│ 136│
2448 │ South American │ 21│ 13│
2449 │ Central American │ 27│ 25│
2450 │ Puerto Rican, OR │ 37│ 41│
2451 │ Something else │ 35│ 33│
2452 │ Multiple - cannot │ 2│ 5│
2454 ╰────────────────────────────────────────────────────────────┴───────┴────────╯
2457 ╭────────────────────────────┬─────┬──────╮
2461 ├────────────────────────────┼─────┼──────┤
2463 │Mexican │ 175│ 136│
2465 │South American │ 21│ 13│
2466 │Central American │ 27│ 25│
2467 │Puerto Rican, OR │ 37│ 41│
2468 │Something else │ 35│ 33│
2469 │Multiple - cannot choose one│ 2│ 5│
2470 ╰────────────────────────────┴─────┴──────╯
2474 AT_SETUP([CTABLES VLABELS - stacked variables])
2475 AT_KEYWORDS([stack stacking])
2476 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2477 AT_DATA([ctables.sps],
2479 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NAME /TABLE qnd5a + qns3a.
2480 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NAME /TABLE qnd5a + qns3a.
2481 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NONE /TABLE qnd5a + qns3a.
2482 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NONE /TABLE qnd5a + qns3a.
2483 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a + qns3a.
2485 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2487 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2489 ├───────────────────────────────────────────────────────────────────────┼─────┤
2490 │D5a. What would you say is your primary ethnic Cuban │ 20│
2491 │background? Mexican │ 311│
2493 │ South American │ 34│
2494 │ Central American │ 52│
2495 │ Puerto Rican, OR │ 78│
2496 │ Something else │ 68│
2497 │ Multiple - cannot │ 7│
2499 ├───────────────────────────────────────────────────────────────────────┼─────┤
2502 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2505 ╭─────────────────────────────────────────┬─────╮
2507 ├─────────────────────────────────────────┼─────┤
2511 │ South American │ 34│
2512 │ Central American │ 52│
2513 │ Puerto Rican, OR │ 78│
2514 │ Something else │ 68│
2515 │ Multiple - cannot choose one│ 7│
2516 ├─────────────────────────────────────────┼─────┤
2517 │S3a. GENDER: Male │ 3132│
2519 ╰─────────────────────────────────────────┴─────╯
2522 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2524 ├───────────────────────────────────────────────────────────────────────┼─────┤
2525 │D5a. What would you say is your primary ethnic Cuban │ 20│
2526 │background? Mexican │ 311│
2528 │ South American │ 34│
2529 │ Central American │ 52│
2530 │ Puerto Rican, OR │ 78│
2531 │ Something else │ 68│
2532 │ Multiple - cannot │ 7│
2534 ├───────────────────────────────────────────────────────────────────────┼─────┤
2536 ├───────────────────────────────────────────────────────────────────────┼─────┤
2538 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2541 ╭─────────────────────────────┬─────╮
2543 ├─────────────────────────────┼─────┤
2545 ├─────────────────────────────┼─────┤
2547 ├─────────────────────────────┼─────┤
2549 ├─────────────────────────────┼─────┤
2550 │South American │ 34│
2551 ├─────────────────────────────┼─────┤
2552 │Central American │ 52│
2553 ├─────────────────────────────┼─────┤
2554 │Puerto Rican, OR │ 78│
2555 ├─────────────────────────────┼─────┤
2556 │Something else │ 68│
2557 ├─────────────────────────────┼─────┤
2558 │Multiple - cannot choose one │ 7│
2559 ├─────────────────────────────┼─────┤
2560 │S3a. GENDER: Male │ 3132│
2562 ╰─────────────────────────────┴─────╯
2565 ╭────────────────────────────┬─────╮
2567 ├────────────────────────────┼─────┤
2571 │South American │ 34│
2572 │Central American │ 52│
2573 │Puerto Rican, OR │ 78│
2574 │Something else │ 68│
2575 │Multiple - cannot choose one│ 7│
2578 ╰────────────────────────────┴─────╯
2582 AT_SETUP([CTABLES VLABELS - nested variables])
2583 AT_KEYWORDS([nest nesting])
2584 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2585 AT_DATA([ctables.sps],
2587 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NAME /TABLE qnd5a > qns3a.
2588 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NAME /TABLE qnd5a > qns3a.
2589 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NONE /TABLE qnd5a > qns3a.
2590 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NONE /TABLE qnd5a > qns3a.
2591 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a > qns3a.
2593 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2595 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2597 ├───────────────────────────────────────────────────────────────────────┼─────┤
2598 │D5a. What would you say is your Cuban QNS3A Male │ 13│
2599 │primary ethnic background? Female│ 7│
2600 │ ╶─────────────────────────────────┼─────┤
2601 │ Mexican QNS3A Male │ 175│
2603 │ ╶─────────────────────────────────┼─────┤
2604 │ Spanish QNS3A Male │ 20│
2606 │ ╶─────────────────────────────────┼─────┤
2607 │ South American QNS3A Male │ 21│
2609 │ ╶─────────────────────────────────┼─────┤
2610 │ Central American QNS3A Male │ 27│
2612 │ ╶─────────────────────────────────┼─────┤
2613 │ Puerto Rican, OR QNS3A Male │ 37│
2615 │ ╶─────────────────────────────────┼─────┤
2616 │ Something else QNS3A Male │ 35│
2618 │ ╶─────────────────────────────────┼─────┤
2619 │ Multiple - cannot QNS3A Male │ 2│
2620 │ choose one Female│ 5│
2621 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2624 ╭──────────────────────────────────────────────────────┬─────╮
2626 ├──────────────────────────────────────────────────────┼─────┤
2627 │QND5A Cuban S3a. GENDER: Male │ 13│
2629 │ ╶────────────────────────────────────────────────┼─────┤
2630 │ Mexican S3a. GENDER: Male │ 175│
2632 │ ╶────────────────────────────────────────────────┼─────┤
2633 │ Spanish S3a. GENDER: Male │ 20│
2635 │ ╶────────────────────────────────────────────────┼─────┤
2636 │ South American S3a. GENDER: Male │ 21│
2638 │ ╶────────────────────────────────────────────────┼─────┤
2639 │ Central American S3a. GENDER: Male │ 27│
2641 │ ╶────────────────────────────────────────────────┼─────┤
2642 │ Puerto Rican, OR S3a. GENDER: Male │ 37│
2644 │ ╶────────────────────────────────────────────────┼─────┤
2645 │ Something else S3a. GENDER: Male │ 35│
2647 │ ╶────────────────────────────────────────────────┼─────┤
2648 │ Multiple - cannot choose one S3a. GENDER: Male │ 2│
2650 ╰──────────────────────────────────────────────────────┴─────╯
2653 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2655 ├───────────────────────────────────────────────────────────────────────┼─────┤
2656 │D5a. What would you say is your primary Cuban Male │ 13│
2657 │ethnic background? Female│ 7│
2658 │ ╶────────────────────────────┼─────┤
2659 │ Mexican Male │ 175│
2661 │ ╶────────────────────────────┼─────┤
2662 │ Spanish Male │ 20│
2664 │ ╶────────────────────────────┼─────┤
2665 │ South American Male │ 21│
2667 │ ╶────────────────────────────┼─────┤
2668 │ Central American Male │ 27│
2670 │ ╶────────────────────────────┼─────┤
2671 │ Puerto Rican, OR Male │ 37│
2673 │ ╶────────────────────────────┼─────┤
2674 │ Something else Male │ 35│
2676 │ ╶────────────────────────────┼─────┤
2677 │ Multiple - cannot Male │ 2│
2678 │ choose one Female│ 5│
2679 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2682 ╭────────────────────────────────────────────────┬─────╮
2684 ├────────────────────────────────────────────────┼─────┤
2685 │Cuban S3a. GENDER: Male │ 13│
2687 ├────────────────────────────────────────────────┼─────┤
2688 │Mexican S3a. GENDER: Male │ 175│
2690 ├────────────────────────────────────────────────┼─────┤
2691 │Spanish S3a. GENDER: Male │ 20│
2693 ├────────────────────────────────────────────────┼─────┤
2694 │South American S3a. GENDER: Male │ 21│
2696 ├────────────────────────────────────────────────┼─────┤
2697 │Central American S3a. GENDER: Male │ 27│
2699 ├────────────────────────────────────────────────┼─────┤
2700 │Puerto Rican, OR S3a. GENDER: Male │ 37│
2702 ├────────────────────────────────────────────────┼─────┤
2703 │Something else S3a. GENDER: Male │ 35│
2705 ├────────────────────────────────────────────────┼─────┤
2706 │Multiple - cannot choose one S3a. GENDER: Male │ 2│
2708 ╰────────────────────────────────────────────────┴─────╯
2711 ╭───────────────────────────────────┬─────╮
2713 ├───────────────────────────────────┼─────┤
2716 ├───────────────────────────────────┼─────┤
2717 │Mexican Male │ 175│
2719 ├───────────────────────────────────┼─────┤
2722 ├───────────────────────────────────┼─────┤
2723 │South American Male │ 21│
2725 ├───────────────────────────────────┼─────┤
2726 │Central American Male │ 27│
2728 ├───────────────────────────────────┼─────┤
2729 │Puerto Rican, OR Male │ 37│
2731 ├───────────────────────────────────┼─────┤
2732 │Something else Male │ 35│
2734 ├───────────────────────────────────┼─────┤
2735 │Multiple - cannot choose one Male │ 2│
2737 ╰───────────────────────────────────┴─────╯
2741 AT_SETUP([CTABLES FORMAT EMPTY])
2742 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2743 AT_DATA([ctables.sps],
2745 CTABLES /FORMAT EMPTY=ZERO /TABLE qnd5a BY qnd5.
2746 CTABLES /FORMAT EMPTY=BLANK /TABLE qnd5a BY qnd5.
2747 CTABLES /FORMAT EMPTY='n/a' /TABLE qnd5a BY qnd5.
2749 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2751 ╭─────────────────────────────────────────────┬───────────────────────────────╮
2752 │ │ D5. ETHNICITY: Are you of │
2753 │ │ Hispanic or Latino origin or │
2755 │ ├───────────────┬───────────────┤
2757 │ ├───────────────┼───────────────┤
2759 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
2760 │D5a. What would you say is Cuban │ 20│ 0│
2761 │your primary ethnic Mexican │ 311│ 0│
2762 │background? Spanish │ 48│ 0│
2763 │ South American │ 34│ 0│
2764 │ Central American│ 52│ 0│
2765 │ Puerto Rican, OR│ 78│ 0│
2766 │ Something else │ 68│ 0│
2767 │ Multiple - │ 7│ 0│
2768 │ cannot choose │ │ │
2770 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
2773 ╭─────────────────────────────────────────────┬───────────────────────────────╮
2774 │ │ D5. ETHNICITY: Are you of │
2775 │ │ Hispanic or Latino origin or │
2777 │ ├───────────────┬───────────────┤
2779 │ ├───────────────┼───────────────┤
2781 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
2782 │D5a. What would you say is Cuban │ 20│ │
2783 │your primary ethnic Mexican │ 311│ │
2784 │background? Spanish │ 48│ │
2785 │ South American │ 34│ │
2786 │ Central American│ 52│ │
2787 │ Puerto Rican, OR│ 78│ │
2788 │ Something else │ 68│ │
2790 │ cannot choose │ │ │
2792 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
2795 ╭─────────────────────────────────────────────┬───────────────────────────────╮
2796 │ │ D5. ETHNICITY: Are you of │
2797 │ │ Hispanic or Latino origin or │
2799 │ ├───────────────┬───────────────┤
2801 │ ├───────────────┼───────────────┤
2803 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
2804 │D5a. What would you say is Cuban │ 20│n/a │
2805 │your primary ethnic Mexican │ 311│n/a │
2806 │background? Spanish │ 48│n/a │
2807 │ South American │ 34│n/a │
2808 │ Central American│ 52│n/a │
2809 │ Puerto Rican, OR│ 78│n/a │
2810 │ Something else │ 68│n/a │
2811 │ Multiple - │ 7│n/a │
2812 │ cannot choose │ │ │
2814 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
2818 AT_SETUP([CTABLES FORMAT MISSING])
2819 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2820 AT_DATA([ctables.sps],
2822 CTABLES /FORMAT MISSING='(no data)' /TABLE qnd5a[COLPCT] BY qnd5.
2824 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2826 ╭─────────────────────────────────────────────┬───────────────────────────────╮
2827 │ │ D5. ETHNICITY: Are you of │
2828 │ │ Hispanic or Latino origin or │
2830 │ ├───────────────┬───────────────┤
2832 │ ├───────────────┼───────────────┤
2833 │ │ Column % │ Column % │
2834 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
2835 │D5a. What would you say is Cuban │ 3.2%│(no data) │
2836 │your primary ethnic Mexican │ 50.3%│(no data) │
2837 │background? Spanish │ 7.8%│(no data) │
2838 │ South American │ 5.5%│(no data) │
2839 │ Central American│ 8.4%│(no data) │
2840 │ Puerto Rican, OR│ 12.6%│(no data) │
2841 │ Something else │ 11.0%│(no data) │
2842 │ Multiple - │ 1.1%│(no data) │
2843 │ cannot choose │ │ │
2845 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
2849 AT_SETUP([CTABLES HIDESMALLCOUNTS])
2850 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2851 AT_DATA([ctables.sps],
2853 CTABLES /TABLE qn38[c][COUNT, COLPCT].
2854 CTABLES /HIDESMALLCOUNTS /TABLE qn38[c][COUNT, COLPCT].
2855 CTABLES /HIDESMALLCOUNTS COUNT=10 /TABLE qn38[c][COUNT, COLPCT].
2857 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2859 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
2861 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
2862 │38. How many drinks did you have on that Less than one│ 7│ .5%│
2863 │occasion? 1 │ 491│ 34.9%│
2883 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
2886 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
2888 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
2889 │38. How many drinks did you have on that Less than one│ 7│ .5%│
2890 │occasion? 1 │ 491│ 34.9%│
2910 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
2913 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
2915 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
2916 │38. How many drinks did you have on that Less than one│<10 │ .5%│
2917 │occasion? 1 │ 491│ 34.9%│
2937 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
2941 AT_SETUP([CTABLES FORMAT MINCOLWIDTH MAXCOLWIDTH])
2942 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2943 AT_DATA([ctables.sps],
2945 CTABLES /FORMAT MINCOLWIDTH=1 MAXCOLWIDTH=2 UNITS=INCHES /TABLE BY qns3a.
2947 AT_CHECK([pspp ctables.sps -o - -O box=unicode -o pspp.spv], [0], [dnl
2959 AT_CHECK([pspp-output get-table-look pspp.spv pspp.stt])
2960 AT_CHECK([sed 's/ /\n/g' pspp.stt | grep ColumnWidth | sort], [0], [dnl
2961 maximumColumnWidth="192"
2962 minimumColumnWidth="96"
2966 AT_SETUP([CTABLES special formats])
2967 AT_KEYWORDS([NEGPAREN NEQUAL PAREN PCTPAREN])
2968 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2969 AT_DATA([ctables.sps],
2971 COMPUTE x = qnd3 - 4.
2972 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].
2974 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2976 ╭─┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────╮
2977 │ │Minimum│Minimum│Minimum│Minimum│Maximum│Maximum│Maximum│Maximum│
2978 ├─┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
2979 │x│(3.0) │N=-3.0 │(-3.0) │(-3.0%)│8.0 │N=8.0 │(8.0) │(8.0%) │
2980 ╰─┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────╯
2984 AT_SETUP([CTABLES TITLES])
2985 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2986 AT_DATA([ctables.sps],
2989 /VLABELS VARIABLES=qn1 DISPLAY=NONE
2990 /TABLE ((qn1[c][COUNT])) BY qns3a[c] > qnd5
2991 /TITLES TITLE='How often do you drive?'
2992 CAPTION='Generated )TIME on )DATE'
2995 AT_CHECK([pspp ctables.sps -O box=unicode | sed 's/..:..:../HH:MM:SS/
2996 s&../../..&MM/DD/YY&'], [0], [dnl
2997 How often do you drive?
2998 ╭───────────────────────────────────┬─────────────────────────────────────────╮
3000 │ ├────────────────────┬────────────────────┤
3002 │ ├────────────────────┼────────────────────┤
3003 │ │ D5. ETHNICITY: Are │ D5. ETHNICITY: Are │
3004 │ │ you of Hispanic or │ you of Hispanic or │
3005 │ │ Latino origin or │ Latino origin or │
3006 │( ( 1. How often do you usually │ descent? │ descent? │
3007 │drive a car or other motor ├─────────┬──────────┼─────────┬──────────┤
3008 │vehicle?) ) BY S3a. GENDER: > D5. │ Yes │ No │ Yes │ No │
3009 │ETHNICITY: Are you of Hispanic or ├─────────┼──────────┼─────────┼──────────┤
3010 │Latino origin or descent? │ Count │ Count │ Count │ Count │
3011 ├───────────────────────────────────┼─────────┼──────────┼─────────┼──────────┤
3012 │Every day │ 218│ 2066│ 166│ 2175│
3013 │Several days a week │ 44│ 391│ 45│ 782│
3014 │Once a week or less │ 16│ 109│ 12│ 223│
3015 │Only certain times a year │ 15│ 41│ 11│ 61│
3016 │Never │ 39│ 150│ 56│ 278│
3017 ╰───────────────────────────────────┴─────────┴──────────┴─────────┴──────────╯
3018 Generated HH:MM:SS on MM/DD/YY
3022 AT_SETUP([CTABLES area definitions])
3023 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3024 AT_DATA([ctables.sps],
3027 /VLABELS VARIABLES=ALL DISPLAY=NAME
3028 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3029 /SLABELS POSITION=ROW
3030 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[ROWID, LAYERROWID]
3031 /SLABELS POSITION=ROW
3032 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[COLID, LAYERCOLID]
3033 /SLABELS POSITION=ROW.
3035 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=80], [0], [dnl
3038 ╭─────────────────────────────┬─────────────┬──────╮
3040 │ ├──────┬──────┼───┬──┤
3042 │ ├──────┼──────┤ │ │
3043 │ │ QN86 │ QN86 │ │ │
3044 │ ├───┬──┼───┬──┤ │ │
3045 │ │Yes│No│Yes│No│Yes│No│
3046 ├─────────────────────────────┼───┼──┼───┼──┼───┼──┤
3047 │QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3048 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3049 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│
3050 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3051 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3052 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3053 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│
3054 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┤
3055 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3056 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3057 │ Subtable ID│ 4│ 4│ 5│ 5│ 6│ 6│
3058 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3059 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3060 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3061 │ Subtable ID│ 4│ 4│ 5│ 5│ 6│ 6│
3062 ╰─────────────────────────────┴───┴──┴───┴──┴───┴──╯
3066 ╭─────────────────────────────┬─────────────┬──────╮
3068 │ ├──────┬──────┼───┬──┤
3070 │ ├──────┼──────┤ │ │
3071 │ │ QN86 │ QN86 │ │ │
3072 │ ├───┬──┼───┬──┤ │ │
3073 │ │Yes│No│Yes│No│Yes│No│
3074 ├─────────────────────────────┼───┼──┼───┼──┼───┼──┤
3075 │QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3076 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3077 │ Subtable ID│ 7│ 7│ 8│ 8│ 9│ 9│
3078 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3079 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3080 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3081 │ Subtable ID│ 7│ 7│ 8│ 8│ 9│ 9│
3082 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┤
3083 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3084 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3085 │ Subtable ID│ 10│10│ 11│11│ 12│12│
3086 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3087 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3088 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3089 │ Subtable ID│ 10│10│ 11│11│ 12│12│
3090 ╰─────────────────────────────┴───┴──┴───┴──┴───┴──╯
3094 ╭──────────────────────────────┬─────────────┬──────╮
3096 │ ├──────┬──────┼───┬──┤
3098 │ ├──────┼──────┤ │ │
3099 │ │ QN86 │ QN86 │ │ │
3100 │ ├───┬──┼───┬──┤ │ │
3101 │ │Yes│No│Yes│No│Yes│No│
3102 ├──────────────────────────────┼───┼──┼───┼──┼───┼──┤
3103 │QN61 Yes QN57 Yes Row ID │ 1│ 1│ 2│ 2│ 3│ 3│
3104 │ Layer Row ID│ 1│ 1│ 1│ 1│ 2│ 2│
3105 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3106 │ No Row ID │ 4│ 4│ 5│ 5│ 6│ 6│
3107 │ Layer Row ID│ 3│ 3│ 3│ 3│ 4│ 4│
3108 │ ╶─────────────────────────┼───┼──┼───┼──┼───┼──┤
3109 │ No QN57 Yes Row ID │ 7│ 7│ 8│ 8│ 9│ 9│
3110 │ Layer Row ID│ 5│ 5│ 5│ 5│ 6│ 6│
3111 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3112 │ No Row ID │ 10│10│ 11│11│ 12│12│
3113 │ Layer Row ID│ 7│ 7│ 7│ 7│ 8│ 8│
3114 ╰──────────────────────────────┴───┴──┴───┴──┴───┴──╯
3118 ╭──────────────────────────────┬─────────────┬──────╮
3120 │ ├──────┬──────┼───┬──┤
3122 │ ├──────┼──────┤ │ │
3123 │ │ QN86 │ QN86 │ │ │
3124 │ ├───┬──┼───┬──┤ │ │
3125 │ │Yes│No│Yes│No│Yes│No│
3126 ├──────────────────────────────┼───┼──┼───┼──┼───┼──┤
3127 │QN61 Yes QN57 Yes Row ID │ 13│13│ 14│14│ 15│15│
3128 │ Layer Row ID│ 9│ 9│ 9│ 9│ 10│10│
3129 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3130 │ No Row ID │ 16│16│ 17│17│ 18│18│
3131 │ Layer Row ID│ 11│11│ 11│11│ 12│12│
3132 │ ╶─────────────────────────┼───┼──┼───┼──┼───┼──┤
3133 │ No QN57 Yes Row ID │ 19│19│ 20│20│ 21│21│
3134 │ Layer Row ID│ 13│13│ 13│13│ 14│14│
3135 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3136 │ No Row ID │ 22│22│ 23│23│ 24│24│
3137 │ Layer Row ID│ 15│15│ 15│15│ 16│16│
3138 ╰──────────────────────────────┴───┴──┴───┴──┴───┴──╯
3142 ╭─────────────────────────────────┬─────────────┬──────╮
3144 │ ├──────┬──────┼───┬──┤
3146 │ ├──────┼──────┤ │ │
3147 │ │ QN86 │ QN86 │ │ │
3148 │ ├───┬──┼───┬──┤ │ │
3149 │ │Yes│No│Yes│No│Yes│No│
3150 ├─────────────────────────────────┼───┼──┼───┼──┼───┼──┤
3151 │QN61 Yes QN57 Yes Column ID │ 1│ 2│ 3│ 4│ 5│ 6│
3152 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3153 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3154 │ No Column ID │ 1│ 2│ 3│ 4│ 5│ 6│
3155 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3156 │ ╶────────────────────────────┼───┼──┼───┼──┼───┼──┤
3157 │ No QN57 Yes Column ID │ 7│ 8│ 9│10│ 11│12│
3158 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3159 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3160 │ No Column ID │ 7│ 8│ 9│10│ 11│12│
3161 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3162 ╰─────────────────────────────────┴───┴──┴───┴──┴───┴──╯
3166 ╭─────────────────────────────────┬─────────────┬──────╮
3168 │ ├──────┬──────┼───┬──┤
3170 │ ├──────┼──────┤ │ │
3171 │ │ QN86 │ QN86 │ │ │
3172 │ ├───┬──┼───┬──┤ │ │
3173 │ │Yes│No│Yes│No│Yes│No│
3174 ├─────────────────────────────────┼───┼──┼───┼──┼───┼──┤
3175 │QN61 Yes QN57 Yes Column ID │ 13│14│ 15│16│ 17│18│
3176 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3177 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3178 │ No Column ID │ 13│14│ 15│16│ 17│18│
3179 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3180 │ ╶────────────────────────────┼───┼──┼───┼──┼───┼──┤
3181 │ No QN57 Yes Column ID │ 19│20│ 21│22│ 23│24│
3182 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3183 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3184 │ No Column ID │ 19│20│ 21│22│ 23│24│
3185 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3186 ╰─────────────────────────────────┴───┴──┴───┴──┴───┴──╯
3190 AT_SETUP([CTABLES area definitions with CLABELS ROWLABELS=OPPOSITE])
3191 AT_KEYWORDS([ROWLABELS OPPOSITE])
3192 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3193 AT_DATA([ctables.sps],
3196 /VLABELS VARIABLES=ALL DISPLAY=NAME
3197 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3198 /SLABELS POSITION=ROW
3199 /CLABELS ROWLABELS=OPPOSITE
3200 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3201 /SLABELS POSITION=ROW
3202 /CLABELS ROWLABELS=OPPOSITE
3203 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3204 /SLABELS POSITION=ROW
3205 /CLABELS ROWLABELS=OPPOSITE.
3207 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3210 ╭──────────────────────────────────┬───────────────────────────────────────────────────────╮
3212 │ ├───────────────────────────┬───────────────────────────┤
3214 │ ├───────────────────────────┼───────────────────────────┤
3216 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3217 │ │ Yes │ No │ Yes │ No │
3218 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3219 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3220 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3221 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3222 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3223 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3224 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3225 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3226 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3227 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3228 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3229 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3230 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3231 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3232 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3233 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3234 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3235 │ Subtable ID│ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3236 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3237 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3238 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3239 │ Subtable ID│ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3240 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3244 ╭──────────────────────────────────┬───────────────────────────────────────────────────────╮
3246 │ ├───────────────────────────┬───────────────────────────┤
3248 │ ├───────────────────────────┼───────────────────────────┤
3250 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3251 │ │ Yes │ No │ Yes │ No │
3252 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3253 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3254 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3255 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3256 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3257 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3258 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3259 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3260 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3261 │ Subtable ID│ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3262 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3263 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3264 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3265 │ Subtable ID│ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3266 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3267 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3268 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3269 │ Subtable ID│ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3270 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3271 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3272 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3273 │ Subtable ID│ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3274 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3278 ╭───────────────────────────────────┬───────────────────────────────────────────────────────╮
3280 │ ├───────────────────────────┬───────────────────────────┤
3282 │ ├───────────────────────────┼───────────────────────────┤
3284 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3285 │ │ Yes │ No │ Yes │ No │
3286 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3287 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3288 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3289 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3290 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3291 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3292 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3293 │QN26 Yes QN61 Yes QN57 Row ID │ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3294 │ Layer Row ID│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3295 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3296 │ No QN57 Row ID │ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3297 │ Layer Row ID│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3298 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3299 │ No QN61 Yes QN57 Row ID │ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3300 │ Layer Row ID│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3301 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3302 │ No QN57 Row ID │ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3303 │ Layer Row ID│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3304 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3308 ╭───────────────────────────────────┬───────────────────────────────────────────────────────╮
3310 │ ├───────────────────────────┬───────────────────────────┤
3312 │ ├───────────────────────────┼───────────────────────────┤
3314 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3315 │ │ Yes │ No │ Yes │ No │
3316 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3317 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3318 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3319 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3320 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3321 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3322 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3323 │QN26 Yes QN61 Yes QN57 Row ID │ 33│33│ 34│34│ 35│35│ 36│36│ 37│37│ 38│38│ 39│39│ 40│40│
3324 │ Layer Row ID│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│
3325 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3326 │ No QN57 Row ID │ 41│41│ 42│42│ 43│43│ 44│44│ 45│45│ 46│46│ 47│47│ 48│48│
3327 │ Layer Row ID│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│
3328 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3329 │ No QN61 Yes QN57 Row ID │ 49│49│ 50│50│ 51│51│ 52│52│ 53│53│ 54│54│ 55│55│ 56│56│
3330 │ Layer Row ID│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│
3331 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3332 │ No QN57 Row ID │ 57│57│ 58│58│ 59│59│ 60│60│ 61│61│ 62│62│ 63│63│ 64│64│
3333 │ Layer Row ID│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│
3334 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3338 ╭──────────────────────────────────────┬───────────────────────────────────────────────────────╮
3340 │ ├───────────────────────────┬───────────────────────────┤
3342 │ ├───────────────────────────┼───────────────────────────┤
3344 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3345 │ │ Yes │ No │ Yes │ No │
3346 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3347 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3348 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3349 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3350 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3351 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3352 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3353 │QN26 Yes QN61 Yes QN57 Column ID │ 1│ 2│ 4│ 3│ 6│ 5│ 8│ 7│ 9│10│ 11│12│ 14│13│ 15│16│
3354 │ Layer Column ID│ 1│ 2│ 4│ 3│ 6│ 5│ 8│ 7│ 9│10│ 11│12│ 14│13│ 15│16│
3355 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3356 │ No QN57 Column ID │ 1│ 2│ 4│ 3│ 6│ 5│ 8│ 7│ 9│10│ 11│12│ 14│13│ 15│16│
3357 │ Layer Column ID│ 1│ 2│ 4│ 3│ 6│ 5│ 8│ 7│ 9│10│ 11│12│ 14│13│ 15│16│
3358 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3359 │ No QN61 Yes QN57 Column ID │ 18│17│ 19│20│ 22│21│ 23│24│ 25│26│ 27│28│ 29│30│ 32│31│
3360 │ Layer Column ID│ 1│ 2│ 4│ 3│ 6│ 5│ 8│ 7│ 9│10│ 11│12│ 14│13│ 15│16│
3361 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3362 │ No QN57 Column ID │ 18│17│ 19│20│ 22│21│ 23│24│ 25│26│ 27│28│ 29│30│ 32│31│
3363 │ Layer Column ID│ 1│ 2│ 4│ 3│ 6│ 5│ 8│ 7│ 9│10│ 11│12│ 14│13│ 15│16│
3364 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3368 ╭──────────────────────────────────────┬───────────────────────────────────────────────────────╮
3370 │ ├───────────────────────────┬───────────────────────────┤
3372 │ ├───────────────────────────┼───────────────────────────┤
3374 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3375 │ │ Yes │ No │ Yes │ No │
3376 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3377 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3378 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3379 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3380 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3381 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3382 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3383 │QN26 Yes QN61 Yes QN57 Column ID │ 33│34│ 36│35│ 37│38│ 39│40│ 42│41│ 44│43│ 45│46│ 47│48│
3384 │ Layer Column ID│ 17│18│ 20│19│ 21│22│ 23│24│ 26│25│ 28│27│ 29│30│ 31│32│
3385 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3386 │ No QN57 Column ID │ 33│34│ 36│35│ 37│38│ 39│40│ 42│41│ 44│43│ 45│46│ 47│48│
3387 │ Layer Column ID│ 17│18│ 20│19│ 21│22│ 23│24│ 26│25│ 28│27│ 29│30│ 31│32│
3388 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3389 │ No QN61 Yes QN57 Column ID │ 49│50│ 51│52│ 54│53│ 56│55│ 57│58│ 60│59│ 62│61│ 64│63│
3390 │ Layer Column ID│ 17│18│ 20│19│ 21│22│ 23│24│ 26│25│ 28│27│ 29│30│ 31│32│
3391 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3392 │ No QN57 Column ID │ 49│50│ 51│52│ 54│53│ 56│55│ 57│58│ 60│59│ 62│61│ 64│63│
3393 │ Layer Column ID│ 17│18│ 20│19│ 21│22│ 23│24│ 26│25│ 28│27│ 29│30│ 31│32│
3394 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3398 AT_SETUP([CTABLES area definitions with CLABELS COLLABELS=OPPOSITE])
3399 AT_KEYWORDS([COLLABELS OPPOSITE])
3400 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3401 AT_DATA([ctables.sps],
3404 /VLABELS VARIABLES=ALL DISPLAY=NAME
3405 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3406 /SLABELS POSITION=ROW
3407 /CLABELS COLLABELS=OPPOSITE
3408 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3409 /SLABELS POSITION=ROW
3410 /CLABELS COLLABELS=OPPOSITE
3411 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3412 /SLABELS POSITION=ROW
3413 /CLABELS COLLABELS=OPPOSITE.
3415 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3418 ╭──────────────────────────────────────────┬───────────────────╮
3420 │ ├─────────┬─────────┤
3422 │ ├─────────┼─────────┤
3424 │ ├────┬────┼────┬────┤
3425 │ │ Yes│ No │ Yes│ No │
3426 │ ├────┼────┼────┼────┤
3427 │ │QN86│QN86│QN86│QN86│
3428 ├──────────────────────────────────────────┼────┼────┼────┼────┤
3429 │QN26 Yes QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3430 │ Layer ID │ 1│ 1│ 1│ 1│
3431 │ Subtable ID│ 1│ 1│ 2│ 2│
3432 │ ╶───────────────┼────┼────┼────┼────┤
3433 │ No Table ID │ 1│ 1│ 1│ 1│
3434 │ Layer ID │ 1│ 1│ 1│ 1│
3435 │ Subtable ID│ 1│ 1│ 2│ 2│
3436 │ ╶───────────────────┼────┼────┼────┼────┤
3437 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3438 │ Layer ID │ 1│ 1│ 1│ 1│
3439 │ Subtable ID│ 3│ 3│ 4│ 4│
3440 │ ╶───────────────┼────┼────┼────┼────┤
3441 │ No Table ID │ 1│ 1│ 1│ 1│
3442 │ Layer ID │ 1│ 1│ 1│ 1│
3443 │ Subtable ID│ 3│ 3│ 4│ 4│
3444 │ ╶────────────────────────────┼────┼────┼────┼────┤
3445 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3446 │ Layer ID │ 1│ 1│ 1│ 1│
3447 │ Subtable ID│ 5│ 5│ 6│ 6│
3448 │ ╶───────────────┼────┼────┼────┼────┤
3449 │ No Table ID │ 1│ 1│ 1│ 1│
3450 │ Layer ID │ 1│ 1│ 1│ 1│
3451 │ Subtable ID│ 5│ 5│ 6│ 6│
3452 │ ╶───────────────────┼────┼────┼────┼────┤
3453 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3454 │ Layer ID │ 1│ 1│ 1│ 1│
3455 │ Subtable ID│ 7│ 7│ 8│ 8│
3456 │ ╶───────────────┼────┼────┼────┼────┤
3457 │ No Table ID │ 1│ 1│ 1│ 1│
3458 │ Layer ID │ 1│ 1│ 1│ 1│
3459 │ Subtable ID│ 7│ 7│ 8│ 8│
3460 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
3461 │ No QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3462 │ Layer ID │ 1│ 1│ 1│ 1│
3463 │ Subtable ID│ 9│ 9│ 10│ 10│
3464 │ ╶───────────────┼────┼────┼────┼────┤
3465 │ No Table ID │ 1│ 1│ 1│ 1│
3466 │ Layer ID │ 1│ 1│ 1│ 1│
3467 │ Subtable ID│ 9│ 9│ 10│ 10│
3468 │ ╶───────────────────┼────┼────┼────┼────┤
3469 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3470 │ Layer ID │ 1│ 1│ 1│ 1│
3471 │ Subtable ID│ 11│ 11│ 12│ 12│
3472 │ ╶───────────────┼────┼────┼────┼────┤
3473 │ No Table ID │ 1│ 1│ 1│ 1│
3474 │ Layer ID │ 1│ 1│ 1│ 1│
3475 │ Subtable ID│ 11│ 11│ 12│ 12│
3476 │ ╶────────────────────────────┼────┼────┼────┼────┤
3477 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3478 │ Layer ID │ 1│ 1│ 1│ 1│
3479 │ Subtable ID│ 13│ 13│ 14│ 14│
3480 │ ╶───────────────┼────┼────┼────┼────┤
3481 │ No Table ID │ 1│ 1│ 1│ 1│
3482 │ Layer ID │ 1│ 1│ 1│ 1│
3483 │ Subtable ID│ 13│ 13│ 14│ 14│
3484 │ ╶───────────────────┼────┼────┼────┼────┤
3485 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3486 │ Layer ID │ 1│ 1│ 1│ 1│
3487 │ Subtable ID│ 15│ 15│ 16│ 16│
3488 │ ╶───────────────┼────┼────┼────┼────┤
3489 │ No Table ID │ 1│ 1│ 1│ 1│
3490 │ Layer ID │ 1│ 1│ 1│ 1│
3491 │ Subtable ID│ 15│ 15│ 16│ 16│
3492 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
3496 ╭──────────────────────────────────────────┬───────────────────╮
3498 │ ├─────────┬─────────┤
3500 │ ├─────────┼─────────┤
3502 │ ├────┬────┼────┬────┤
3503 │ │ Yes│ No │ Yes│ No │
3504 │ ├────┼────┼────┼────┤
3505 │ │QN86│QN86│QN86│QN86│
3506 ├──────────────────────────────────────────┼────┼────┼────┼────┤
3507 │QN26 Yes QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3508 │ Layer ID │ 2│ 2│ 2│ 2│
3509 │ Subtable ID│ 17│ 17│ 18│ 18│
3510 │ ╶───────────────┼────┼────┼────┼────┤
3511 │ No Table ID │ 1│ 1│ 1│ 1│
3512 │ Layer ID │ 2│ 2│ 2│ 2│
3513 │ Subtable ID│ 17│ 17│ 18│ 18│
3514 │ ╶───────────────────┼────┼────┼────┼────┤
3515 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3516 │ Layer ID │ 2│ 2│ 2│ 2│
3517 │ Subtable ID│ 19│ 19│ 20│ 20│
3518 │ ╶───────────────┼────┼────┼────┼────┤
3519 │ No Table ID │ 1│ 1│ 1│ 1│
3520 │ Layer ID │ 2│ 2│ 2│ 2│
3521 │ Subtable ID│ 19│ 19│ 20│ 20│
3522 │ ╶────────────────────────────┼────┼────┼────┼────┤
3523 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3524 │ Layer ID │ 2│ 2│ 2│ 2│
3525 │ Subtable ID│ 21│ 21│ 22│ 22│
3526 │ ╶───────────────┼────┼────┼────┼────┤
3527 │ No Table ID │ 1│ 1│ 1│ 1│
3528 │ Layer ID │ 2│ 2│ 2│ 2│
3529 │ Subtable ID│ 21│ 21│ 22│ 22│
3530 │ ╶───────────────────┼────┼────┼────┼────┤
3531 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3532 │ Layer ID │ 2│ 2│ 2│ 2│
3533 │ Subtable ID│ 23│ 23│ 24│ 24│
3534 │ ╶───────────────┼────┼────┼────┼────┤
3535 │ No Table ID │ 1│ 1│ 1│ 1│
3536 │ Layer ID │ 2│ 2│ 2│ 2│
3537 │ Subtable ID│ 23│ 23│ 24│ 24│
3538 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
3539 │ No QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3540 │ Layer ID │ 2│ 2│ 2│ 2│
3541 │ Subtable ID│ 25│ 25│ 26│ 26│
3542 │ ╶───────────────┼────┼────┼────┼────┤
3543 │ No Table ID │ 1│ 1│ 1│ 1│
3544 │ Layer ID │ 2│ 2│ 2│ 2│
3545 │ Subtable ID│ 25│ 25│ 26│ 26│
3546 │ ╶───────────────────┼────┼────┼────┼────┤
3547 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3548 │ Layer ID │ 2│ 2│ 2│ 2│
3549 │ Subtable ID│ 27│ 27│ 28│ 28│
3550 │ ╶───────────────┼────┼────┼────┼────┤
3551 │ No Table ID │ 1│ 1│ 1│ 1│
3552 │ Layer ID │ 2│ 2│ 2│ 2│
3553 │ Subtable ID│ 27│ 27│ 28│ 28│
3554 │ ╶────────────────────────────┼────┼────┼────┼────┤
3555 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3556 │ Layer ID │ 2│ 2│ 2│ 2│
3557 │ Subtable ID│ 29│ 29│ 30│ 30│
3558 │ ╶───────────────┼────┼────┼────┼────┤
3559 │ No Table ID │ 1│ 1│ 1│ 1│
3560 │ Layer ID │ 2│ 2│ 2│ 2│
3561 │ Subtable ID│ 29│ 29│ 30│ 30│
3562 │ ╶───────────────────┼────┼────┼────┼────┤
3563 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3564 │ Layer ID │ 2│ 2│ 2│ 2│
3565 │ Subtable ID│ 31│ 31│ 32│ 32│
3566 │ ╶───────────────┼────┼────┼────┼────┤
3567 │ No Table ID │ 1│ 1│ 1│ 1│
3568 │ Layer ID │ 2│ 2│ 2│ 2│
3569 │ Subtable ID│ 31│ 31│ 32│ 32│
3570 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
3574 ╭───────────────────────────────────────────┬───────────────────╮
3576 │ ├─────────┬─────────┤
3578 │ ├─────────┼─────────┤
3580 │ ├────┬────┼────┬────┤
3581 │ │ Yes│ No │ Yes│ No │
3582 │ ├────┼────┼────┼────┤
3583 │ │QN86│QN86│QN86│QN86│
3584 ├───────────────────────────────────────────┼────┼────┼────┼────┤
3585 │QN26 Yes QN61 Yes QN57 Yes Yes Row ID │ 1│ 1│ 3│ 3│
3586 │ Layer Row ID│ 1│ 1│ 1│ 1│
3587 │ ╶────────────────┼────┼────┼────┼────┤
3588 │ No Row ID │ 2│ 2│ 4│ 4│
3589 │ Layer Row ID│ 2│ 2│ 2│ 2│
3590 │ ╶────────────────────┼────┼────┼────┼────┤
3591 │ No Yes Row ID │ 6│ 6│ 7│ 7│
3592 │ Layer Row ID│ 4│ 4│ 4│ 4│
3593 │ ╶────────────────┼────┼────┼────┼────┤
3594 │ No Row ID │ 5│ 5│ 8│ 8│
3595 │ Layer Row ID│ 3│ 3│ 3│ 3│
3596 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3597 │ No QN57 Yes Yes Row ID │ 10│ 10│ 11│ 11│
3598 │ Layer Row ID│ 6│ 6│ 6│ 6│
3599 │ ╶────────────────┼────┼────┼────┼────┤
3600 │ No Row ID │ 9│ 9│ 12│ 12│
3601 │ Layer Row ID│ 5│ 5│ 5│ 5│
3602 │ ╶────────────────────┼────┼────┼────┼────┤
3603 │ No Yes Row ID │ 13│ 13│ 15│ 15│
3604 │ Layer Row ID│ 7│ 7│ 7│ 7│
3605 │ ╶────────────────┼────┼────┼────┼────┤
3606 │ No Row ID │ 14│ 14│ 16│ 16│
3607 │ Layer Row ID│ 8│ 8│ 8│ 8│
3608 │ ╶──────────────────────────────────────┼────┼────┼────┼────┤
3609 │ No QN61 Yes QN57 Yes Yes Row ID │ 17│ 17│ 20│ 20│
3610 │ Layer Row ID│ 9│ 9│ 9│ 9│
3611 │ ╶────────────────┼────┼────┼────┼────┤
3612 │ No Row ID │ 18│ 18│ 19│ 19│
3613 │ Layer Row ID│ 10│ 10│ 10│ 10│
3614 │ ╶────────────────────┼────┼────┼────┼────┤
3615 │ No Yes Row ID │ 21│ 21│ 24│ 24│
3616 │ Layer Row ID│ 11│ 11│ 11│ 11│
3617 │ ╶────────────────┼────┼────┼────┼────┤
3618 │ No Row ID │ 22│ 22│ 23│ 23│
3619 │ Layer Row ID│ 12│ 12│ 12│ 12│
3620 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3621 │ No QN57 Yes Yes Row ID │ 25│ 25│ 27│ 27│
3622 │ Layer Row ID│ 13│ 13│ 13│ 13│
3623 │ ╶────────────────┼────┼────┼────┼────┤
3624 │ No Row ID │ 26│ 26│ 28│ 28│
3625 │ Layer Row ID│ 14│ 14│ 14│ 14│
3626 │ ╶────────────────────┼────┼────┼────┼────┤
3627 │ No Yes Row ID │ 30│ 30│ 32│ 32│
3628 │ Layer Row ID│ 16│ 16│ 16│ 16│
3629 │ ╶────────────────┼────┼────┼────┼────┤
3630 │ No Row ID │ 29│ 29│ 31│ 31│
3631 │ Layer Row ID│ 15│ 15│ 15│ 15│
3632 ╰───────────────────────────────────────────┴────┴────┴────┴────╯
3636 ╭───────────────────────────────────────────┬───────────────────╮
3638 │ ├─────────┬─────────┤
3640 │ ├─────────┼─────────┤
3642 │ ├────┬────┼────┬────┤
3643 │ │ Yes│ No │ Yes│ No │
3644 │ ├────┼────┼────┼────┤
3645 │ │QN86│QN86│QN86│QN86│
3646 ├───────────────────────────────────────────┼────┼────┼────┼────┤
3647 │QN26 Yes QN61 Yes QN57 Yes Yes Row ID │ 34│ 34│ 35│ 35│
3648 │ Layer Row ID│ 18│ 18│ 18│ 18│
3649 │ ╶────────────────┼────┼────┼────┼────┤
3650 │ No Row ID │ 33│ 33│ 36│ 36│
3651 │ Layer Row ID│ 17│ 17│ 17│ 17│
3652 │ ╶────────────────────┼────┼────┼────┼────┤
3653 │ No Yes Row ID │ 38│ 38│ 39│ 39│
3654 │ Layer Row ID│ 20│ 20│ 20│ 20│
3655 │ ╶────────────────┼────┼────┼────┼────┤
3656 │ No Row ID │ 37│ 37│ 40│ 40│
3657 │ Layer Row ID│ 19│ 19│ 19│ 19│
3658 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3659 │ No QN57 Yes Yes Row ID │ 42│ 42│ 43│ 43│
3660 │ Layer Row ID│ 22│ 22│ 22│ 22│
3661 │ ╶────────────────┼────┼────┼────┼────┤
3662 │ No Row ID │ 41│ 41│ 44│ 44│
3663 │ Layer Row ID│ 21│ 21│ 21│ 21│
3664 │ ╶────────────────────┼────┼────┼────┼────┤
3665 │ No Yes Row ID │ 45│ 45│ 47│ 47│
3666 │ Layer Row ID│ 23│ 23│ 23│ 23│
3667 │ ╶────────────────┼────┼────┼────┼────┤
3668 │ No Row ID │ 46│ 46│ 48│ 48│
3669 │ Layer Row ID│ 24│ 24│ 24│ 24│
3670 │ ╶──────────────────────────────────────┼────┼────┼────┼────┤
3671 │ No QN61 Yes QN57 Yes Yes Row ID │ 50│ 50│ 51│ 51│
3672 │ Layer Row ID│ 26│ 26│ 26│ 26│
3673 │ ╶────────────────┼────┼────┼────┼────┤
3674 │ No Row ID │ 49│ 49│ 52│ 52│
3675 │ Layer Row ID│ 25│ 25│ 25│ 25│
3676 │ ╶────────────────────┼────┼────┼────┼────┤
3677 │ No Yes Row ID │ 53│ 53│ 55│ 55│
3678 │ Layer Row ID│ 27│ 27│ 27│ 27│
3679 │ ╶────────────────┼────┼────┼────┼────┤
3680 │ No Row ID │ 54│ 54│ 56│ 56│
3681 │ Layer Row ID│ 28│ 28│ 28│ 28│
3682 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3683 │ No QN57 Yes Yes Row ID │ 57│ 57│ 59│ 59│
3684 │ Layer Row ID│ 29│ 29│ 29│ 29│
3685 │ ╶────────────────┼────┼────┼────┼────┤
3686 │ No Row ID │ 58│ 58│ 60│ 60│
3687 │ Layer Row ID│ 30│ 30│ 30│ 30│
3688 │ ╶────────────────────┼────┼────┼────┼────┤
3689 │ No Yes Row ID │ 62│ 62│ 64│ 64│
3690 │ Layer Row ID│ 32│ 32│ 32│ 32│
3691 │ ╶────────────────┼────┼────┼────┼────┤
3692 │ No Row ID │ 61│ 61│ 63│ 63│
3693 │ Layer Row ID│ 31│ 31│ 31│ 31│
3694 ╰───────────────────────────────────────────┴────┴────┴────┴────╯
3698 ╭──────────────────────────────────────────────┬───────────────────╮
3700 │ ├─────────┬─────────┤
3702 │ ├─────────┼─────────┤
3704 │ ├────┬────┼────┬────┤
3705 │ │ Yes│ No │ Yes│ No │
3706 │ ├────┼────┼────┼────┤
3707 │ │QN86│QN86│QN86│QN86│
3708 ├──────────────────────────────────────────────┼────┼────┼────┼────┤
3709 │QN26 Yes QN61 Yes QN57 Yes Yes Column ID │ 1│ 2│ 3│ 4│
3710 │ Layer Column ID│ 1│ 2│ 3│ 4│
3711 │ ╶───────────────────┼────┼────┼────┼────┤
3712 │ No Column ID │ 1│ 2│ 3│ 4│
3713 │ Layer Column ID│ 1│ 2│ 3│ 4│
3714 │ ╶───────────────────────┼────┼────┼────┼────┤
3715 │ No Yes Column ID │ 5│ 6│ 7│ 8│
3716 │ Layer Column ID│ 1│ 2│ 3│ 4│
3717 │ ╶───────────────────┼────┼────┼────┼────┤
3718 │ No Column ID │ 5│ 6│ 7│ 8│
3719 │ Layer Column ID│ 1│ 2│ 3│ 4│
3720 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3721 │ No QN57 Yes Yes Column ID │ 9│ 10│ 11│ 12│
3722 │ Layer Column ID│ 1│ 2│ 3│ 4│
3723 │ ╶───────────────────┼────┼────┼────┼────┤
3724 │ No Column ID │ 9│ 10│ 11│ 12│
3725 │ Layer Column ID│ 1│ 2│ 3│ 4│
3726 │ ╶───────────────────────┼────┼────┼────┼────┤
3727 │ No Yes Column ID │ 13│ 14│ 15│ 16│
3728 │ Layer Column ID│ 1│ 2│ 3│ 4│
3729 │ ╶───────────────────┼────┼────┼────┼────┤
3730 │ No Column ID │ 13│ 14│ 15│ 16│
3731 │ Layer Column ID│ 1│ 2│ 3│ 4│
3732 │ ╶─────────────────────────────────────────┼────┼────┼────┼────┤
3733 │ No QN61 Yes QN57 Yes Yes Column ID │ 17│ 18│ 19│ 20│
3734 │ Layer Column ID│ 1│ 2│ 3│ 4│
3735 │ ╶───────────────────┼────┼────┼────┼────┤
3736 │ No Column ID │ 17│ 18│ 19│ 20│
3737 │ Layer Column ID│ 1│ 2│ 3│ 4│
3738 │ ╶───────────────────────┼────┼────┼────┼────┤
3739 │ No Yes Column ID │ 21│ 22│ 23│ 24│
3740 │ Layer Column ID│ 1│ 2│ 3│ 4│
3741 │ ╶───────────────────┼────┼────┼────┼────┤
3742 │ No Column ID │ 21│ 22│ 23│ 24│
3743 │ Layer Column ID│ 1│ 2│ 3│ 4│
3744 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3745 │ No QN57 Yes Yes Column ID │ 25│ 26│ 27│ 28│
3746 │ Layer Column ID│ 1│ 2│ 3│ 4│
3747 │ ╶───────────────────┼────┼────┼────┼────┤
3748 │ No Column ID │ 25│ 26│ 27│ 28│
3749 │ Layer Column ID│ 1│ 2│ 3│ 4│
3750 │ ╶───────────────────────┼────┼────┼────┼────┤
3751 │ No Yes Column ID │ 29│ 30│ 31│ 32│
3752 │ Layer Column ID│ 1│ 2│ 3│ 4│
3753 │ ╶───────────────────┼────┼────┼────┼────┤
3754 │ No Column ID │ 29│ 30│ 31│ 32│
3755 │ Layer Column ID│ 1│ 2│ 3│ 4│
3756 ╰──────────────────────────────────────────────┴────┴────┴────┴────╯
3760 ╭──────────────────────────────────────────────┬───────────────────╮
3762 │ ├─────────┬─────────┤
3764 │ ├─────────┼─────────┤
3766 │ ├────┬────┼────┬────┤
3767 │ │ Yes│ No │ Yes│ No │
3768 │ ├────┼────┼────┼────┤
3769 │ │QN86│QN86│QN86│QN86│
3770 ├──────────────────────────────────────────────┼────┼────┼────┼────┤
3771 │QN26 Yes QN61 Yes QN57 Yes Yes Column ID │ 33│ 34│ 35│ 36│
3772 │ Layer Column ID│ 5│ 6│ 7│ 8│
3773 │ ╶───────────────────┼────┼────┼────┼────┤
3774 │ No Column ID │ 33│ 34│ 35│ 36│
3775 │ Layer Column ID│ 5│ 6│ 7│ 8│
3776 │ ╶───────────────────────┼────┼────┼────┼────┤
3777 │ No Yes Column ID │ 37│ 38│ 39│ 40│
3778 │ Layer Column ID│ 5│ 6│ 7│ 8│
3779 │ ╶───────────────────┼────┼────┼────┼────┤
3780 │ No Column ID │ 37│ 38│ 39│ 40│
3781 │ Layer Column ID│ 5│ 6│ 7│ 8│
3782 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3783 │ No QN57 Yes Yes Column ID │ 41│ 42│ 43│ 44│
3784 │ Layer Column ID│ 5│ 6│ 7│ 8│
3785 │ ╶───────────────────┼────┼────┼────┼────┤
3786 │ No Column ID │ 41│ 42│ 43│ 44│
3787 │ Layer Column ID│ 5│ 6│ 7│ 8│
3788 │ ╶───────────────────────┼────┼────┼────┼────┤
3789 │ No Yes Column ID │ 45│ 46│ 47│ 48│
3790 │ Layer Column ID│ 5│ 6│ 7│ 8│
3791 │ ╶───────────────────┼────┼────┼────┼────┤
3792 │ No Column ID │ 45│ 46│ 47│ 48│
3793 │ Layer Column ID│ 5│ 6│ 7│ 8│
3794 │ ╶─────────────────────────────────────────┼────┼────┼────┼────┤
3795 │ No QN61 Yes QN57 Yes Yes Column ID │ 49│ 50│ 51│ 52│
3796 │ Layer Column ID│ 5│ 6│ 7│ 8│
3797 │ ╶───────────────────┼────┼────┼────┼────┤
3798 │ No Column ID │ 49│ 50│ 51│ 52│
3799 │ Layer Column ID│ 5│ 6│ 7│ 8│
3800 │ ╶───────────────────────┼────┼────┼────┼────┤
3801 │ No Yes Column ID │ 53│ 54│ 55│ 56│
3802 │ Layer Column ID│ 5│ 6│ 7│ 8│
3803 │ ╶───────────────────┼────┼────┼────┼────┤
3804 │ No Column ID │ 53│ 54│ 55│ 56│
3805 │ Layer Column ID│ 5│ 6│ 7│ 8│
3806 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3807 │ No QN57 Yes Yes Column ID │ 57│ 58│ 59│ 60│
3808 │ Layer Column ID│ 5│ 6│ 7│ 8│
3809 │ ╶───────────────────┼────┼────┼────┼────┤
3810 │ No Column ID │ 57│ 58│ 59│ 60│
3811 │ Layer Column ID│ 5│ 6│ 7│ 8│
3812 │ ╶───────────────────────┼────┼────┼────┼────┤
3813 │ No Yes Column ID │ 61│ 62│ 63│ 64│
3814 │ Layer Column ID│ 5│ 6│ 7│ 8│
3815 │ ╶───────────────────┼────┼────┼────┼────┤
3816 │ No Column ID │ 61│ 62│ 63│ 64│
3817 │ Layer Column ID│ 5│ 6│ 7│ 8│
3818 ╰──────────────────────────────────────────────┴────┴────┴────┴────╯
3822 AT_SETUP([CTABLES area definitions with CLABELS ROWLABELS=LAYER])
3823 AT_KEYWORDS([ROWLABELS LAYER])
3824 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3825 AT_DATA([ctables.sps],
3828 /VLABELS VARIABLES=ALL DISPLAY=NAME
3829 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3830 /SLABELS POSITION=ROW
3831 /CLABELS ROWLABELS=LAYER
3832 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3833 /SLABELS POSITION=ROW
3834 /CLABELS ROWLABELS=LAYER
3835 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3836 /SLABELS POSITION=ROW
3837 /CLABELS ROWLABELS=LAYER.
3839 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3843 ╭──────────────────────────────────┬───────────────────────────╮
3845 │ ├─────────────┬─────────────┤
3847 │ ├─────────────┼─────────────┤
3849 │ ├──────┬──────┼──────┬──────┤
3850 │ │ Yes │ No │ Yes │ No │
3851 │ ├──────┼──────┼──────┼──────┤
3852 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3853 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3854 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3855 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3856 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3857 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3858 │ Subtable ID│ 2│ 2│ 4│ 4│ 6│ 6│ 7│ 7│
3859 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3860 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3861 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3862 │ Subtable ID│ 2│ 2│ 4│ 4│ 6│ 6│ 7│ 7│
3863 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3864 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3865 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3866 │ Subtable ID│ 10│10│ 12│12│ 13│13│ 15│15│
3867 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3868 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3869 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3870 │ Subtable ID│ 10│10│ 12│12│ 13│13│ 15│15│
3871 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
3876 ╭──────────────────────────────────┬───────────────────────────╮
3878 │ ├─────────────┬─────────────┤
3880 │ ├─────────────┼─────────────┤
3882 │ ├──────┬──────┼──────┬──────┤
3883 │ │ Yes │ No │ Yes │ No │
3884 │ ├──────┼──────┼──────┼──────┤
3885 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3886 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3887 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3888 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3889 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3890 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3891 │ Subtable ID│ 1│ 1│ 3│ 3│ 5│ 5│ 8│ 8│
3892 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3893 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3894 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3895 │ Subtable ID│ 1│ 1│ 3│ 3│ 5│ 5│ 8│ 8│
3896 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3897 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3898 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3899 │ Subtable ID│ 9│ 9│ 11│11│ 14│14│ 16│16│
3900 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3901 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3902 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3903 │ Subtable ID│ 9│ 9│ 11│11│ 14│14│ 16│16│
3904 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
3909 ╭──────────────────────────────────┬───────────────────────────╮
3911 │ ├─────────────┬─────────────┤
3913 │ ├─────────────┼─────────────┤
3915 │ ├──────┬──────┼──────┬──────┤
3916 │ │ Yes │ No │ Yes │ No │
3917 │ ├──────┼──────┼──────┼──────┤
3918 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3919 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3920 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3921 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3922 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3923 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3924 │ Subtable ID│ 18│18│ 20│20│ 21│21│ 23│23│
3925 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3926 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3927 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3928 │ Subtable ID│ 18│18│ 20│20│ 21│21│ 23│23│
3929 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3930 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3931 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3932 │ Subtable ID│ 26│26│ 27│27│ 30│30│ 31│31│
3933 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3934 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3935 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3936 │ Subtable ID│ 26│26│ 27│27│ 30│30│ 31│31│
3937 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
3942 ╭──────────────────────────────────┬───────────────────────────╮
3944 │ ├─────────────┬─────────────┤
3946 │ ├─────────────┼─────────────┤
3948 │ ├──────┬──────┼──────┬──────┤
3949 │ │ Yes │ No │ Yes │ No │
3950 │ ├──────┼──────┼──────┼──────┤
3951 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3952 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3953 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3954 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3955 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3956 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3957 │ Subtable ID│ 17│17│ 19│19│ 22│22│ 24│24│
3958 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3959 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3960 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3961 │ Subtable ID│ 17│17│ 19│19│ 22│22│ 24│24│
3962 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3963 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3964 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3965 │ Subtable ID│ 25│25│ 28│28│ 29│29│ 32│32│
3966 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3967 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3968 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3969 │ Subtable ID│ 25│25│ 28│28│ 29│29│ 32│32│
3970 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
3975 ╭───────────────────────────────────┬───────────────────────────╮
3977 │ ├─────────────┬─────────────┤
3979 │ ├─────────────┼─────────────┤
3981 │ ├──────┬──────┼──────┬──────┤
3982 │ │ Yes │ No │ Yes │ No │
3983 │ ├──────┼──────┼──────┼──────┤
3984 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3985 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3986 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3987 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3988 │QN26 Yes QN61 Yes QN57 Row ID │ 1│ 1│ 3│ 3│ 6│ 6│ 7│ 7│
3989 │ Layer Row ID│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3990 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3991 │ No QN57 Row ID │ 10│10│ 11│11│ 13│13│ 15│15│
3992 │ Layer Row ID│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3993 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3994 │ No QN61 Yes QN57 Row ID │ 17│17│ 20│20│ 21│21│ 24│24│
3995 │ Layer Row ID│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│
3996 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3997 │ No QN57 Row ID │ 25│25│ 28│28│ 30│30│ 31│31│
3998 │ Layer Row ID│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│
3999 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4004 ╭───────────────────────────────────┬───────────────────────────╮
4006 │ ├─────────────┬─────────────┤
4008 │ ├─────────────┼─────────────┤
4010 │ ├──────┬──────┼──────┬──────┤
4011 │ │ Yes │ No │ Yes │ No │
4012 │ ├──────┼──────┼──────┼──────┤
4013 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4014 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4015 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4016 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4017 │QN26 Yes QN61 Yes QN57 Row ID │ 2│ 2│ 4│ 4│ 5│ 5│ 8│ 8│
4018 │ Layer Row ID│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4019 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4020 │ No QN57 Row ID │ 9│ 9│ 12│12│ 14│14│ 16│16│
4021 │ Layer Row ID│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4022 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4023 │ No QN61 Yes QN57 Row ID │ 18│18│ 19│19│ 22│22│ 23│23│
4024 │ Layer Row ID│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│
4025 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4026 │ No QN57 Row ID │ 26│26│ 27│27│ 29│29│ 32│32│
4027 │ Layer Row ID│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│
4028 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4033 ╭───────────────────────────────────┬───────────────────────────╮
4035 │ ├─────────────┬─────────────┤
4037 │ ├─────────────┼─────────────┤
4039 │ ├──────┬──────┼──────┬──────┤
4040 │ │ Yes │ No │ Yes │ No │
4041 │ ├──────┼──────┼──────┼──────┤
4042 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4043 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4044 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4045 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4046 │QN26 Yes QN61 Yes QN57 Row ID │ 34│34│ 36│36│ 38│38│ 39│39│
4047 │ Layer Row ID│ 10│10│ 10│10│ 10│10│ 10│10│
4048 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4049 │ No QN57 Row ID │ 41│41│ 43│43│ 46│46│ 47│47│
4050 │ Layer Row ID│ 11│11│ 11│11│ 11│11│ 11│11│
4051 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4052 │ No QN61 Yes QN57 Row ID │ 50│50│ 51│51│ 53│53│ 56│56│
4053 │ Layer Row ID│ 14│14│ 14│14│ 14│14│ 14│14│
4054 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4055 │ No QN57 Row ID │ 58│58│ 59│59│ 62│62│ 63│63│
4056 │ Layer Row ID│ 16│16│ 16│16│ 16│16│ 16│16│
4057 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4062 ╭───────────────────────────────────┬───────────────────────────╮
4064 │ ├─────────────┬─────────────┤
4066 │ ├─────────────┼─────────────┤
4068 │ ├──────┬──────┼──────┬──────┤
4069 │ │ Yes │ No │ Yes │ No │
4070 │ ├──────┼──────┼──────┼──────┤
4071 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4072 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4073 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4074 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4075 │QN26 Yes QN61 Yes QN57 Row ID │ 33│33│ 35│35│ 37│37│ 40│40│
4076 │ Layer Row ID│ 9│ 9│ 9│ 9│ 9│ 9│ 9│ 9│
4077 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4078 │ No QN57 Row ID │ 42│42│ 44│44│ 45│45│ 48│48│
4079 │ Layer Row ID│ 12│12│ 12│12│ 12│12│ 12│12│
4080 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4081 │ No QN61 Yes QN57 Row ID │ 49│49│ 52│52│ 54│54│ 55│55│
4082 │ Layer Row ID│ 13│13│ 13│13│ 13│13│ 13│13│
4083 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4084 │ No QN57 Row ID │ 57│57│ 60│60│ 61│61│ 64│64│
4085 │ Layer Row ID│ 15│15│ 15│15│ 15│15│ 15│15│
4086 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4091 ╭──────────────────────────────────────┬───────────────────────────╮
4093 │ ├─────────────┬─────────────┤
4095 │ ├─────────────┼─────────────┤
4097 │ ├──────┬──────┼──────┬──────┤
4098 │ │ Yes │ No │ Yes │ No │
4099 │ ├──────┼──────┼──────┼──────┤
4100 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4101 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4102 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4103 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4104 │QN26 Yes QN61 Yes QN57 Column ID │ 1│ 4│ 6│ 8│ 9│11│ 14│15│
4105 │ Layer Column ID│ 1│ 4│ 6│ 8│ 9│11│ 14│15│
4106 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4107 │ No QN57 Column ID │ 1│ 4│ 6│ 8│ 9│11│ 14│15│
4108 │ Layer Column ID│ 1│ 4│ 6│ 8│ 9│11│ 14│15│
4109 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4110 │ No QN61 Yes QN57 Column ID │ 18│19│ 22│23│ 25│27│ 29│32│
4111 │ Layer Column ID│ 1│ 4│ 6│ 8│ 9│11│ 14│15│
4112 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4113 │ No QN57 Column ID │ 18│19│ 22│23│ 25│27│ 29│32│
4114 │ Layer Column ID│ 1│ 4│ 6│ 8│ 9│11│ 14│15│
4115 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4120 ╭──────────────────────────────────────┬───────────────────────────╮
4122 │ ├─────────────┬─────────────┤
4124 │ ├─────────────┼─────────────┤
4126 │ ├──────┬──────┼──────┬──────┤
4127 │ │ Yes │ No │ Yes │ No │
4128 │ ├──────┼──────┼──────┼──────┤
4129 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4130 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4131 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4132 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4133 │QN26 Yes QN61 Yes QN57 Column ID │ 2│ 3│ 5│ 7│ 10│12│ 13│16│
4134 │ Layer Column ID│ 2│ 3│ 5│ 7│ 10│12│ 13│16│
4135 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4136 │ No QN57 Column ID │ 2│ 3│ 5│ 7│ 10│12│ 13│16│
4137 │ Layer Column ID│ 2│ 3│ 5│ 7│ 10│12│ 13│16│
4138 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4139 │ No QN61 Yes QN57 Column ID │ 17│20│ 21│24│ 26│28│ 30│31│
4140 │ Layer Column ID│ 2│ 3│ 5│ 7│ 10│12│ 13│16│
4141 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4142 │ No QN57 Column ID │ 17│20│ 21│24│ 26│28│ 30│31│
4143 │ Layer Column ID│ 2│ 3│ 5│ 7│ 10│12│ 13│16│
4144 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4149 ╭──────────────────────────────────────┬───────────────────────────╮
4151 │ ├─────────────┬─────────────┤
4153 │ ├─────────────┼─────────────┤
4155 │ ├──────┬──────┼──────┬──────┤
4156 │ │ Yes │ No │ Yes │ No │
4157 │ ├──────┼──────┼──────┼──────┤
4158 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4159 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4160 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4161 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4162 │QN26 Yes QN61 Yes QN57 Column ID │ 33│36│ 37│39│ 42│44│ 45│47│
4163 │ Layer Column ID│ 17│20│ 21│23│ 26│28│ 29│31│
4164 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4165 │ No QN57 Column ID │ 33│36│ 37│39│ 42│44│ 45│47│
4166 │ Layer Column ID│ 17│20│ 21│23│ 26│28│ 29│31│
4167 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4168 │ No QN61 Yes QN57 Column ID │ 49│51│ 54│56│ 57│60│ 62│64│
4169 │ Layer Column ID│ 17│20│ 21│23│ 26│28│ 29│31│
4170 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4171 │ No QN57 Column ID │ 49│51│ 54│56│ 57│60│ 62│64│
4172 │ Layer Column ID│ 17│20│ 21│23│ 26│28│ 29│31│
4173 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4178 ╭──────────────────────────────────────┬───────────────────────────╮
4180 │ ├─────────────┬─────────────┤
4182 │ ├─────────────┼─────────────┤
4184 │ ├──────┬──────┼──────┬──────┤
4185 │ │ Yes │ No │ Yes │ No │
4186 │ ├──────┼──────┼──────┼──────┤
4187 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4188 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4189 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4190 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4191 │QN26 Yes QN61 Yes QN57 Column ID │ 34│35│ 38│40│ 41│43│ 46│48│
4192 │ Layer Column ID│ 18│19│ 22│24│ 25│27│ 30│32│
4193 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4194 │ No QN57 Column ID │ 34│35│ 38│40│ 41│43│ 46│48│
4195 │ Layer Column ID│ 18│19│ 22│24│ 25│27│ 30│32│
4196 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4197 │ No QN61 Yes QN57 Column ID │ 50│52│ 53│55│ 58│59│ 61│63│
4198 │ Layer Column ID│ 18│19│ 22│24│ 25│27│ 30│32│
4199 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4200 │ No QN57 Column ID │ 50│52│ 53│55│ 58│59│ 61│63│
4201 │ Layer Column ID│ 18│19│ 22│24│ 25│27│ 30│32│
4202 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4206 AT_SETUP([CTABLES area definitions with CLABELS COLLABELS=LAYER])
4207 AT_KEYWORDS([COLLABELS LAYER])
4208 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4209 AT_DATA([ctables.sps],
4212 /VLABELS VARIABLES=ALL DISPLAY=NAME
4213 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
4214 /SLABELS POSITION=ROW
4215 /CLABELS COLLABELS=LAYER
4216 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
4217 /SLABELS POSITION=ROW
4218 /CLABELS COLLABELS=LAYER
4219 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
4220 /SLABELS POSITION=ROW
4221 /CLABELS COLLABELS=LAYER.
4223 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
4227 ╭──────────────────────────────────────┬───────────────────╮
4229 │ ├─────────┬─────────┤
4231 │ ├─────────┼─────────┤
4233 │ ├────┬────┼────┬────┤
4234 │ │ Yes│ No │ Yes│ No │
4235 │ ├────┼────┼────┼────┤
4236 │ │QN86│QN86│QN86│QN86│
4237 ├──────────────────────────────────────┼────┼────┼────┼────┤
4238 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4239 │ Layer ID │ 2│ 2│ 2│ 2│
4240 │ Subtable ID│ 2│ 2│ 4│ 4│
4241 │ ╶───────────────┼────┼────┼────┼────┤
4242 │ No Table ID │ 1│ 1│ 1│ 1│
4243 │ Layer ID │ 2│ 2│ 2│ 2│
4244 │ Subtable ID│ 2│ 2│ 4│ 4│
4245 │ ╶────────────────────────┼────┼────┼────┼────┤
4246 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4247 │ Layer ID │ 2│ 2│ 2│ 2│
4248 │ Subtable ID│ 5│ 5│ 8│ 8│
4249 │ ╶───────────────┼────┼────┼────┼────┤
4250 │ No Table ID │ 1│ 1│ 1│ 1│
4251 │ Layer ID │ 2│ 2│ 2│ 2│
4252 │ Subtable ID│ 5│ 5│ 8│ 8│
4253 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4254 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4255 │ Layer ID │ 2│ 2│ 2│ 2│
4256 │ Subtable ID│ 9│ 9│ 12│ 12│
4257 │ ╶───────────────┼────┼────┼────┼────┤
4258 │ No Table ID │ 1│ 1│ 1│ 1│
4259 │ Layer ID │ 2│ 2│ 2│ 2│
4260 │ Subtable ID│ 9│ 9│ 12│ 12│
4261 │ ╶────────────────────────┼────┼────┼────┼────┤
4262 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4263 │ Layer ID │ 2│ 2│ 2│ 2│
4264 │ Subtable ID│ 14│ 14│ 15│ 15│
4265 │ ╶───────────────┼────┼────┼────┼────┤
4266 │ No Table ID │ 1│ 1│ 1│ 1│
4267 │ Layer ID │ 2│ 2│ 2│ 2│
4268 │ Subtable ID│ 14│ 14│ 15│ 15│
4269 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4274 ╭──────────────────────────────────────┬───────────────────╮
4276 │ ├─────────┬─────────┤
4278 │ ├─────────┼─────────┤
4280 │ ├────┬────┼────┬────┤
4281 │ │ Yes│ No │ Yes│ No │
4282 │ ├────┼────┼────┼────┤
4283 │ │QN86│QN86│QN86│QN86│
4284 ├──────────────────────────────────────┼────┼────┼────┼────┤
4285 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4286 │ Layer ID │ 1│ 1│ 1│ 1│
4287 │ Subtable ID│ 1│ 1│ 3│ 3│
4288 │ ╶───────────────┼────┼────┼────┼────┤
4289 │ No Table ID │ 1│ 1│ 1│ 1│
4290 │ Layer ID │ 1│ 1│ 1│ 1│
4291 │ Subtable ID│ 1│ 1│ 3│ 3│
4292 │ ╶────────────────────────┼────┼────┼────┼────┤
4293 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4294 │ Layer ID │ 1│ 1│ 1│ 1│
4295 │ Subtable ID│ 6│ 6│ 7│ 7│
4296 │ ╶───────────────┼────┼────┼────┼────┤
4297 │ No Table ID │ 1│ 1│ 1│ 1│
4298 │ Layer ID │ 1│ 1│ 1│ 1│
4299 │ Subtable ID│ 6│ 6│ 7│ 7│
4300 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4301 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4302 │ Layer ID │ 1│ 1│ 1│ 1│
4303 │ Subtable ID│ 10│ 10│ 11│ 11│
4304 │ ╶───────────────┼────┼────┼────┼────┤
4305 │ No Table ID │ 1│ 1│ 1│ 1│
4306 │ Layer ID │ 1│ 1│ 1│ 1│
4307 │ Subtable ID│ 10│ 10│ 11│ 11│
4308 │ ╶────────────────────────┼────┼────┼────┼────┤
4309 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4310 │ Layer ID │ 1│ 1│ 1│ 1│
4311 │ Subtable ID│ 13│ 13│ 16│ 16│
4312 │ ╶───────────────┼────┼────┼────┼────┤
4313 │ No Table ID │ 1│ 1│ 1│ 1│
4314 │ Layer ID │ 1│ 1│ 1│ 1│
4315 │ Subtable ID│ 13│ 13│ 16│ 16│
4316 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4321 ╭──────────────────────────────────────┬───────────────────╮
4323 │ ├─────────┬─────────┤
4325 │ ├─────────┼─────────┤
4327 │ ├────┬────┼────┬────┤
4328 │ │ Yes│ No │ Yes│ No │
4329 │ ├────┼────┼────┼────┤
4330 │ │QN86│QN86│QN86│QN86│
4331 ├──────────────────────────────────────┼────┼────┼────┼────┤
4332 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4333 │ Layer ID │ 4│ 4│ 4│ 4│
4334 │ Subtable ID│ 18│ 18│ 20│ 20│
4335 │ ╶───────────────┼────┼────┼────┼────┤
4336 │ No Table ID │ 1│ 1│ 1│ 1│
4337 │ Layer ID │ 4│ 4│ 4│ 4│
4338 │ Subtable ID│ 18│ 18│ 20│ 20│
4339 │ ╶────────────────────────┼────┼────┼────┼────┤
4340 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4341 │ Layer ID │ 4│ 4│ 4│ 4│
4342 │ Subtable ID│ 21│ 21│ 23│ 23│
4343 │ ╶───────────────┼────┼────┼────┼────┤
4344 │ No Table ID │ 1│ 1│ 1│ 1│
4345 │ Layer ID │ 4│ 4│ 4│ 4│
4346 │ Subtable ID│ 21│ 21│ 23│ 23│
4347 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4348 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4349 │ Layer ID │ 4│ 4│ 4│ 4│
4350 │ Subtable ID│ 25│ 25│ 28│ 28│
4351 │ ╶───────────────┼────┼────┼────┼────┤
4352 │ No Table ID │ 1│ 1│ 1│ 1│
4353 │ Layer ID │ 4│ 4│ 4│ 4│
4354 │ Subtable ID│ 25│ 25│ 28│ 28│
4355 │ ╶────────────────────────┼────┼────┼────┼────┤
4356 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4357 │ Layer ID │ 4│ 4│ 4│ 4│
4358 │ Subtable ID│ 30│ 30│ 32│ 32│
4359 │ ╶───────────────┼────┼────┼────┼────┤
4360 │ No Table ID │ 1│ 1│ 1│ 1│
4361 │ Layer ID │ 4│ 4│ 4│ 4│
4362 │ Subtable ID│ 30│ 30│ 32│ 32│
4363 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4368 ╭──────────────────────────────────────┬───────────────────╮
4370 │ ├─────────┬─────────┤
4372 │ ├─────────┼─────────┤
4374 │ ├────┬────┼────┬────┤
4375 │ │ Yes│ No │ Yes│ No │
4376 │ ├────┼────┼────┼────┤
4377 │ │QN86│QN86│QN86│QN86│
4378 ├──────────────────────────────────────┼────┼────┼────┼────┤
4379 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4380 │ Layer ID │ 3│ 3│ 3│ 3│
4381 │ Subtable ID│ 17│ 17│ 19│ 19│
4382 │ ╶───────────────┼────┼────┼────┼────┤
4383 │ No Table ID │ 1│ 1│ 1│ 1│
4384 │ Layer ID │ 3│ 3│ 3│ 3│
4385 │ Subtable ID│ 17│ 17│ 19│ 19│
4386 │ ╶────────────────────────┼────┼────┼────┼────┤
4387 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4388 │ Layer ID │ 3│ 3│ 3│ 3│
4389 │ Subtable ID│ 22│ 22│ 24│ 24│
4390 │ ╶───────────────┼────┼────┼────┼────┤
4391 │ No Table ID │ 1│ 1│ 1│ 1│
4392 │ Layer ID │ 3│ 3│ 3│ 3│
4393 │ Subtable ID│ 22│ 22│ 24│ 24│
4394 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4395 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4396 │ Layer ID │ 3│ 3│ 3│ 3│
4397 │ Subtable ID│ 26│ 26│ 27│ 27│
4398 │ ╶───────────────┼────┼────┼────┼────┤
4399 │ No Table ID │ 1│ 1│ 1│ 1│
4400 │ Layer ID │ 3│ 3│ 3│ 3│
4401 │ Subtable ID│ 26│ 26│ 27│ 27│
4402 │ ╶────────────────────────┼────┼────┼────┼────┤
4403 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4404 │ Layer ID │ 3│ 3│ 3│ 3│
4405 │ Subtable ID│ 29│ 29│ 31│ 31│
4406 │ ╶───────────────┼────┼────┼────┼────┤
4407 │ No Table ID │ 1│ 1│ 1│ 1│
4408 │ Layer ID │ 3│ 3│ 3│ 3│
4409 │ Subtable ID│ 29│ 29│ 31│ 31│
4410 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4415 ╭───────────────────────────────────────┬───────────────────╮
4417 │ ├─────────┬─────────┤
4419 │ ├─────────┼─────────┤
4421 │ ├────┬────┼────┬────┤
4422 │ │ Yes│ No │ Yes│ No │
4423 │ ├────┼────┼────┼────┤
4424 │ │QN86│QN86│QN86│QN86│
4425 ├───────────────────────────────────────┼────┼────┼────┼────┤
4426 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 1│ 1│ 3│ 3│
4427 │ Layer Row ID│ 1│ 1│ 1│ 1│
4428 │ ╶────────────────┼────┼────┼────┼────┤
4429 │ No Row ID │ 6│ 6│ 7│ 7│
4430 │ Layer Row ID│ 4│ 4│ 4│ 4│
4431 │ ╶─────────────────────────┼────┼────┼────┼────┤
4432 │ No QN57 Yes Row ID │ 10│ 10│ 11│ 11│
4433 │ Layer Row ID│ 6│ 6│ 6│ 6│
4434 │ ╶────────────────┼────┼────┼────┼────┤
4435 │ No Row ID │ 13│ 13│ 15│ 15│
4436 │ Layer Row ID│ 7│ 7│ 7│ 7│
4437 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4438 │ No QN61 Yes QN57 Yes Row ID │ 17│ 17│ 20│ 20│
4439 │ Layer Row ID│ 9│ 9│ 9│ 9│
4440 │ ╶────────────────┼────┼────┼────┼────┤
4441 │ No Row ID │ 21│ 21│ 24│ 24│
4442 │ Layer Row ID│ 11│ 11│ 11│ 11│
4443 │ ╶─────────────────────────┼────┼────┼────┼────┤
4444 │ No QN57 Yes Row ID │ 25│ 25│ 27│ 27│
4445 │ Layer Row ID│ 13│ 13│ 13│ 13│
4446 │ ╶────────────────┼────┼────┼────┼────┤
4447 │ No Row ID │ 30│ 30│ 32│ 32│
4448 │ Layer Row ID│ 16│ 16│ 16│ 16│
4449 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4454 ╭───────────────────────────────────────┬───────────────────╮
4456 │ ├─────────┬─────────┤
4458 │ ├─────────┼─────────┤
4460 │ ├────┬────┼────┬────┤
4461 │ │ Yes│ No │ Yes│ No │
4462 │ ├────┼────┼────┼────┤
4463 │ │QN86│QN86│QN86│QN86│
4464 ├───────────────────────────────────────┼────┼────┼────┼────┤
4465 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 2│ 2│ 4│ 4│
4466 │ Layer Row ID│ 2│ 2│ 2│ 2│
4467 │ ╶────────────────┼────┼────┼────┼────┤
4468 │ No Row ID │ 5│ 5│ 8│ 8│
4469 │ Layer Row ID│ 3│ 3│ 3│ 3│
4470 │ ╶─────────────────────────┼────┼────┼────┼────┤
4471 │ No QN57 Yes Row ID │ 9│ 9│ 12│ 12│
4472 │ Layer Row ID│ 5│ 5│ 5│ 5│
4473 │ ╶────────────────┼────┼────┼────┼────┤
4474 │ No Row ID │ 14│ 14│ 16│ 16│
4475 │ Layer Row ID│ 8│ 8│ 8│ 8│
4476 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4477 │ No QN61 Yes QN57 Yes Row ID │ 18│ 18│ 19│ 19│
4478 │ Layer Row ID│ 10│ 10│ 10│ 10│
4479 │ ╶────────────────┼────┼────┼────┼────┤
4480 │ No Row ID │ 22│ 22│ 23│ 23│
4481 │ Layer Row ID│ 12│ 12│ 12│ 12│
4482 │ ╶─────────────────────────┼────┼────┼────┼────┤
4483 │ No QN57 Yes Row ID │ 26│ 26│ 28│ 28│
4484 │ Layer Row ID│ 14│ 14│ 14│ 14│
4485 │ ╶────────────────┼────┼────┼────┼────┤
4486 │ No Row ID │ 29│ 29│ 31│ 31│
4487 │ Layer Row ID│ 15│ 15│ 15│ 15│
4488 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4493 ╭───────────────────────────────────────┬───────────────────╮
4495 │ ├─────────┬─────────┤
4497 │ ├─────────┼─────────┤
4499 │ ├────┬────┼────┬────┤
4500 │ │ Yes│ No │ Yes│ No │
4501 │ ├────┼────┼────┼────┤
4502 │ │QN86│QN86│QN86│QN86│
4503 ├───────────────────────────────────────┼────┼────┼────┼────┤
4504 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 34│ 34│ 35│ 35│
4505 │ Layer Row ID│ 18│ 18│ 18│ 18│
4506 │ ╶────────────────┼────┼────┼────┼────┤
4507 │ No Row ID │ 38│ 38│ 39│ 39│
4508 │ Layer Row ID│ 20│ 20│ 20│ 20│
4509 │ ╶─────────────────────────┼────┼────┼────┼────┤
4510 │ No QN57 Yes Row ID │ 42│ 42│ 43│ 43│
4511 │ Layer Row ID│ 22│ 22│ 22│ 22│
4512 │ ╶────────────────┼────┼────┼────┼────┤
4513 │ No Row ID │ 45│ 45│ 47│ 47│
4514 │ Layer Row ID│ 23│ 23│ 23│ 23│
4515 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4516 │ No QN61 Yes QN57 Yes Row ID │ 50│ 50│ 51│ 51│
4517 │ Layer Row ID│ 26│ 26│ 26│ 26│
4518 │ ╶────────────────┼────┼────┼────┼────┤
4519 │ No Row ID │ 53│ 53│ 55│ 55│
4520 │ Layer Row ID│ 27│ 27│ 27│ 27│
4521 │ ╶─────────────────────────┼────┼────┼────┼────┤
4522 │ No QN57 Yes Row ID │ 57│ 57│ 59│ 59│
4523 │ Layer Row ID│ 29│ 29│ 29│ 29│
4524 │ ╶────────────────┼────┼────┼────┼────┤
4525 │ No Row ID │ 62│ 62│ 64│ 64│
4526 │ Layer Row ID│ 32│ 32│ 32│ 32│
4527 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4532 ╭───────────────────────────────────────┬───────────────────╮
4534 │ ├─────────┬─────────┤
4536 │ ├─────────┼─────────┤
4538 │ ├────┬────┼────┬────┤
4539 │ │ Yes│ No │ Yes│ No │
4540 │ ├────┼────┼────┼────┤
4541 │ │QN86│QN86│QN86│QN86│
4542 ├───────────────────────────────────────┼────┼────┼────┼────┤
4543 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 33│ 33│ 36│ 36│
4544 │ Layer Row ID│ 17│ 17│ 17│ 17│
4545 │ ╶────────────────┼────┼────┼────┼────┤
4546 │ No Row ID │ 37│ 37│ 40│ 40│
4547 │ Layer Row ID│ 19│ 19│ 19│ 19│
4548 │ ╶─────────────────────────┼────┼────┼────┼────┤
4549 │ No QN57 Yes Row ID │ 41│ 41│ 44│ 44│
4550 │ Layer Row ID│ 21│ 21│ 21│ 21│
4551 │ ╶────────────────┼────┼────┼────┼────┤
4552 │ No Row ID │ 46│ 46│ 48│ 48│
4553 │ Layer Row ID│ 24│ 24│ 24│ 24│
4554 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4555 │ No QN61 Yes QN57 Yes Row ID │ 49│ 49│ 52│ 52│
4556 │ Layer Row ID│ 25│ 25│ 25│ 25│
4557 │ ╶────────────────┼────┼────┼────┼────┤
4558 │ No Row ID │ 54│ 54│ 56│ 56│
4559 │ Layer Row ID│ 28│ 28│ 28│ 28│
4560 │ ╶─────────────────────────┼────┼────┼────┼────┤
4561 │ No QN57 Yes Row ID │ 58│ 58│ 60│ 60│
4562 │ Layer Row ID│ 30│ 30│ 30│ 30│
4563 │ ╶────────────────┼────┼────┼────┼────┤
4564 │ No Row ID │ 61│ 61│ 63│ 63│
4565 │ Layer Row ID│ 31│ 31│ 31│ 31│
4566 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4571 ╭──────────────────────────────────────────┬───────────────────╮
4573 │ ├─────────┬─────────┤
4575 │ ├─────────┼─────────┤
4577 │ ├────┬────┼────┬────┤
4578 │ │ Yes│ No │ Yes│ No │
4579 │ ├────┼────┼────┼────┤
4580 │ │QN86│QN86│QN86│QN86│
4581 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4582 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 2│ 4│ 6│ 7│
4583 │ Layer Column ID│ 2│ 4│ 6│ 7│
4584 │ ╶───────────────────┼────┼────┼────┼────┤
4585 │ No Column ID │ 2│ 4│ 6│ 7│
4586 │ Layer Column ID│ 2│ 4│ 6│ 7│
4587 │ ╶────────────────────────────┼────┼────┼────┼────┤
4588 │ No QN57 Yes Column ID │ 9│ 12│ 13│ 16│
4589 │ Layer Column ID│ 2│ 4│ 6│ 7│
4590 │ ╶───────────────────┼────┼────┼────┼────┤
4591 │ No Column ID │ 9│ 12│ 13│ 16│
4592 │ Layer Column ID│ 2│ 4│ 6│ 7│
4593 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4594 │ No QN61 Yes QN57 Yes Column ID │ 18│ 19│ 22│ 24│
4595 │ Layer Column ID│ 2│ 4│ 6│ 7│
4596 │ ╶───────────────────┼────┼────┼────┼────┤
4597 │ No Column ID │ 18│ 19│ 22│ 24│
4598 │ Layer Column ID│ 2│ 4│ 6│ 7│
4599 │ ╶────────────────────────────┼────┼────┼────┼────┤
4600 │ No QN57 Yes Column ID │ 25│ 27│ 29│ 32│
4601 │ Layer Column ID│ 2│ 4│ 6│ 7│
4602 │ ╶───────────────────┼────┼────┼────┼────┤
4603 │ No Column ID │ 25│ 27│ 29│ 32│
4604 │ Layer Column ID│ 2│ 4│ 6│ 7│
4605 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4610 ╭──────────────────────────────────────────┬───────────────────╮
4612 │ ├─────────┬─────────┤
4614 │ ├─────────┼─────────┤
4616 │ ├────┬────┼────┬────┤
4617 │ │ Yes│ No │ Yes│ No │
4618 │ ├────┼────┼────┼────┤
4619 │ │QN86│QN86│QN86│QN86│
4620 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4621 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 1│ 3│ 5│ 8│
4622 │ Layer Column ID│ 1│ 3│ 5│ 8│
4623 │ ╶───────────────────┼────┼────┼────┼────┤
4624 │ No Column ID │ 1│ 3│ 5│ 8│
4625 │ Layer Column ID│ 1│ 3│ 5│ 8│
4626 │ ╶────────────────────────────┼────┼────┼────┼────┤
4627 │ No QN57 Yes Column ID │ 10│ 11│ 14│ 15│
4628 │ Layer Column ID│ 1│ 3│ 5│ 8│
4629 │ ╶───────────────────┼────┼────┼────┼────┤
4630 │ No Column ID │ 10│ 11│ 14│ 15│
4631 │ Layer Column ID│ 1│ 3│ 5│ 8│
4632 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4633 │ No QN61 Yes QN57 Yes Column ID │ 17│ 20│ 21│ 23│
4634 │ Layer Column ID│ 1│ 3│ 5│ 8│
4635 │ ╶───────────────────┼────┼────┼────┼────┤
4636 │ No Column ID │ 17│ 20│ 21│ 23│
4637 │ Layer Column ID│ 1│ 3│ 5│ 8│
4638 │ ╶────────────────────────────┼────┼────┼────┼────┤
4639 │ No QN57 Yes Column ID │ 26│ 28│ 30│ 31│
4640 │ Layer Column ID│ 1│ 3│ 5│ 8│
4641 │ ╶───────────────────┼────┼────┼────┼────┤
4642 │ No Column ID │ 26│ 28│ 30│ 31│
4643 │ Layer Column ID│ 1│ 3│ 5│ 8│
4644 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4649 ╭──────────────────────────────────────────┬───────────────────╮
4651 │ ├─────────┬─────────┤
4653 │ ├─────────┼─────────┤
4655 │ ├────┬────┼────┬────┤
4656 │ │ Yes│ No │ Yes│ No │
4657 │ ├────┼────┼────┼────┤
4658 │ │QN86│QN86│QN86│QN86│
4659 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4660 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 34│ 36│ 37│ 40│
4661 │ Layer Column ID│ 10│ 12│ 13│ 16│
4662 │ ╶───────────────────┼────┼────┼────┼────┤
4663 │ No Column ID │ 34│ 36│ 37│ 40│
4664 │ Layer Column ID│ 10│ 12│ 13│ 16│
4665 │ ╶────────────────────────────┼────┼────┼────┼────┤
4666 │ No QN57 Yes Column ID │ 41│ 43│ 45│ 47│
4667 │ Layer Column ID│ 10│ 12│ 13│ 16│
4668 │ ╶───────────────────┼────┼────┼────┼────┤
4669 │ No Column ID │ 41│ 43│ 45│ 47│
4670 │ Layer Column ID│ 10│ 12│ 13│ 16│
4671 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4672 │ No QN61 Yes QN57 Yes Column ID │ 49│ 51│ 54│ 55│
4673 │ Layer Column ID│ 10│ 12│ 13│ 16│
4674 │ ╶───────────────────┼────┼────┼────┼────┤
4675 │ No Column ID │ 49│ 51│ 54│ 55│
4676 │ Layer Column ID│ 10│ 12│ 13│ 16│
4677 │ ╶────────────────────────────┼────┼────┼────┼────┤
4678 │ No QN57 Yes Column ID │ 58│ 60│ 62│ 63│
4679 │ Layer Column ID│ 10│ 12│ 13│ 16│
4680 │ ╶───────────────────┼────┼────┼────┼────┤
4681 │ No Column ID │ 58│ 60│ 62│ 63│
4682 │ Layer Column ID│ 10│ 12│ 13│ 16│
4683 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4688 ╭──────────────────────────────────────────┬───────────────────╮
4690 │ ├─────────┬─────────┤
4692 │ ├─────────┼─────────┤
4694 │ ├────┬────┼────┬────┤
4695 │ │ Yes│ No │ Yes│ No │
4696 │ ├────┼────┼────┼────┤
4697 │ │QN86│QN86│QN86│QN86│
4698 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4699 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 33│ 35│ 38│ 39│
4700 │ Layer Column ID│ 9│ 11│ 14│ 15│
4701 │ ╶───────────────────┼────┼────┼────┼────┤
4702 │ No Column ID │ 33│ 35│ 38│ 39│
4703 │ Layer Column ID│ 9│ 11│ 14│ 15│
4704 │ ╶────────────────────────────┼────┼────┼────┼────┤
4705 │ No QN57 Yes Column ID │ 42│ 44│ 46│ 48│
4706 │ Layer Column ID│ 9│ 11│ 14│ 15│
4707 │ ╶───────────────────┼────┼────┼────┼────┤
4708 │ No Column ID │ 42│ 44│ 46│ 48│
4709 │ Layer Column ID│ 9│ 11│ 14│ 15│
4710 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4711 │ No QN61 Yes QN57 Yes Column ID │ 50│ 52│ 53│ 56│
4712 │ Layer Column ID│ 9│ 11│ 14│ 15│
4713 │ ╶───────────────────┼────┼────┼────┼────┤
4714 │ No Column ID │ 50│ 52│ 53│ 56│
4715 │ Layer Column ID│ 9│ 11│ 14│ 15│
4716 │ ╶────────────────────────────┼────┼────┼────┼────┤
4717 │ No QN57 Yes Column ID │ 57│ 59│ 61│ 64│
4718 │ Layer Column ID│ 9│ 11│ 14│ 15│
4719 │ ╶───────────────────┼────┼────┼────┼────┤
4720 │ No Column ID │ 57│ 59│ 61│ 64│
4721 │ Layer Column ID│ 9│ 11│ 14│ 15│
4722 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4726 AT_SETUP([CTABLES categorical summary functions])
4727 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4728 AT_DATA([ctables.sps],
4731 /TABLE region BY qnd5a[COUNT, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, TOTAL[COUNT, VALIDN, TOTALN]]
4732 /CATEGORIES VARIABLES=qnd5a TOTAL=YES MISSING=INCLUDE
4733 /SLABELS POSITION=ROW.
4735 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
4737 ╭─────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────╮
4738 │ │ D5a. What would you say is your primary ethnic background? │
4739 │ ├─────┬───────┬───────┬──────────┬──────────┬─────────┬──────────┬──────────────┬──────┬───────┬─────┤
4740 │ │ │ │ │ │ │ │ │ Multiple - │ │ │ │
4741 │ │ │ │ │ South │ Central │ Puerto │ Something│ cannot choose│ Don't│ │ │
4742 │ │Cuban│Mexican│Spanish│ American │ American │Rican, OR│ else │ one │ know │Refused│Total│
4743 ├─────────────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4744 │Region NE Count │ 6│ 8│ 8│ 11│ 7│ 39│ 23│ 2│ 0│ 1│ 105│
4745 │ Row % │ 5.7%│ 7.6%│ 7.6%│ 10.5%│ 6.7%│ 37.1%│ 21.9%│ 1.9%│ .0%│ 1.0%│ │
4746 │ Row │ 5.8%│ 7.7%│ 7.7%│ 10.6%│ 6.7%│ 37.5%│ 22.1%│ 1.9%│ .0%│ .0%│ │
4747 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
4748 │ % │ │ │ │ │ │ │ │ │ │ │ │
4749 │ Row │ .4%│ .6%│ .6%│ .8%│ .5%│ 2.8%│ 1.6%│ .1%│ .0%│ .1%│ │
4750 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
4751 │ % │ │ │ │ │ │ │ │ │ │ │ │
4752 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 104│
4753 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1409│
4754 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4755 │ MW Count │ 3│ 24│ 1│ 4│ 5│ 9│ 6│ 0│ 0│ 1│ 53│
4756 │ Row % │ 5.7%│ 45.3%│ 1.9%│ 7.5%│ 9.4%│ 17.0%│ 11.3%│ .0%│ .0%│ 1.9%│ │
4757 │ Row │ 5.8%│ 46.2%│ 1.9%│ 7.7%│ 9.6%│ 17.3%│ 11.5%│ .0%│ .0%│ .0%│ │
4758 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
4759 │ % │ │ │ │ │ │ │ │ │ │ │ │
4760 │ Row │ .2%│ 1.5%│ .1%│ .2%│ .3%│ .5%│ .4%│ .0%│ .0%│ .1%│ │
4761 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
4762 │ % │ │ │ │ │ │ │ │ │ │ │ │
4763 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 52│
4764 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1654│
4765 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4766 │ S Count │ 10│ 113│ 11│ 14│ 25│ 23│ 20│ 2│ 3│ 2│ 223│
4767 │ Row % │ 4.5%│ 50.7%│ 4.9%│ 6.3%│ 11.2%│ 10.3%│ 9.0%│ .9%│ 1.3%│ .9%│ │
4768 │ Row │ 4.6%│ 51.8%│ 5.0%│ 6.4%│ 11.5%│ 10.6%│ 9.2%│ .9%│ .0%│ .0%│ │
4769 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
4770 │ % │ │ │ │ │ │ │ │ │ │ │ │
4771 │ Row │ .4%│ 4.7%│ .5%│ .6%│ 1.0%│ 1.0%│ .8%│ .1%│ .1%│ .1%│ │
4772 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
4773 │ % │ │ │ │ │ │ │ │ │ │ │ │
4774 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 218│
4775 │ Total N│ │ │ │ │ │ │ │ │ │ │ 2390│
4776 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4777 │ W Count │ 1│ 166│ 28│ 5│ 15│ 7│ 19│ 3│ 0│ 1│ 245│
4778 │ Row % │ .4%│ 67.8%│ 11.4%│ 2.0%│ 6.1%│ 2.9%│ 7.8%│ 1.2%│ .0%│ .4%│ │
4779 │ Row │ .4%│ 68.0%│ 11.5%│ 2.0%│ 6.1%│ 2.9%│ 7.8%│ 1.2%│ .0%│ .0%│ │
4780 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
4781 │ % │ │ │ │ │ │ │ │ │ │ │ │
4782 │ Row │ .1%│ 10.7%│ 1.8%│ .3%│ 1.0%│ .5%│ 1.2%│ .2%│ .0%│ .1%│ │
4783 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
4784 │ % │ │ │ │ │ │ │ │ │ │ │ │
4785 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 244│
4786 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1546│
4787 ╰─────────────────┴─────┴───────┴───────┴──────────┴──────────┴─────────┴──────────┴──────────────┴──────┴───────┴─────╯
4791 AT_SETUP([CTABLES scale summary functions])
4792 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4793 AT_DATA([ctables.sps],
4797 * Use SPLIT FILE with FREQUENCIES to generate output equivalent to
4798 CTABLES later, to make the results easier to verify.
4799 SPLIT FILE BY REGION.
4802 /STATISTICS=MEAN SEMEAN MEDIAN MODE STDDEV VARIANCE RANGE MINIMUM MAXIMUM SUM
4803 /FORMAT NOTABLE /MISSING=INCLUDE.
4807 /VLABELS VARIABLE=qn19a DISPLAY=NAME /*XXX NONE yields an assertion failure
4808 /TABLE region BY qn19a[VALIDN, MISSING, MEAN, SEMEAN, MEDIAN, MODE, STDDEV, VARIANCE, RANGE, MINIMUM, MAXIMUM, SUM, COUNT, TOTALN, COLPCT.SUM]
4809 /CATEGORIES VARIABLES=qn19a TOTAL=YES MISSING=INCLUDE
4810 /SLABELS POSITION=ROW.
4812 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
4814 ╭────────────────┬────────╮
4816 ├────────────────┼────────┤
4819 │ ╶─────────┼────────┤
4821 │ ╶─────────┼────────┤
4823 │ ╶─────────┼────────┤
4825 │ ╶─────────┼────────┤
4827 │ ╶─────────┼────────┤
4829 │ ╶─────────┼────────┤
4831 │ ╶─────────┼────────┤
4833 │ ╶─────────┼────────┤
4835 │ ╶─────────┼────────┤
4837 │ ╶─────────┼────────┤
4839 ├────────────────┼────────┤
4842 │ ╶─────────┼────────┤
4844 │ ╶─────────┼────────┤
4846 │ ╶─────────┼────────┤
4848 │ ╶─────────┼────────┤
4850 │ ╶─────────┼────────┤
4852 │ ╶─────────┼────────┤
4854 │ ╶─────────┼────────┤
4856 │ ╶─────────┼────────┤
4858 │ ╶─────────┼────────┤
4860 │ ╶─────────┼────────┤
4862 ├────────────────┼────────┤
4865 │ ╶─────────┼────────┤
4867 │ ╶─────────┼────────┤
4869 │ ╶─────────┼────────┤
4871 │ ╶─────────┼────────┤
4873 │ ╶─────────┼────────┤
4875 │ ╶─────────┼────────┤
4877 │ ╶─────────┼────────┤
4879 │ ╶─────────┼────────┤
4881 │ ╶─────────┼────────┤
4883 │ ╶─────────┼────────┤
4885 ├────────────────┼────────┤
4888 │ ╶─────────┼────────┤
4890 │ ╶─────────┼────────┤
4892 │ ╶─────────┼────────┤
4894 │ ╶─────────┼────────┤
4896 │ ╶─────────┼────────┤
4898 │ ╶─────────┼────────┤
4900 │ ╶─────────┼────────┤
4902 │ ╶─────────┼────────┤
4904 │ ╶─────────┼────────┤
4906 │ ╶─────────┼────────┤
4908 ╰────────────────┴────────╯
4911 ╭───────────────────────────┬────────╮
4913 ├───────────────────────────┼────────┤
4914 │REGION NE Valid N │ 936│
4917 │ Std Error of Mean│ .14│
4920 │ Std Deviation │ 4.41│
4928 │ Column Sum % │ 21.8%│
4929 │ ╶────────────────────┼────────┤
4930 │ MW Valid N │ 1019│
4933 │ Std Error of Mean│ .16│
4936 │ Std Deviation │ 5.15│
4944 │ Column Sum % │ 24.3%│
4945 │ ╶────────────────────┼────────┤
4947 │ Missing │ 1114.00│
4949 │ Std Error of Mean│ .18│
4952 │ Std Deviation │ 6.44│
4960 │ Column Sum % │ 31.2%│
4961 │ ╶────────────────────┼────────┤
4965 │ Std Error of Mean│ .17│
4968 │ Std Deviation │ 5.25│
4976 │ Column Sum % │ 22.7%│
4977 ╰───────────────────────────┴────────╯
4982 AT_SETUP([CTABLES hidden scale VLABELS])
4983 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4984 AT_DATA([ctables.sps],
4987 /TABLE region BY qn19a + qn35
4988 /SLABELS POSITION=ROW.
4990 /VLABELS VARIABLE=qn19a DISPLAY=NONE
4991 /TABLE region BY qn19a + qn35
4992 /SLABELS POSITION=ROW.
4994 /VLABELS VARIABLE=qn35 DISPLAY=NONE
4995 /TABLE region BY qn19a + qn35
4996 /SLABELS POSITION=ROW.
4998 * This one in particular caused a crash because no categories were
4999 created on the column axis, so passing in 0 for the index was still
5000 too big for that number of categories. It was fixed by creating a
5001 name-only category for each variable despite the "NONE" request,
5002 then hiding the entire dimension's labels if all its labels were
5005 /VLABELS VARIABLE=qn19a qn35 DISPLAY=NONE
5006 /TABLE region BY qn19a + qn35
5007 /SLABELS POSITION=ROW.
5009 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
5011 ╭──────────────┬────────────────────────────┬─────────────────────────────────╮
5012 │ │ 19a. About how old were you│ 35. In the past thirty days, how│
5013 │ │ when you first starting │ many times have you driven a │
5014 │ │ drinking alcohol, not │ motor vehicle WITHIN TWO HOURS │
5015 │ │ counting small tastes or │ AFTER drinking alcoholic │
5016 │ │ sips of alcohol. │ beverages? │
5017 ├──────────────┼────────────────────────────┼─────────────────────────────────┤
5018 │Region NE Mean│ 19.33│ 2│
5019 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5020 │ MW Mean│ 19.83│ 2│
5021 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5023 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5025 ╰──────────────┴────────────────────────────┴─────────────────────────────────╯
5028 ╭──────────────┬─────┬────────────────────────────────────────────────────────╮
5029 │ │ │ 35. In the past thirty days, how many times have you │
5030 │ │ │ driven a motor vehicle WITHIN TWO HOURS AFTER drinking │
5031 │ │QN19A│ alcoholic beverages? │
5032 ├──────────────┼─────┼────────────────────────────────────────────────────────┤
5033 │Region NE Mean│19.33│ 2│
5034 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5036 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5038 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5040 ╰──────────────┴─────┴────────────────────────────────────────────────────────╯
5043 ╭──────────────┬─────────────────────────────────────────────────────────┬────╮
5044 │ │ 19a. About how old were you when you first starting │ │
5045 │ │ drinking alcohol, not counting small tastes or sips of │ │
5047 ├──────────────┼─────────────────────────────────────────────────────────┼────┤
5048 │Region NE Mean│ 19.33│ 2│
5049 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5050 │ MW Mean│ 19.83│ 2│
5051 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5053 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5055 ╰──────────────┴─────────────────────────────────────────────────────────┴────╯
5058 ╭──────────────┬───────╮
5059 │Region NE Mean│19.33 2│
5066 ╰──────────────┴───────╯
5070 AT_SETUP([CTABLES with SPLIT FILE])
5071 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
5072 AT_DATA([ctables.sps],
5075 SORT CASES BY qns3a.
5077 CTABLES /TABLE qn105ba.
5079 * Layered split has no effect on output.
5080 SPLIT FILE BY qns3a.
5081 CTABLES /TABLE qn105ba.
5083 * Add column variable qns3a to compare against separate splits.
5084 CTABLES /TABLE qn105ba BY qns3a.
5086 * Separate splits are truly output separately.
5087 SPLIT FILE SEPARATE BY qns3a.
5088 CTABLES /TABLE qn105ba.
5090 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
5092 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5094 ├────────────────────────────────────────────────────────────────────────┼─────┤
5095 │105b. How likely is it that drivers who have had too much Almost │ 700│
5096 │to drink to drive safely will A. Get stopped by the police? certain │ │
5097 │ Very likely │ 1502│
5104 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5107 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5109 ├────────────────────────────────────────────────────────────────────────┼─────┤
5110 │105b. How likely is it that drivers who have had too much Almost │ 700│
5111 │to drink to drive safely will A. Get stopped by the police? certain │ │
5112 │ Very likely │ 1502│
5119 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5122 ╭─────────────────────────────────────────────────────────────────┬────────────╮
5128 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
5129 │105b. How likely is it that drivers who have had too Almost │ 297│ 403│
5130 │much to drink to drive safely will A. Get stopped by certain │ │ │
5131 │the police? Very likely │ 660│ 842│
5132 │ Somewhat │ 1174│ 1589│
5134 │ Somewhat │ 640│ 667│
5138 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
5141 ╭────────────┬─────╮
5143 ├────────────┼─────┤
5144 │S3a. GENDER:│Male │
5145 ╰────────────┴─────╯
5148 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5150 ├────────────────────────────────────────────────────────────────────────┼─────┤
5151 │105b. How likely is it that drivers who have had too much Almost │ 297│
5152 │to drink to drive safely will A. Get stopped by the police? certain │ │
5153 │ Very likely │ 660│
5160 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5163 ╭────────────┬──────╮
5165 ├────────────┼──────┤
5166 │S3a. GENDER:│Female│
5167 ╰────────────┴──────╯
5170 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5172 ├────────────────────────────────────────────────────────────────────────┼─────┤
5173 │105b. How likely is it that drivers who have had too much Almost │ 403│
5174 │to drink to drive safely will A. Get stopped by the police? certain │ │
5175 │ Very likely │ 842│
5182 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5186 AT_SETUP([CTABLES variable level inference])
5187 AT_DATA([data.txt], [dnl
5188 dnl n1 has 10 unique small values -> nominal.
5189 dnl n2 has 23 unique small values -> nominal.
5190 dnl n3 is all missing -> nominal.
5191 dnl s1 has 24 unique small values -> scale.
5192 dnl s2 has one negative value -> scale.
5193 dnl s3 has one non-integer value -> scale.
5194 dnl s4 has no valid values less than 10 -> scale.
5195 dnl s5 has no valid values less than 10,000 -> scale.
5196 1 1 . 1 1 1 10 10001
5197 2 2 . 2 2 2 11 10002
5198 3 3 . 3 3 3 12 10003
5199 4 4 . 4 4 4 13 10004
5200 5 5 . 5 5 5 14 10005
5201 6 6 . 6 6 6 15 10006
5202 7 7 . 7 7 7 16 10007
5203 8 8 . 8 8 8 17 10008
5204 9 9 . 9 9 9 18 10009
5205 10 10 . 10 10 10.5 19 110000
5206 1 11 . 11 -1 1 11 10001
5207 2 12 . 12 2 2 12 10002
5208 3 13 . 13 3 3 13 10003
5209 4 14 . 14 4 4 14 10004
5210 5 15 . 15 5 5 15 10005
5211 6 16 . 16 6 6 16 10006
5212 7 17 . 17 7 7 17 10007
5213 8 18 . 18 8 8 18 10008
5214 9 19 . 19 9 9 19 10009
5215 1 20 . 20 1 1 20 10001
5216 2 21 . 21 2 2 21 10002
5217 3 22 . 22 3 3 22 10003
5218 4 23 . 23 4 4 23 10004
5219 5 23 . 24 5 5 24 10005
5220 6 23 . 24 6 6 25 10006
5223 AT_DATA([ctables.sps], [dnl
5224 DATA LIST LIST file='data.txt' NOTABLE /n1 to n3 s1 to s5.
5226 * Nominal formats (copied from data that will default to scale).
5229 FORMATS n4(WKDAY5) n5(MONTH5).
5231 * Scale formats (copied from data that will default to nominal).
5235 FORMATS s6(DOLLAR6.2) s7(CCA8.2) s8(DATETIME17).
5240 CTABLES /TABLE n1 + n2 + n3 + string + s1 + s2 + s3 + s4 + s5.
5244 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
5246 ╭──────┬────────┬──────────────┬─────┬─────┬─────────┬────────────┬────────────╮
5247 │ │ │ Measurement │ │ │ │ │ │
5248 │Name │Position│ Level │ Role│Width│Alignment│Print Format│Write Format│
5249 ├──────┼────────┼──────────────┼─────┼─────┼─────────┼────────────┼────────────┤
5250 │n1 │ 1│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5251 │n2 │ 2│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5252 │n3 │ 3│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5253 │s1 │ 4│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5254 │s2 │ 5│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5255 │s3 │ 6│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5256 │s4 │ 7│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5257 │s5 │ 8│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5258 │n4 │ 9│Unknown │Input│ 8│Right │WKDAY5 │WKDAY5 │
5259 │n5 │ 10│Unknown │Input│ 8│Right │MONTH5 │MONTH5 │
5260 │s6 │ 11│Unknown │Input│ 8│Right │DOLLAR6.2 │DOLLAR6.2 │
5261 │s7 │ 12│Unknown │Input│ 8│Right │CCA8.2 │CCA8.2 │
5262 │s8 │ 13│Unknown │Input│ 8│Right │DATETIME17.0│DATETIME17.0│
5263 │string│ 14│Nominal │Input│ 8│Left │A8 │A8 │
5264 ╰──────┴────────┴──────────────┴─────┴─────┴─────────┴────────────┴────────────╯
5267 ╭────────────┬─────┬────────╮
5269 ├────────────┼─────┼────────┤
5280 ├────────────┼─────┼────────┤
5304 ├────────────┼─────┼────────┤
5306 ├────────────┼─────┼────────┤
5308 ├────────────┼─────┼────────┤
5310 ├────────────┼─────┼────────┤
5312 ├────────────┼─────┼────────┤
5314 ├────────────┼─────┼────────┤
5316 ╰────────────┴─────┴────────╯
5319 ╭──────┬────────┬──────────────┬─────┬─────┬─────────┬────────────┬────────────╮
5320 │ │ │ Measurement │ │ │ │ │ │
5321 │Name │Position│ Level │ Role│Width│Alignment│Print Format│Write Format│
5322 ├──────┼────────┼──────────────┼─────┼─────┼─────────┼────────────┼────────────┤
5323 │n1 │ 1│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5324 │n2 │ 2│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5325 │n3 │ 3│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5326 │s1 │ 4│Scale │Input│ 8│Right │F8.2 │F8.2 │
5327 │s2 │ 5│Scale │Input│ 8│Right │F8.2 │F8.2 │
5328 │s3 │ 6│Scale │Input│ 8│Right │F8.2 │F8.2 │
5329 │s4 │ 7│Scale │Input│ 8│Right │F8.2 │F8.2 │
5330 │s5 │ 8│Scale │Input│ 8│Right │F8.2 │F8.2 │
5331 │n4 │ 9│Nominal │Input│ 8│Right │WKDAY5 │WKDAY5 │
5332 │n5 │ 10│Nominal │Input│ 8│Right │MONTH5 │MONTH5 │
5333 │s6 │ 11│Scale │Input│ 8│Right │DOLLAR6.2 │DOLLAR6.2 │
5334 │s7 │ 12│Scale │Input│ 8│Right │CCA8.2 │CCA8.2 │
5335 │s8 │ 13│Scale │Input│ 8│Right │DATETIME17.0│DATETIME17.0│
5336 │string│ 14│Nominal │Input│ 8│Left │A8 │A8 │
5337 ╰──────┴────────┴──────────────┴─────┴─────┴─────────┴────────────┴────────────╯