3 dnl Features not yet tested:
4 dnl - Summary functions:
5 dnl * WEIGHT and adjustment weights.
6 dnl * details of missing value handling in summaries.
9 dnl - Multiple response sets
10 dnl - MRSETS subcommand.
11 dnl - CATEGORIES: Special case for explicit category specifications and multiple dichotomy sets.
14 dnl - Summary functions:
15 dnl * .LCL and .UCL suffixes.
17 dnl - Summary functions:
18 dnl * )CILEVEL in summary label specification
20 dnl * Data-dependent sorting.
22 AT_SETUP([CTABLES parsing])
23 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
24 AT_DATA([ctables.sps],
27 /FORMAT MINCOLWIDTH=10 MAXCOLWIDTH=20 UNITS=POINTS EMPTY=ZERO MISSING="x"
28 /FORMAT MINCOLWIDTH=DEFAULT MAXCOLWIDTH=DEFAULT UNITS=INCHES EMPTY=BLANK MISSING="."
29 /FORMAT UNITS=CM EMPTY="(-)"
30 /VLABELS VARIABLES=qn1 DISPLAY=DEFAULT
31 /VLABELS VARIABLES=qn17 DISPLAY=NAME
32 /VLABELS VARIABLES=qns3a DISPLAY=LABEL
33 /VLABELS VARIABLES=qnd1 DISPLAY=BOTH
34 /VLABELS VARIABLES=qn20 DISPLAY=NONE
35 /MRSETS COUNTDUPLICATES=NO
36 /MRSETS COUNTDUPLICATES=YES
39 /WEIGHT VARIABLE=qns3a
41 /HIDESMALLCOUNTS COUNT=10
43 /SLABELS POSITION=COLUMN VISIBLE=YES
44 /SLABELS VISIBLE=NO POSITION=ROW
45 /SLABELS POSITION=LAYER
47 /CLABELS ROWLABELS=OPPOSITE
49 /CATEGORIES VARIABLES=qn1 qn17
50 ORDER=A KEY=VALUE MISSING=INCLUDE TOTAL=YES LABEL="xyzzy"
51 POSITION=BEFORE EMPTY=INCLUDE.
52 CTABLES /TABLE qnsa1 /CLABELS ROWLABELS=LAYER.
53 CTABLES /TABLE qnsa1 /CLABELS COLLABELS=OPPOSITE.
54 CTABLES /TABLE qnsa1 /CLABELS COLLABELS=LAYER.
56 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
59 ╭───────────────────┬────┬────╮
61 ├───────────────────┼────┼────┤
62 │Sa1. SAMPLE SOURCE:│5392│1607│
63 ╰───────────────────┴────┴────╯
67 ╭───────────────────┬─────╮
69 ├───────────────────┼─────┤
70 │Sa1. SAMPLE SOURCE:│ 5392│
71 ╰───────────────────┴─────╯
74 ╭────────────────────────┬─────╮
76 ├────────────────────────┼─────┤
77 │Sa1. SAMPLE SOURCE: RDD │ 5392│
79 ╰────────────────────────┴─────╯
82 ╭────────────────────────┬─────╮
84 ├────────────────────────┼─────┤
85 │Sa1. SAMPLE SOURCE: RDD │ 5392│
87 ╰────────────────────────┴─────╯
91 AT_SETUP([CTABLES parsing - negative])
92 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
93 AT_DATA([ctables.sps],
96 CTABLES /FORMAT MINCOLWIDTH='foo'.
97 CTABLES /TABLE qn1 [**].
98 CTABLES /TABLE qn1 [NOTAFUNCTION].
101 CTABLES /TABLE NOTAVAR.
103 CTABLES /TABLE string[S].
104 CTABLES /TABLE qn1 [PTILE 101].
105 CTABLES /TABLE qn1 [MEAN F0.1].
106 CTABLES /TABLE qn1 [MEAN NEGPAREN1.2].
107 CTABLES /TABLE qn1 [MEAN NEGPAREN3.4].
108 CTABLES /TABLE qn1 [MEAN TOTALS].
109 CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
110 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [SUBTOTAL=x].
111 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [LO **].
112 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [LO THRU x].
113 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1 THRU **].
114 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['x' THRU **].
115 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&**].
116 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&x].
117 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=PTILE(qn1, 101).
118 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1.
119 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 KEY=MEAN.
120 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 MISSING=**.
121 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 TOTAL=**.
122 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 LABEL=**.
123 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 POSITION=**.
124 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 EMPTY=**.
125 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 **.
126 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1,2,3] **.
127 CTABLES /PCOMPUTE &k=EXPR(SUBTOTAL[0]).
128 CTABLES /PCOMPUTE &k=EXPR(SUBTOTAL[1**]).
129 CTABLES /PCOMPUTE &k=EXPR([LO **]).
130 CTABLES /PCOMPUTE &k=EXPR([LO THRU **]).
131 CTABLES /PCOMPUTE &k=EXPR([1 THRU **]).
132 CTABLES /PCOMPUTE &k=EXPR([1**]).
133 CTABLES /PCOMPUTE &k=EXPR((1x)).
134 CTABLES /PCOMPUTE **k.
135 CTABLES /PCOMPUTE &1.
136 CTABLES /PCOMPUTE &k**.
137 CTABLES /PCOMPUTE &k=**.
138 CTABLES /PCOMPUTE &k=EXPR**.
139 CTABLES /PCOMPUTE &k=EXPR(1x).
140 CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
141 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k FORMAT=NOTAFUNCTION.
142 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k FORMAT=PTILE **.
143 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k LABEL=**.
144 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k HIDESOURCECATS=**.
145 CTABLES /PCOMPUTE &k=EXPR(1) /PPROPERTIES &k **.
146 CTABLES /FORMAT EMPTY=**.
147 CTABLES /FORMAT MISSING=**.
149 CTABLES /FORMAT MINCOLWIDTH=20 MAXCOLWIDTH=10/.
151 CTABLES /VLABELS VARIABLES=NOTAVAR.
152 CTABLES /VLABELS VARIABLES=qn1 **.
153 CTABLES /VLABELS VARIABLES=qn1 DISPLAY=**.
155 CTABLES /MRSETS COUNTDUPLICATES=**.
156 CTABLES /SMISSING **.
158 CTABLES /WEIGHT VARIABLE=NOTAVAR.
159 CTABLES /HIDESMALLCOUNTS COUNT=1.
161 CTABLES /HIDESMALLCOUNTS COUNT=2.
162 CTABLES /TABLE qn1**.
163 CTABLES /TABLE qn1 /SLABELS POSITION=**.
164 CTABLES /TABLE qn1 /SLABELS VISIBLE=**.
165 CTABLES /TABLE qn1 /SLABELS **.
166 CTABLES /TABLE qn1 /CLABELS ROWLABELS=**.
167 CTABLES /TABLE qn1 /CLABELS COLLABELS=**.
168 CTABLES /TABLE qn1 /CLABELS **.
169 CTABLES /TABLE qn1 /CRITERIA **.
170 CTABLES /TABLE qn1 /CRITERIA CILEVEL=101.
171 CTABLES /TABLE qn1 /TITLES **.
172 CTABLES /TABLE qn1 /SIGTEST TYPE=**.
173 CTABLES /TABLE qn1 /SIGTEST ALPHA=**.
174 CTABLES /TABLE qn1 /SIGTEST INCLUDEMRSETS=**.
175 CTABLES /TABLE qn1 /SIGTEST CATEGORIES=**.
176 CTABLES /TABLE qn1 /SIGTEST **.
177 CTABLES /TABLE qn1 /COMPARETEST TYPE=**.
178 CTABLES /TABLE qn1 /COMPARETEST ALPHA=**.
179 CTABLES /TABLE qn1 /COMPARETEST ALPHA=0,5.
180 CTABLES /TABLE qn1 /COMPARETEST ADJUST=**.
181 CTABLES /TABLE qn1 /COMPARETEST INCLUDEMRSETS=**.
182 CTABLES /TABLE qn1 /COMPARETEST MEANSVARIANCE=**.
183 CTABLES /TABLE qn1 /COMPARETEST CATEGORIES=**.
184 CTABLES /TABLE qn1 /COMPARETEST MERGE=**.
185 CTABLES /TABLE qn1 /COMPARETEST STYLE=**.
186 CTABLES /TABLE qn1 /COMPARETEST SHOWSIG=**.
187 CTABLES /TABLE qn1 /COMPARETEST **.
188 CTABLES /TABLE qn1 / **.
189 CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CLABELS COLLABELS=OPPOSITE.
190 CTABLES /TABLE qn20 > qnd1.
191 CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
192 NUMERIC datetime (DATETIME17.0).
193 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=datetime ['123'].
195 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [1],
196 [[ctables.sps:2.8: error: CTABLES: Syntax error at end of command: expecting `/'.
198 ctables.sps:3.29-3.33: error: CTABLES: Syntax error at `'foo'': Expected non-
199 negative number for MINCOLWIDTH.
201 ctables.sps:4.21-4.22: error: CTABLES: Syntax error at `**': expecting
204 ctables.sps:5.21-5.32: error: CTABLES: Syntax error at `NOTAFUNCTION': Expecting
205 summary function name.
207 ctables.sps:6.20: error: CTABLES: Syntax error at end of command: expecting `@:}@'.
209 ctables.sps:7.16-7.17: error: CTABLES: Syntax error at `**': expecting
212 ctables.sps:8: error: CTABLES: NOTAVAR is not a variable name.
214 ctables.sps:10.16-10.24: error: CTABLES: Cannot use string variable string as a
216 10 | CTABLES /TABLE string[S].
219 ctables.sps:11.27-11.29: error: CTABLES: Syntax error at `101': Expected number
220 between 0 and 100 for PTILE.
222 ctables.sps:12: error: CTABLES: Output format F0.1 specifies width 0, but F
223 requires a width between 1 and 40.
225 ctables.sps:13.26-13.36: error: CTABLES: Syntax error at `NEGPAREN1.2': Output
226 format NEGPAREN requires width 2 or greater.
228 ctables.sps:14.26-14.36: error: CTABLES: Syntax error at `NEGPAREN3.4': Output
229 format NEGPAREN requires width greater than decimals.
231 ctables.sps:15.21-15.24: error: CTABLES: Summary function MEAN applies only to
233 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
236 ctables.sps:15.16-15.18: note: CTABLES: 'QN1' is not a scale variable.
237 15 | CTABLES /TABLE qn1 [MEAN TOTALS].
240 ctables.sps:15.32: error: CTABLES: Syntax error at `@:>@': expecting `@<:@'.
242 ctables.sps:16.21-16.24: error: CTABLES: Summary function MEAN applies only to
244 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
247 ctables.sps:16.16-16.18: note: CTABLES: 'QN1' is not a scale variable.
248 16 | CTABLES /TABLE qn1 [MEAN TOTALS[STDDEV]%].
251 ctables.sps:16.40: error: CTABLES: Syntax error at `%': expecting `@:>@'.
253 ctables.sps:17.56: error: CTABLES: Syntax error at `x': expecting string.
255 ctables.sps:18.50-18.51: error: CTABLES: Syntax error at `**': expecting THRU.
257 ctables.sps:19.55: error: CTABLES: Syntax error at `x': expecting number.
259 ctables.sps:20.54-20.55: error: CTABLES: Syntax error at `**': expecting number.
261 ctables.sps:21.56-21.57: error: CTABLES: Syntax error at `**': expecting string.
263 ctables.sps:22.48-22.49: error: CTABLES: Syntax error at `**': expecting
266 ctables.sps:23.47-23.48: error: CTABLES: Unknown postcompute &x.
267 23 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&x].
270 ctables.sps:24.61-24.63: error: CTABLES: Syntax error at `101': Expected number
271 between 0 and 100 for PTILE.
273 ctables.sps:25.58: error: CTABLES: Syntax error at end of command: expecting
276 ctables.sps:26.54: error: CTABLES: Syntax error at end of command: expecting
279 ctables.sps:27.54-27.55: error: CTABLES: Syntax error at `**': expecting INCLUDE
282 ctables.sps:28.52-28.53: error: CTABLES: Syntax error at `**': expecting YES or
285 ctables.sps:29.52-29.53: error: CTABLES: Syntax error at `**': expecting string.
287 ctables.sps:30.55-30.56: error: CTABLES: Syntax error at `**': expecting BEFORE
290 ctables.sps:31.52-31.53: error: CTABLES: Syntax error at `**': expecting INCLUDE
293 ctables.sps:32.46-32.47: error: CTABLES: Syntax error at `**': expecting ORDER,
294 KEY, MISSING, TOTAL, LABEL, POSITION, or EMPTY.
296 ctables.sps:33.54-33.55: error: CTABLES: Syntax error at `**': expecting TOTAL,
297 LABEL, POSITION, or EMPTY.
299 ctables.sps:34.36: error: CTABLES: Syntax error at `0': Expected positive
300 integer for SUBTOTAL.
302 ctables.sps:35.37-35.38: error: CTABLES: Syntax error at `**': expecting `@:>@'.
304 ctables.sps:36.31-36.32: error: CTABLES: Syntax error at `**': expecting THRU.
306 ctables.sps:37.36-37.37: error: CTABLES: Syntax error at `**': expecting number.
308 ctables.sps:38.35-38.36: error: CTABLES: Syntax error at `**': expecting number.
310 ctables.sps:39.29-39.30: error: CTABLES: Syntax error at `**': expecting `@:>@'.
312 ctables.sps:40.29: error: CTABLES: Syntax error at `x': expecting `@:}@'.
314 ctables.sps:41.19-41.20: error: CTABLES: Syntax error at `**': expecting &.
316 ctables.sps:42.20: error: CTABLES: Syntax error at `1': expecting identifier.
318 ctables.sps:43.21-43.22: error: CTABLES: Syntax error at `**': expecting `='.
320 ctables.sps:44.22-44.23: error: CTABLES: Syntax error at `**': expecting EXPR.
322 ctables.sps:45.26-45.27: error: CTABLES: Syntax error at `**': expecting `('.
324 ctables.sps:46.28: error: CTABLES: Syntax error at `x': expecting `)'.
326 ctables.sps:47.31-47.49: warning: CTABLES: New definition of &k will override
327 the previous definition.
328 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
329 | ^~~~~~~~~~~~~~~~~~~
331 ctables.sps:47.10-47.28: note: CTABLES: This is the previous definition.
332 47 | CTABLES /PCOMPUTE &k=EXPR(1) /PCOMPUTE &k=EXPR(2).
333 | ^~~~~~~~~~~~~~~~~~~
335 ctables.sps:47.50: error: CTABLES: Syntax error at end of command: expecting
338 ctables.sps:48.53-48.64: error: CTABLES: Syntax error at `NOTAFUNCTION':
339 Expecting summary function name.
341 ctables.sps:49.59-49.60: error: CTABLES: Syntax error at `**': Expected number
342 between 0 and 100 for PTILE.
344 ctables.sps:50.52-50.53: error: CTABLES: Syntax error at `**': expecting string.
346 ctables.sps:51.61-51.62: error: CTABLES: Syntax error at `**': expecting YES or
349 ctables.sps:52.46-52.47: error: CTABLES: Syntax error at `**': expecting LABEL,
350 FORMAT, or HIDESOURCECATS.
352 ctables.sps:53.23-53.24: error: CTABLES: Syntax error at `**': expecting string.
354 ctables.sps:54.25-54.26: error: CTABLES: Syntax error at `**': expecting string.
356 ctables.sps:55.17-55.18: error: CTABLES: Syntax error at `**': expecting
357 MINCOLWIDTH, MAXCOLWIDTH, UNITS, EMPTY, or MISSING.
359 ctables.sps:56: error: CTABLES: MINCOLWIDTH must not be greater than
362 ctables.sps:57.18-57.19: error: CTABLES: Syntax error at `**': expecting
365 ctables.sps:58: error: CTABLES: NOTAVAR is not a variable name.
367 ctables.sps:59.32-59.33: error: CTABLES: Syntax error at `**': expecting
370 ctables.sps:60.40-60.41: error: CTABLES: Syntax error at `**': expecting
371 DEFAULT, NAME, LABEL, BOTH, or NONE.
373 ctables.sps:61.17-61.18: error: CTABLES: Syntax error at `**': expecting
376 ctables.sps:62.33-62.34: error: CTABLES: Syntax error at `**': expecting YES or
379 ctables.sps:63.19-63.20: error: CTABLES: Syntax error at `**': expecting
380 VARIABLE or LISTWISE.
382 ctables.sps:64.17-64.18: error: CTABLES: Syntax error at `**': expecting
385 ctables.sps:65: error: CTABLES: NOTAVAR is not a variable name.
387 ctables.sps:66.32: error: CTABLES: Syntax error at `1': Expected integer 2 or
388 greater for HIDESMALLCOUNTS COUNT.
390 ctables.sps:67.10-67.13: error: CTABLES: Syntax error at `QUUX': expecting
391 FORMAT, VLABELS, MRSETS, SMISSING, PCOMPUTE, PPROPERTIES, WEIGHT,
392 HIDESMALLCOUNTS, or TABLE.
394 ctables.sps:68.33: error: CTABLES: Syntax error at end of command: expecting
397 ctables.sps:69.19-69.20: error: CTABLES: Syntax error at `**': expecting `/'.
399 ctables.sps:70.38-70.39: error: CTABLES: Syntax error at `**': expecting COLUMN,
402 ctables.sps:71.37-71.38: error: CTABLES: Syntax error at `**': expecting YES or
405 ctables.sps:72.29-72.30: error: CTABLES: Syntax error at `**': expecting
408 ctables.sps:73.39-73.40: error: CTABLES: Syntax error at `**': expecting
411 ctables.sps:74.39-74.40: error: CTABLES: Syntax error at `**': expecting
414 ctables.sps:75.29-75.30: error: CTABLES: Syntax error at `**': expecting AUTO,
415 ROWLABELS, or COLLABELS.
417 ctables.sps:76.30-76.31: error: CTABLES: Syntax error at `**': expecting
420 ctables.sps:77.38-77.40: error: CTABLES: Syntax error at `101': Expected number
421 in @<:@0,100@:}@ for CILEVEL.
423 ctables.sps:78.28-78.29: error: CTABLES: Syntax error at `**': expecting
424 CAPTION, CORNER, or TITLE.
426 ctables.sps:79.34-79.35: error: CTABLES: Syntax error at `**': expecting
429 ctables.sps:80.35-80.36: error: CTABLES: Syntax error at `**': Expected number
430 in @<:@0,1@:}@ for ALPHA.
432 ctables.sps:81.43-81.44: error: CTABLES: Syntax error at `**': expecting YES or
435 ctables.sps:82.40-82.41: error: CTABLES: Syntax error at `**': expecting
436 ALLVISIBLE or SUBTOTALS.
438 ctables.sps:83.29-83.30: error: CTABLES: Syntax error at `**': expecting TYPE,
439 ALPHA, INCLUDEMRSETS, or CATEGORIES.
441 ctables.sps:84.38-84.39: error: CTABLES: Syntax error at `**': expecting PROP or
444 ctables.sps:85.39-85.40: error: CTABLES: Syntax error at `**': Expected number
447 ctables.sps:86.39: error: CTABLES: Syntax error at `0': Expected number in (0,1)
450 ctables.sps:87.40-87.41: error: CTABLES: Syntax error at `**': expecting
451 BONFERRONI, BH, or NONE.
453 ctables.sps:88.47-88.48: error: CTABLES: Syntax error at `**': expecting YES or
456 ctables.sps:89.47-89.48: error: CTABLES: Syntax error at `**': expecting ALLCATS
459 ctables.sps:90.44-90.45: error: CTABLES: Syntax error at `**': expecting
460 ALLVISIBLE or SUBTOTALS.
462 ctables.sps:91.39-91.40: error: CTABLES: Syntax error at `**': expecting YES or
465 ctables.sps:92.39-92.40: error: CTABLES: Syntax error at `**': expecting APA or
468 ctables.sps:93.41-93.42: error: CTABLES: Syntax error at `**': expecting YES or
471 ctables.sps:94.33-94.34: error: CTABLES: Syntax error at `**': expecting TYPE,
472 ALPHA, ADJUST, INCLUDEMRSETS, MEANSVARIANCE, CATEGORIES, MERGE, STYLE, or
475 ctables.sps:95.22-95.23: error: CTABLES: Syntax error at `**': expecting TABLE,
476 SLABELS, CLABELS, CRITERIA, CATEGORIES, TITLES, SIGTEST, or COMPARETEST.
478 ctables.sps:96: error: CTABLES: ROWLABELS and COLLABELS may not both be
481 ctables.sps:97.16-97.26: error: CTABLES: Cannot nest scale variables.
482 97 | CTABLES /TABLE qn20 > qnd1.
485 ctables.sps:97.16-97.19: note: CTABLES: This is an outer scale variable.
486 97 | CTABLES /TABLE qn20 > qnd1.
489 ctables.sps:97.23-97.26: note: CTABLES: This is an inner scale variable.
490 97 | CTABLES /TABLE qn20 > qnd1.
493 ctables.sps:98.16-98.35: error: CTABLES: Summaries may only be requested for
494 categorical variables at the innermost nesting level.
495 98 | CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
496 | ^~~~~~~~~~~~~~~~~~~~
498 ctables.sps:98.16-98.18: note: CTABLES: This outer categorical variable has a
500 98 | CTABLES /TABLE qn1 [ROWPCT] > qnsa1.
503 ctables.sps:100.52-100.56: error: CTABLES: Failed to parse category
504 specification as format DATETIME: Day (123) must be between 1 and 31..
505 100 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=datetime ['123'].
510 AT_SETUP([CTABLES parsing - more negative])
511 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
512 AT_DATA([ctables.sps],
514 CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
515 CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
516 CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
519 CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['string'].
520 CTABLES /TABLE string /CATEGORIES VARIABLES=string [1].
522 CTABLES /TABLE qn1 /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn1 KEY=MEAN(qn1).
524 CTABLES /TABLE qnd1 /CLABELS ROWLABELS=OPPOSITE.
525 CTABLES /TABLE qn1 + string /CLABELS ROWLABELS=OPPOSITE.
526 CTABLES /TABLE qn1 + qnsa1 /CLABELS ROWLABELS=OPPOSITE.
527 CTABLES /TABLE qn105ba + qn105bb /CLABELS ROWLABELS=OPPOSITE /CATEGORIES VARIABLES=qn105ba [1,2,3].
529 CTABLES /PCOMPUTE &x=EXPR(1**2**3).
530 CTABLES /PCOMPUTE &x=EXPR([**]).
531 CTABLES /PCOMPUTE &x=EXPR(**).
535 CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
537 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [1],
538 [[ctables.sps:2.76-2.78: error: CTABLES: Computed category &pc references a
539 category not included in the category list.
540 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
545 ctables.sps:2.28-2.35: note: CTABLES: This is the missing category.
546 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
550 ctables.sps:2.76-2.79: note: CTABLES: To fix the problem, add subtotals to the
551 list of categories here.
552 2 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
557 ctables.sps:3.73-3.75: error: CTABLES: Computed category &pc references a
558 category not included in the category list.
559 3 | CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1
564 ctables.sps:3.28-3.32: note: CTABLES: This is the missing category.
565 3 | CTABLES /PCOMPUTE &pc=EXPR(TOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1
569 ctables.sps:3: note: CTABLES: To fix the problem, add TOTAL=YES to the
570 variable's CATEGORIES specification.
572 ctables.sps:4.76-4.99: error: CTABLES: These categories include 2 instances of
573 SUBTOTAL or HSUBTOTAL, so references from computed categories must refer to
574 subtotals by position, e.g. SUBTOTAL[1].
575 4 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
576 VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
578 ^~~~~~~~~~~~~~~~~~~~~~~~
580 ctables.sps:4.28-4.35: note: CTABLES: This is the reference that lacks a
582 4 | CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES
583 VARIABLES=qn1 [&pc, SUBTOTAL, SUBTOTAL].
586 ctables.sps:7.47-7.54: error: CTABLES: This category specification may be
587 applied only to string variables, but this subcommand tries to apply it to
588 numeric variable QN1.
589 7 | CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 ['string'].
592 ctables.sps:8.53: error: CTABLES: This category specification may be applied
593 only to numeric variables, but this subcommand tries to apply it to string
595 8 | CTABLES /TABLE string /CATEGORIES VARIABLES=string [1].
598 ctables.sps:10: error: CTABLES: ROWLABELS=OPPOSITE is not allowed with sorting
599 based on a summary function.
601 ctables.sps:12: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
602 moved to be categorical, but qnd1 is a scale variable.
604 ctables.sps:13: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
605 moved to have the same width, but QN1 has width 0 and string has width 8.
607 ctables.sps:14: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
608 moved to have the same value labels, but QN1 and QNSA1 have different value
611 ctables.sps:15: error: CTABLES: ROWLABELS=OPPOSITE requires the variables to be
612 moved to have the same category specifications, but QN105BA and QN105BB have
613 different category specifications.
615 ctables.sps:17.27-17.33: warning: CTABLES: The exponentiation operator (`**') is
616 left-associative: `a**b**c' equals `(a**b)**c', not `a**(b**c)'. To disable
617 this warning, insert parentheses.
618 17 | CTABLES /PCOMPUTE &x=EXPR(1**2**3).
621 ctables.sps:17.35: error: CTABLES: Syntax error at end of command: expecting
624 ctables.sps:18.28-18.29: error: CTABLES: Syntax error at `**'.
626 ctables.sps:19.27-19.28: error: CTABLES: Syntax error at `**'.
628 ctables.sps:21.15: error: CTABLES: Syntax error at end of command: At least one
629 variable must be specified.
631 ctables.sps:23: error: CTABLES: Summaries may appear only on one axis.
633 ctables.sps:23.50-23.54: note: CTABLES: This variable on the layers axis has a
635 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
638 ctables.sps:23.16-23.20: note: CTABLES: This variable on the rows axis has a
640 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
643 ctables.sps:23.33-23.37: note: CTABLES: This variable on the columns axis has a
645 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
648 ctables.sps:23.33-23.37: note: CTABLES: This is a scale variable, so it always
649 has a summary even if the syntax does not explicitly specify one.
650 23 | CTABLES /TABLE qn113 [COUNT] BY qn114 [COUNT] BY qn116 [COUNT].
655 AT_SETUP([CTABLES one categorical variable])
656 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
657 AT_DATA([ctables.sps],
660 CTABLES /TABLE BY qn1.
661 CTABLES /TABLE BY BY qn1.
663 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
665 ╭────────────────────────────────────────────────────────────────────────┬─────╮
667 ├────────────────────────────────────────────────────────────────────────┼─────┤
668 │ 1. How often do you usually drive a car or other Every day │ 4667│
669 │motor vehicle? Several days a week │ 1274│
670 │ Once a week or less │ 361│
671 │ Only certain times a │ 130│
674 ╰────────────────────────────────────────────────────────────────────────┴─────╯
677 ╭──────────────────────────────────────────────────────────────────────────────╮
678 │ 1. How often do you usually drive a car or other motor vehicle? │
679 ├─────────┬──────────────────┬──────────────────┬────────────────────────┬─────┤
680 │ │ Several days a │ Once a week or │ Only certain times a │ │
681 │Every day│ week │ less │ year │Never│
682 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
683 │ Count │ Count │ Count │ Count │Count│
684 ├─────────┼──────────────────┼──────────────────┼────────────────────────┼─────┤
685 │ 4667│ 1274│ 361│ 130│ 540│
686 ╰─────────┴──────────────────┴──────────────────┴────────────────────────┴─────╯
698 AT_SETUP([CTABLES one string variable])
699 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
700 AT_DATA([ctables.sps],
703 MISSING VALUES licensed('DontKnow', 'Refused').
704 RECODE qnd7a(1='Yes')(2='No')(3='DontKnow')(4='Refused') INTO licensed.
705 CTABLES /TABLE licensed.
706 CTABLES /TABLE licensed [COUNT, TOTALS[COUNT, VALIDN]] /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
707 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['Yes', 'No'] TOTAL=YES.
708 * Notice that the string matching is case-sensitive.
709 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['Yes', 'no'] TOTAL=YES.
710 CTABLES /TABLE licensed /CATEGORIES VARIABLES=licensed ['No' THRU 'yes'] TOTAL=YES.
712 /PCOMPUTE ¬yes=EXPR(['No']+['DontKnow']+['Refused'])
713 /PPROPERTIES ¬yes LABEL='Not Yes' HIDESOURCECATS=YES
715 /CATEGORIES VARIABLES=licensed ['Yes', ¬yes, 'No', 'DontKnow', 'Refused'].
717 /PCOMPUTE ¬yes=EXPR(['DontKnow' THRU 'No'] + ['Refused'])
718 /PPROPERTIES ¬yes LABEL='Not Yes' HIDESOURCECATS=YES
720 /CATEGORIES VARIABLES=licensed ['Yes', ¬yes, 'DontKnow' THRU 'No', 'Refused'].
722 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
732 ╭─────────────────┬─────┬───────╮
734 ├─────────────────┼─────┼───────┤
735 │licensed DontKnow│ 4│ │
739 │ Total │ 6999│ 6951│
740 ╰─────────────────┴─────┴───────╯
743 ╭──────────────┬─────╮
745 ├──────────────┼─────┤
746 │licensed Yes │ 6379│
749 ╰──────────────┴─────╯
752 ╭──────────────┬─────╮
754 ├──────────────┼─────┤
755 │licensed Yes │ 6379│
758 ╰──────────────┴─────╯
761 ╭────────────────┬─────╮
763 ├────────────────┼─────┤
768 ╰────────────────┴─────╯
771 ╭────────────────┬─────╮
773 ├────────────────┼─────┤
774 │licensed Yes │ 6379│
776 ╰────────────────┴─────╯
779 ╭────────────────┬─────╮
781 ├────────────────┼─────┤
782 │licensed Yes │ 6379│
784 ╰────────────────┴─────╯
788 AT_SETUP([CTABLES one scale variable])
789 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
790 AT_DATA([ctables.sps],
793 CTABLES /TABLE qnd1[COUNT, VALIDN, TOTALN, MEAN, STDDEV, MINIMUM, MAXIMUM].
794 CTABLES /TABLE BY qnd1.
795 CTABLES /TABLE BY BY qnd1.
797 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
798 Descriptive Statistics
799 ╭──────────────────────────┬────┬─────┬───────┬───────┬───────────╮
800 │ │ N │ Mean│Std Dev│Minimum│ Maximum │
801 ├──────────────────────────┼────┼─────┼───────┼───────┼───────────┤
802 │D1. AGE: What is your age?│6930│48.26│ 19.01│ 16│86 or older│
803 │Valid N (listwise) │6999│ │ │ │ │
804 │Missing N (listwise) │ 69│ │ │ │ │
805 ╰──────────────────────────┴────┴─────┴───────┴───────┴───────────╯
808 ╭──────────────────────┬─────┬───────┬───────┬────┬────────────┬───────┬───────╮
809 │ │ │ │ │ │ Std │ │ │
810 │ │Count│Valid N│Total N│Mean│ Deviation │Minimum│Maximum│
811 ├──────────────────────┼─────┼───────┼───────┼────┼────────────┼───────┼───────┤
812 │D1. AGE: What is your │ 6999│ 6930│ 6999│ 48│ 19│ 16│ 86│
813 │age? │ │ │ │ │ │ │ │
814 ╰──────────────────────┴─────┴───────┴───────┴────┴────────────┴───────┴───────╯
817 ╭──────────────────────────╮
818 │D1. AGE: What is your age?│
819 ├──────────────────────────┤
821 ├──────────────────────────┤
823 ╰──────────────────────────╯
826 D1. AGE: What is your age?
835 AT_SETUP([CTABLES simple stacking])
836 AT_KEYWORDS([stack stacked])
837 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
838 AT_DATA([ctables.sps],
840 CTABLES /TABLE qn105ba + qn105bb + qn105bc + qn105bd BY qns3a [COLPCT PCT8.0].
842 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
844 ╭───────────────────────────────────────────────────────────────┬──────────────╮
851 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
852 │105b. How likely is it that drivers who have had Almost │ 10%│ 11%│
853 │too much to drink to drive safely will A. Get certain │ │ │
854 │stopped by the police? Very likely │ 21%│ 22%│
855 │ Somewhat │ 38%│ 42%│
857 │ Somewhat │ 21%│ 18%│
861 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
862 │105b. How likely is it that drivers who have had Almost │ 14%│ 18%│
863 │too much to drink to drive safely will B. Have an certain │ │ │
864 │accident? Very likely │ 36%│ 45%│
865 │ Somewhat │ 39%│ 32%│
871 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
872 │105b. How likely is it that drivers who have had Almost │ 18%│ 16%│
873 │too much to drink to drive safely will C. Be certain │ │ │
874 │convicted for drunk driving? Very likely │ 32%│ 28%│
875 │ Somewhat │ 27%│ 32%│
877 │ Somewhat │ 15%│ 15%│
881 ├───────────────────────────────────────────────────────────────┼──────┼───────┤
882 │105b. How likely is it that drivers who have had Almost │ 16%│ 16%│
883 │too much to drink to drive safely will D. Be certain │ │ │
884 │arrested for drunk driving? Very likely │ 26%│ 27%│
885 │ Somewhat │ 32%│ 35%│
887 │ Somewhat │ 17%│ 15%│
891 ╰───────────────────────────────────────────────────────────────┴──────┴───────╯
895 AT_SETUP([CTABLES show or hide empty categories])
896 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
897 AT_DATA([ctables.sps],
899 IF (qn105ba = 2) qn105ba = 1.
900 IF (qns3a = 1) qns3a = 2.
901 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0].
902 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
903 /CATEGORIES VAR=qn105ba EMPTY=EXCLUDE.
904 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
905 /CATEGORIES VAR=qns3a EMPTY=EXCLUDE.
906 CTABLES /TABLE qn105ba BY qns3a [COLPCT PCT8.0]
907 /CATEGORIES VAR=ALL EMPTY=EXCLUDE.
909 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
911 ╭──────────────────────────────────────────────────────────────┬───────────────╮
918 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
919 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
920 │too much to drink to drive safely will A. Get certain │ │ │
921 │stopped by the police? Very likely│ .│ 0%│
928 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
931 ╭──────────────────────────────────────────────────────────────┬───────────────╮
938 ├──────────────────────────────────────────────────────────────┼───────┼───────┤
939 │105b. How likely is it that drivers who have had Almost │ .│ 32%│
940 │too much to drink to drive safely will A. Get certain │ │ │
941 │stopped by the police? Somewhat │ .│ 40%│
947 ╰──────────────────────────────────────────────────────────────┴───────┴───────╯
950 ╭────────────────────────────────────────────────────────────────────┬─────────╮
957 ├────────────────────────────────────────────────────────────────────┼─────────┤
958 │105b. How likely is it that drivers who have had too Almost │ 32%│
959 │much to drink to drive safely will A. Get stopped by certain │ │
960 │the police? Very likely │ 0%│
967 ╰────────────────────────────────────────────────────────────────────┴─────────╯
970 ╭────────────────────────────────────────────────────────────────────┬─────────╮
977 ├────────────────────────────────────────────────────────────────────┼─────────┤
978 │105b. How likely is it that drivers who have had too Almost │ 32%│
979 │much to drink to drive safely will A. Get stopped by certain │ │
980 │the police? Somewhat │ 40%│
986 ╰────────────────────────────────────────────────────────────────────┴─────────╯
990 AT_SETUP([CTABLES sorting categories])
991 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
992 AT_DATA([ctables.sps],
994 IF (QND5A=6) QND5A=-1.
995 IF (QND5A=5) QND5A=-2.
996 CTABLES /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=VALUE ORDER=A
997 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=VALUE ORDER=D
998 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=LABEL ORDER=A
999 /TABLE qnd5a /CATEGORIES VARIABLES=qnd5a KEY=LABEL ORDER=D.
1001 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1003 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1005 ├────────────────────────────────────────────────────────────────────────┼─────┤
1006 │D5a. What would you say is your primary ethnic -2.00 │ 52│
1007 │background? -1.00 │ 78│
1011 │ South American │ 34│
1012 │ Central American │ 0│
1013 │ Puerto Rican, OR │ 0│
1014 │ Something else │ 68│
1015 │ Multiple - cannot choose│ 7│
1017 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1020 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1022 ├────────────────────────────────────────────────────────────────────────┼─────┤
1023 │D5a. What would you say is your primary ethnic Multiple - cannot choose│ 7│
1024 │background? one │ │
1025 │ Something else │ 68│
1026 │ Puerto Rican, OR │ 0│
1027 │ Central American │ 0│
1028 │ South American │ 34│
1034 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1037 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1039 ├────────────────────────────────────────────────────────────────────────┼─────┤
1040 │D5a. What would you say is your primary ethnic Central American │ 0│
1041 │background? Cuban │ 20│
1043 │ Multiple - cannot choose│ 7│
1045 │ Puerto Rican, OR │ 0│
1046 │ Something else │ 68│
1047 │ South American │ 34│
1051 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1054 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1056 ├────────────────────────────────────────────────────────────────────────┼─────┤
1057 │D5a. What would you say is your primary ethnic Spanish │ 48│
1058 │background? South American │ 34│
1059 │ Something else │ 68│
1060 │ Puerto Rican, OR │ 0│
1061 │ Multiple - cannot choose│ 7│
1065 │ Central American │ 0│
1068 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1072 AT_SETUP([CTABLES simple nesting])
1073 AT_KEYWORDS([nest nested])
1074 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1075 AT_DATA([ctables.sps],
1077 CTABLES /TABLE (qn105ba + qn105bb + qn105bc + qn105bd) > qns3a [COUNT, TABLEPCT PCT8.0]
1078 /CATEGORIES VARIABLES=qns3a TOTAL=YES.
1079 CTABLES /TABLE qns3a > (qn105ba + qn105bb + qn105bc + qn105bd) [TABLEPCT PCT8.0]
1080 /CATEGORIES VARIABLES=qns3a TOTAL=YES
1081 /CLABELS ROW=OPPOSITE.
1083 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1085 ╭─────────────────────────────────────────────────────────────────┬─────┬──────╮
1088 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1089 │105b. How likely is it that drivers Almost S3a. Male │ 297│ 4%│
1090 │who have had too much to drink to certain GENDER: Female│ 403│ 6%│
1091 │drive safely will A. Get stopped by Total │ 700│ 10%│
1092 │the police? ╶──────────────────────────┼─────┼──────┤
1093 │ Very S3a. Male │ 660│ 10%│
1094 │ likely GENDER: Female│ 842│ 12%│
1095 │ Total │ 1502│ 22%│
1096 │ ╶──────────────────────────┼─────┼──────┤
1097 │ Somewhat S3a. Male │ 1174│ 17%│
1098 │ likely GENDER: Female│ 1589│ 23%│
1099 │ Total │ 2763│ 40%│
1100 │ ╶──────────────────────────┼─────┼──────┤
1101 │ Somewhat S3a. Male │ 640│ 9%│
1102 │ unlikely GENDER: Female│ 667│ 10%│
1103 │ Total │ 1307│ 19%│
1104 │ ╶──────────────────────────┼─────┼──────┤
1105 │ Very S3a. Male │ 311│ 5%│
1106 │ unlikely GENDER: Female│ 298│ 4%│
1108 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1109 │105b. How likely is it that drivers Almost S3a. Male │ 429│ 6%│
1110 │who have had too much to drink to certain GENDER: Female│ 671│ 10%│
1111 │drive safely will B. Have an accident? Total │ 1100│ 16%│
1112 │ ╶──────────────────────────┼─────┼──────┤
1113 │ Very S3a. Male │ 1104│ 16%│
1114 │ likely GENDER: Female│ 1715│ 25%│
1115 │ Total │ 2819│ 41%│
1116 │ ╶──────────────────────────┼─────┼──────┤
1117 │ Somewhat S3a. Male │ 1203│ 17%│
1118 │ likely GENDER: Female│ 1214│ 18%│
1119 │ Total │ 2417│ 35%│
1120 │ ╶──────────────────────────┼─────┼──────┤
1121 │ Somewhat S3a. Male │ 262│ 4%│
1122 │ unlikely GENDER: Female│ 168│ 2%│
1124 │ ╶──────────────────────────┼─────┼──────┤
1125 │ Very S3a. Male │ 81│ 1%│
1126 │ unlikely GENDER: Female│ 59│ 1%│
1128 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1129 │105b. How likely is it that drivers Almost S3a. Male │ 539│ 8%│
1130 │who have had too much to drink to certain GENDER: Female│ 610│ 9%│
1131 │drive safely will C. Be convicted for Total │ 1149│ 17%│
1132 │drunk driving? ╶──────────────────────────┼─────┼──────┤
1133 │ Very S3a. Male │ 988│ 14%│
1134 │ likely GENDER: Female│ 1049│ 15%│
1135 │ Total │ 2037│ 30%│
1136 │ ╶──────────────────────────┼─────┼──────┤
1137 │ Somewhat S3a. Male │ 822│ 12%│
1138 │ likely GENDER: Female│ 1210│ 18%│
1139 │ Total │ 2032│ 30%│
1140 │ ╶──────────────────────────┼─────┼──────┤
1141 │ Somewhat S3a. Male │ 446│ 7%│
1142 │ unlikely GENDER: Female│ 548│ 8%│
1144 │ ╶──────────────────────────┼─────┼──────┤
1145 │ Very S3a. Male │ 268│ 4%│
1146 │ unlikely GENDER: Female│ 354│ 5%│
1148 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1149 │105b. How likely is it that drivers Almost S3a. Male │ 498│ 7%│
1150 │who have had too much to drink to certain GENDER: Female│ 603│ 9%│
1151 │drive safely will D. Be arrested for Total │ 1101│ 16%│
1152 │drunk driving? ╶──────────────────────────┼─────┼──────┤
1153 │ Very S3a. Male │ 805│ 12%│
1154 │ likely GENDER: Female│ 1029│ 15%│
1155 │ Total │ 1834│ 27%│
1156 │ ╶──────────────────────────┼─────┼──────┤
1157 │ Somewhat S3a. Male │ 975│ 14%│
1158 │ likely GENDER: Female│ 1332│ 19%│
1159 │ Total │ 2307│ 34%│
1160 │ ╶──────────────────────────┼─────┼──────┤
1161 │ Somewhat S3a. Male │ 535│ 8%│
1162 │ unlikely GENDER: Female│ 560│ 8%│
1163 │ Total │ 1095│ 16%│
1164 │ ╶──────────────────────────┼─────┼──────┤
1165 │ Very S3a. Male │ 270│ 4%│
1166 │ unlikely GENDER: Female│ 279│ 4%│
1168 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
1171 ╭─────────────────────────────────┬────────┬──────┬─────────┬─────────┬────────╮
1172 │ │ Almost │ Very │ Somewhat│ Somewhat│ Very │
1173 │ │ certain│likely│ likely │ unlikely│unlikely│
1174 │ ├────────┼──────┼─────────┼─────────┼────────┤
1176 │ │ Table %│ % │ Table % │ Table % │ Table %│
1177 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1178 │S3a. Male 105b. How likely │ 4%│ 10%│ 17%│ 9%│ 5%│
1179 │GENDER: is it that drivers│ │ │ │ │ │
1180 │ who have had too │ │ │ │ │ │
1181 │ much to drink to │ │ │ │ │ │
1182 │ drive safely will │ │ │ │ │ │
1183 │ A. Get stopped by │ │ │ │ │ │
1184 │ the police? │ │ │ │ │ │
1185 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1186 │ Female 105b. How likely │ 6%│ 12%│ 23%│ 10%│ 4%│
1187 │ is it that drivers│ │ │ │ │ │
1188 │ who have had too │ │ │ │ │ │
1189 │ much to drink to │ │ │ │ │ │
1190 │ drive safely will │ │ │ │ │ │
1191 │ A. Get stopped by │ │ │ │ │ │
1192 │ the police? │ │ │ │ │ │
1193 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1194 │ Total 105b. How likely │ 10%│ 22%│ 40%│ 19%│ 9%│
1195 │ is it that drivers│ │ │ │ │ │
1196 │ who have had too │ │ │ │ │ │
1197 │ much to drink to │ │ │ │ │ │
1198 │ drive safely will │ │ │ │ │ │
1199 │ A. Get stopped by │ │ │ │ │ │
1200 │ the police? │ │ │ │ │ │
1201 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1202 │S3a. Male 105b. How likely │ 6%│ 16%│ 17%│ 4%│ 1%│
1203 │GENDER: is it that drivers│ │ │ │ │ │
1204 │ who have had too │ │ │ │ │ │
1205 │ much to drink to │ │ │ │ │ │
1206 │ drive safely will │ │ │ │ │ │
1207 │ B. Have an │ │ │ │ │ │
1208 │ accident? │ │ │ │ │ │
1209 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1210 │ Female 105b. How likely │ 10%│ 25%│ 18%│ 2%│ 1%│
1211 │ is it that drivers│ │ │ │ │ │
1212 │ who have had too │ │ │ │ │ │
1213 │ much to drink to │ │ │ │ │ │
1214 │ drive safely will │ │ │ │ │ │
1215 │ B. Have an │ │ │ │ │ │
1216 │ accident? │ │ │ │ │ │
1217 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1218 │ Total 105b. How likely │ 16%│ 41%│ 35%│ 6%│ 2%│
1219 │ is it that drivers│ │ │ │ │ │
1220 │ who have had too │ │ │ │ │ │
1221 │ much to drink to │ │ │ │ │ │
1222 │ drive safely will │ │ │ │ │ │
1223 │ B. Have an │ │ │ │ │ │
1224 │ accident? │ │ │ │ │ │
1225 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1226 │S3a. Male 105b. How likely │ 8%│ 14%│ 12%│ 7%│ 4%│
1227 │GENDER: is it that drivers│ │ │ │ │ │
1228 │ who have had too │ │ │ │ │ │
1229 │ much to drink to │ │ │ │ │ │
1230 │ drive safely will │ │ │ │ │ │
1231 │ C. Be convicted │ │ │ │ │ │
1232 │ for drunk driving?│ │ │ │ │ │
1233 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1234 │ Female 105b. How likely │ 9%│ 15%│ 18%│ 8%│ 5%│
1235 │ is it that drivers│ │ │ │ │ │
1236 │ who have had too │ │ │ │ │ │
1237 │ much to drink to │ │ │ │ │ │
1238 │ drive safely will │ │ │ │ │ │
1239 │ C. Be convicted │ │ │ │ │ │
1240 │ for drunk driving?│ │ │ │ │ │
1241 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1242 │ Total 105b. How likely │ 17%│ 30%│ 30%│ 15%│ 9%│
1243 │ is it that drivers│ │ │ │ │ │
1244 │ who have had too │ │ │ │ │ │
1245 │ much to drink to │ │ │ │ │ │
1246 │ drive safely will │ │ │ │ │ │
1247 │ C. Be convicted │ │ │ │ │ │
1248 │ for drunk driving?│ │ │ │ │ │
1249 ├─────────────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1250 │S3a. Male 105b. How likely │ 7%│ 12%│ 14%│ 8%│ 4%│
1251 │GENDER: is it that drivers│ │ │ │ │ │
1252 │ who have had too │ │ │ │ │ │
1253 │ much to drink to │ │ │ │ │ │
1254 │ drive safely will │ │ │ │ │ │
1255 │ D. Be arrested for│ │ │ │ │ │
1256 │ drunk driving? │ │ │ │ │ │
1257 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1258 │ Female 105b. How likely │ 9%│ 15%│ 19%│ 8%│ 4%│
1259 │ is it that drivers│ │ │ │ │ │
1260 │ who have had too │ │ │ │ │ │
1261 │ much to drink to │ │ │ │ │ │
1262 │ drive safely will │ │ │ │ │ │
1263 │ D. Be arrested for│ │ │ │ │ │
1264 │ drunk driving? │ │ │ │ │ │
1265 │ ╶─────────────────────────┼────────┼──────┼─────────┼─────────┼────────┤
1266 │ Total 105b. How likely │ 16%│ 27%│ 34%│ 16%│ 8%│
1267 │ is it that drivers│ │ │ │ │ │
1268 │ who have had too │ │ │ │ │ │
1269 │ much to drink to │ │ │ │ │ │
1270 │ drive safely will │ │ │ │ │ │
1271 │ D. Be arrested for│ │ │ │ │ │
1272 │ drunk driving? │ │ │ │ │ │
1273 ╰─────────────────────────────────┴────────┴──────┴─────────┴─────────┴────────╯
1277 AT_SETUP([CTABLES nesting and scale variables])
1278 AT_KEYWORDS([nest nested])
1279 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1280 AT_DATA([ctables.sps],
1282 CTABLES /TABLE=qnd1 > qn1 BY qns3a.
1283 CTABLES /TABLE=qnd1 [MINIMUM, MAXIMUM, MEAN] > qns3a > (qn26 + qn27).
1284 CTABLES /TABLE=qnsa1 > qn105ba [COLPCT] BY qns1
1285 /CATEGORIES VAR=qnsa1 EMPTY=EXCLUDE.
1286 CTABLES /TABLE=AgeGroup > qn20 [MEAN F8.1, STDDEV F8.1].
1288 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1290 ╭─────────────────────────────────────────────────────────────────┬────────────╮
1296 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
1297 │D1. AGE: What 1. How often do you usually drive Every day │ 46│ 46│
1298 │is your age? a car or other motor vehicle? Several days a │ 51│ 59│
1300 │ Once a week or │ 44│ 54│
1302 │ Only certain │ 34│ 41│
1303 │ times a year │ │ │
1305 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
1308 ╭─────────────────────────────────────────────────────────┬───────┬───────┬────╮
1309 │ │Minimum│Maximum│Mean│
1310 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
1311 │D1. AGE: S3a. Male 26. During the last 12 Yes│ 16│ 86│ 42│
1312 │What is GENDER: months, has there been a │ │ │ │
1313 │your time when you felt you │ │ │ │
1314 │age? should cut down on your No │ 16│ 86│ 46│
1316 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
1317 │ Female 26. During the last 12 Yes│ 16│ 86│ 43│
1318 │ months, has there been a │ │ │ │
1319 │ time when you felt you │ │ │ │
1320 │ should cut down on your No │ 16│ 86│ 48│
1322 ├─────────────────────────────────────────────────────────┼───────┼───────┼────┤
1323 │D1. AGE: S3a. Male 27. During the last 12 Yes│ 16│ 86│ 38│
1324 │What is GENDER: months, has there been a │ │ │ │
1325 │your time when people criticized No │ 16│ 86│ 46│
1326 │age? your drinking? │ │ │ │
1327 │ ╶───────────────────────────────────────┼───────┼───────┼────┤
1328 │ Female 27. During the last 12 Yes│ 17│ 69│ 37│
1329 │ months, has there been a │ │ │ │
1330 │ time when people criticized No │ 16│ 86│ 48│
1331 │ your drinking? │ │ │ │
1332 ╰─────────────────────────────────────────────────────────┴───────┴───────┴────╯
1335 ╭─────────────────────────────┬────────────────────────────────────────────────╮
1336 │ │S1. Including yourself, how many members of this│
1337 │ │ household are age 16 or older? │
1338 │ ├──────┬──────┬──────┬──────┬──────┬──────┬──────┤
1339 │ │ │ │ │ │ │ │ 6 or │
1340 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
1341 │ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┤
1342 │ │Column│Column│Column│Column│Column│Column│Column│
1343 │ │ % │ % │ % │ % │ % │ % │ % │
1344 ├─────────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
1345 │Sa1. RDD 105b. Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
1346 │SAMPLE How certain │ │ │ │ │ │ │ │
1347 │SOURCE: likely │ │ │ │ │ │ │ │
1348 │ is it Very │ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
1349 │ that likely │ │ │ │ │ │ │ │
1350 │ drivers │ │ │ │ │ │ │ │
1351 │ who have │ │ │ │ │ │ │ │
1352 │ had too Somewhat│ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
1353 │ much to likely │ │ │ │ │ │ │ │
1354 │ drink to │ │ │ │ │ │ │ │
1355 │ drive │ │ │ │ │ │ │ │
1356 │ safely Somewhat│ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
1357 │ will A. unlikely│ │ │ │ │ │ │ │
1358 │ Get │ │ │ │ │ │ │ │
1359 │ stopped Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
1360 │ by the unlikely│ │ │ │ │ │ │ │
1361 │ police? │ │ │ │ │ │ │ │
1362 ╰─────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
1365 ╭──────────────────────────────────────────────────────────────┬────┬──────────╮
1368 ├──────────────────────────────────────────────────────────────┼────┼──────────┤
1369 │Age 16 to 25 20. On how many of the thirty days in this │ 5.2│ 6.0│
1370 │group typical month did you have one or more │ │ │
1371 │ alcoholic beverages to drink? │ │ │
1372 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1373 │ 26 to 35 20. On how many of the thirty days in this │ 4.7│ 5.9│
1374 │ typical month did you have one or more │ │ │
1375 │ alcoholic beverages to drink? │ │ │
1376 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1377 │ 36 to 45 20. On how many of the thirty days in this │ 5.5│ 6.8│
1378 │ typical month did you have one or more │ │ │
1379 │ alcoholic beverages to drink? │ │ │
1380 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1381 │ 46 to 55 20. On how many of the thirty days in this │ 5.8│ 7.7│
1382 │ typical month did you have one or more │ │ │
1383 │ alcoholic beverages to drink? │ │ │
1384 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1385 │ 56 to 65 20. On how many of the thirty days in this │ 6.3│ 8.2│
1386 │ typical month did you have one or more │ │ │
1387 │ alcoholic beverages to drink? │ │ │
1388 │ ╶───────────────────────────────────────────────────────┼────┼──────────┤
1389 │ 66 or 20. On how many of the thirty days in this │ 7.1│ 9.2│
1390 │ older typical month did you have one or more │ │ │
1391 │ alcoholic beverages to drink? │ │ │
1392 ╰──────────────────────────────────────────────────────────────┴────┴──────────╯
1397 AT_SETUP([CTABLES SLABELS])
1398 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1399 AT_DATA([ctables.sps],
1401 CTABLES /TABLE qn1 [COUNT COLPCT].
1402 CTABLES /TABLE qn1 [COUNT COLPCT]
1403 /SLABELS POSITION=ROW.
1404 CTABLES /TABLE qn1 [COUNT COLPCT]
1405 /SLABELS POSITION=ROW VISIBLE=NO.
1407 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1409 ╭────────────────────────────────────────────────────────────────┬─────┬───────╮
1412 ├────────────────────────────────────────────────────────────────┼─────┼───────┤
1413 │ 1. How often do you usually drive a car or Every day │ 4667│ 66.9%│
1414 │other motor vehicle? Several days a week│ 1274│ 18.3%│
1415 │ Once a week or less│ 361│ 5.2%│
1416 │ Only certain times │ 130│ 1.9%│
1418 │ Never │ 540│ 7.7%│
1419 ╰────────────────────────────────────────────────────────────────┴─────┴───────╯
1422 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1423 │ 1. How often do you usually drive a car or Every day Count │ 4667│
1424 │other motor vehicle? Column │66.9%│
1426 │ ╶───────────────────────────┼─────┤
1427 │ Several days a week Count │ 1274│
1430 │ ╶───────────────────────────┼─────┤
1431 │ Once a week or less Count │ 361│
1434 │ ╶───────────────────────────┼─────┤
1435 │ Only certain times Count │ 130│
1436 │ a year Column │ 1.9%│
1438 │ ╶───────────────────────────┼─────┤
1439 │ Never Count │ 540│
1442 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1445 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1446 │ 1. How often do you usually drive a car or other Every day │ 4667│
1447 │motor vehicle? │66.9%│
1448 │ Several days a week │ 1274│
1450 │ Once a week or less │ 361│
1452 │ Only certain times a │ 130│
1456 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1460 AT_SETUP([CTABLES simple totals])
1461 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1462 AT_DATA([ctables.sps],
1465 /CATEGORIES VARIABLES=qn17 TOTAL=YES LABEL='Number responding'.
1466 DESCRIPTIVES qn18/STATISTICS=MEAN.
1467 CTABLES /TABLE=region > qn18 [MEAN, COUNT, VALIDN, TOTALN]
1468 /CATEGORIES VARIABLES=region TOTAL=YES LABEL='All regions'.
1470 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
1472 ╭────────────────────────────────────────────────────────────────────────┬─────╮
1474 ├────────────────────────────────────────────────────────────────────────┼─────┤
1475 │17. When you drink alcoholic beverages, which ONE of OR, something else│ 2│
1476 │the following beverages do you drink MOST OFTEN? Beer │ 1073│
1479 │ Wine coolers │ 137│
1480 │ Hard liquor or │ 888│
1482 │ Flavored malt │ 83│
1484 │ Number responding │ 4221│
1485 ╰────────────────────────────────────────────────────────────────────────┴─────╯
1487 Descriptive Statistics
1488 ╭────────────────────────────────────────────────────────────────────┬────┬────╮
1490 ├────────────────────────────────────────────────────────────────────┼────┼────┤
1491 │18. When you drink ANSWERFROM(QN17R1), about how many │4218│4.62│
1492 │ANSWERFROM(QN17R2) do you usually drink per sitting? │ │ │
1493 │Valid N (listwise) │6999│ │
1494 │Missing N (listwise) │2781│ │
1495 ╰────────────────────────────────────────────────────────────────────┴────┴────╯
1498 ╭──────────────────────────────────────────────────────┬────┬─────┬──────┬─────╮
1499 │ │ │ │ Valid│Total│
1500 │ │Mean│Count│ N │ N │
1501 ├──────────────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1502 │Region NE 18. When you drink ANSWERFROM(QN17R1),│4.36│ 1409│ 949│ 1409│
1503 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1504 │ you usually drink per sitting? │ │ │ │ │
1505 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1506 │ MW 18. When you drink ANSWERFROM(QN17R1),│4.67│ 1654│ 1027│ 1654│
1507 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1508 │ you usually drink per sitting? │ │ │ │ │
1509 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1510 │ S 18. When you drink ANSWERFROM(QN17R1),│4.71│ 2390│ 1287│ 2390│
1511 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1512 │ you usually drink per sitting? │ │ │ │ │
1513 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1514 │ W 18. When you drink ANSWERFROM(QN17R1),│4.69│ 1546│ 955│ 1546│
1515 │ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1516 │ you usually drink per sitting? │ │ │ │ │
1517 │ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
1518 │ All 18. When you drink ANSWERFROM(QN17R1),│4.62│ 6999│ 4218│ 6999│
1519 │ regions about how many ANSWERFROM(QN17R2) do │ │ │ │ │
1520 │ you usually drink per sitting? │ │ │ │ │
1521 ╰──────────────────────────────────────────────────────┴────┴─────┴──────┴─────╯
1525 AT_SETUP([CTABLES subtotals])
1526 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1527 AT_DATA([ctables.sps],
1529 CTABLES /TABLE=qn105ba BY qns1
1530 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
1531 CTABLES /TABLE=qn105ba [COLPCT] BY qns1
1532 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL].
1533 CTABLES /TABLE=qn105ba BY qns1
1534 /CATEGORIES VARIABLES=qn105ba [1, 2, 3, SUBTOTAL, 4, 5, SUBTOTAL]
1535 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, SUBTOTAL].
1537 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1539 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
1540 │ │ S1. Including yourself, how many members of this household │
1541 │ │ are age 16 or older? │
1542 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
1543 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
1544 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1545 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1546 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1547 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
1548 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
1549 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
1550 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
1551 │ likely │ │ │ │ │ │ │ │
1552 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
1553 │ unlikely │ │ │ │ │ │ │ │
1554 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
1555 │ unlikely │ │ │ │ │ │ │ │
1556 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
1559 ╭────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────╮
1560 │ │ S1. Including yourself, how many members of this household │
1561 │ │ are age 16 or older? │
1562 │ ├────────┬────────┬────────┬────────┬───────┬────────┬────────┤
1563 │ │ │ │ │ │ │ │ 6 or │
1564 │ │ None │ 1 │ 2 │ 3 │ 4 │ 5 │ more │
1565 │ ├────────┼────────┼────────┼────────┼───────┼────────┼────────┤
1566 │ │ │ │ │ │ Column│ │ │
1567 │ │Column %│Column %│Column %│Column %│ % │Column %│Column %│
1568 ├────────────────────────────────────────────────────────┼────────┼────────┼────────┼────────┼───────┼────────┼────────┤
1569 │105b. How likely is it that drivers who have Almost │ .│ 9.5%│ 8.2%│ 12.4%│ 9.9%│ 20.0%│ 23.8%│
1570 │had too much to drink to drive safely will certain │ │ │ │ │ │ │ │
1571 │A. Get stopped by the police? Very likely│ .│ 24.9%│ 18.5%│ 24.0%│ 26.6%│ 25.5%│ 33.3%│
1572 │ Somewhat │ .│ 38.3%│ 41.9%│ 38.6%│ 37.5%│ 36.4%│ 23.8%│
1573 │ likely │ │ │ │ │ │ │ │
1574 │ Subtotal │ │ 72.8%│ 68.6%│ 75.0%│ 74.0%│ 81.8%│ 81.0%│
1575 │ Somewhat │ .│ 18.1%│ 21.7%│ 16.8%│ 16.7%│ 10.9%│ 9.5%│
1576 │ unlikely │ │ │ │ │ │ │ │
1577 │ Very │ .│ 9.2%│ 9.7%│ 8.2%│ 9.4%│ 7.3%│ 9.5%│
1578 │ unlikely │ │ │ │ │ │ │ │
1579 │ Subtotal │ │ 27.2%│ 31.4%│ 25.0%│ 26.0%│ 18.2%│ 19.0%│
1580 ╰────────────────────────────────────────────────────────┴────────┴────────┴────────┴────────┴───────┴────────┴────────╯
1583 ╭─────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────╮
1584 │ │ S1. Including yourself, how many members of this household │
1585 │ │ are age 16 or older? │
1586 │ ├───────┬───────┬─────────┬───────┬────────┬──────┬──────────┤
1587 │ │ 1 │ 2 │ Subtotal│ 3 │ 4 │ 5 │ Subtotal │
1588 │ ├───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1589 │ │ Count │ Count │ Count │ Count │ Count │ Count│ Count │
1590 ├─────────────────────────────────────────────────────────┼───────┼───────┼─────────┼───────┼────────┼──────┼──────────┤
1591 │105b. How likely is it that drivers who have Almost │ 147│ 246│ 393│ 62│ 19│ 11│ 92│
1592 │had too much to drink to drive safely will A. certain │ │ │ │ │ │ │ │
1593 │Get stopped by the police? Very likely│ 384│ 552│ 936│ 120│ 51│ 14│ 185│
1594 │ Somewhat │ 590│ 1249│ 1839│ 193│ 72│ 20│ 285│
1595 │ likely │ │ │ │ │ │ │ │
1596 │ Subtotal │ 1121│ 2047│ 3168│ 375│ 142│ 45│ 562│
1597 │ Somewhat │ 278│ 647│ 925│ 84│ 32│ 6│ 122│
1598 │ unlikely │ │ │ │ │ │ │ │
1599 │ Very │ 141│ 290│ 431│ 41│ 18│ 4│ 63│
1600 │ unlikely │ │ │ │ │ │ │ │
1601 │ Subtotal │ 419│ 937│ 1356│ 125│ 50│ 10│ 185│
1602 ╰─────────────────────────────────────────────────────────┴───────┴───────┴─────────┴───────┴────────┴──────┴──────────╯
1606 AT_SETUP([CTABLES PCOMPUTE])
1607 AT_KEYWORDS([postcompute])
1608 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1609 AT_DATA([ctables.sps],
1612 /PCOMPUTE &x=EXPR([3] + [4])
1613 /PCOMPUTE &y=EXPR([4] + [5])
1614 /PPROPERTIES &x LABEL='3+4' FORMAT=COUNT F8.2
1615 /PPROPERTIES &y LABEL=')LABEL[5]+)LABEL[6]'
1616 /TABLE=qn105ba [COUNT, ROWPCT] BY qns1
1617 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, &x, &y, SUBTOTAL] TOTAL=YES
1619 * Adding HIDESOURCECATS=YES for one PPROPERTIES.
1621 /PCOMPUTE &x=EXPR([3] + [4])
1622 /PCOMPUTE &y=EXPR([4] + [5])
1623 /PPROPERTIES &x LABEL='3+4' FORMAT=COUNT F8.2
1624 /PPROPERTIES &y LABEL=')LABEL[5]+)LABEL[6]' HIDESOURCECATS=YES
1625 /TABLE=qn105ba [COUNT, ROWPCT] BY qns1
1626 /CATEGORIES VARIABLES=qns1 [1, 2, SUBTOTAL, 3, 4, 5, &x, &y, SUBTOTAL] TOTAL=YES
1628 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1630 ╭───────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
1631 │ │ S1. Including yourself, how many members of this household are age 16 or older? │
1632 │ ├───────────┬───────────┬───────────┬───────────┬──────────┬──────────┬────────────┬──────────┬───────────┬────────────┤
1633 │ │ 1 │ 2 │ Subtotal │ 3 │ 4 │ 5 │ 3+4 │ 4+5 │ Subtotal │ Total │
1634 │ ├─────┬─────┼─────┬─────┼─────┬─────┼─────┬─────┼─────┬────┼─────┬────┼──────┬─────┼─────┬────┼─────┬─────┼─────┬──────┤
1635 │ │ │ │ │ │ │ │ │ │ │ Row│ │ Row│ │ │ │ Row│ │ │ │ │
1636 │ │Count│Row %│Count│Row %│Count│Row %│Count│Row %│Count│ % │Count│ % │ Count│Row %│Count│ % │Count│Row %│Count│ Row %│
1637 ├───────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼────┼─────┼────┼──────┼─────┼─────┼────┼─────┼─────┼─────┼──────┤
1638 │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%│
1639 │likely is certain │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1640 │it that │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1641 │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%│
1642 │who have likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1643 │had too │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1644 │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%│
1645 │drink to likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1646 │drive │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1647 │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%│
1648 │will A. unlikely│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1649 │Get │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1650 │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%│
1651 │the unlikely│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1652 │police? │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1653 ╰───────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴────┴─────┴────┴──────┴─────┴─────┴────┴─────┴─────┴─────┴──────╯
1656 ╭─────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────╮
1657 │ │ S1. Including yourself, how many members of this household are age 16 or older? │
1658 │ ├───────────┬───────────┬───────────┬───────────┬────────────┬──────────┬───────────┬────────────┤
1659 │ │ 1 │ 2 │ Subtotal │ 3 │ 3+4 │ 4+5 │ Subtotal │ Total │
1660 │ ├─────┬─────┼─────┬─────┼─────┬─────┼─────┬─────┼──────┬─────┼─────┬────┼─────┬─────┼─────┬──────┤
1661 │ │ │ │ │ │ │ │ │ │ │ │ │ Row│ │ │ │ │
1662 │ │Count│Row %│Count│Row %│Count│Row %│Count│Row %│ Count│Row %│Count│ % │Count│Row %│Count│ Row %│
1663 ├─────────────────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼──────┼─────┼─────┼────┼─────┼─────┼─────┼──────┤
1664 │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%│
1665 │drivers who have had too much certain │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1666 │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%│
1667 │A. Get stopped by the police? likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1668 │ 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%│
1669 │ likely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1670 │ 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%│
1671 │ unlikely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1672 │ 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%│
1673 │ unlikely │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1674 ╰─────────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴──────┴─────┴─────┴────┴─────┴─────┴─────┴──────╯
1678 AT_SETUP([CTABLES PCOMPUTE - OTHERNM and MISSING])
1679 AT_KEYWORDS([postcompute])
1680 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1681 AT_DATA([ctables.sps],
1684 /PCOMPUTE &x=EXPR(OTHERNM)
1685 /PCOMPUTE &y=EXPR(MISSING)
1686 /PPROPERTIES &x LABEL='Drivers'
1687 /PPROPERTIES &y LABEL='Missing Values 2'
1689 /CATEGORIES VARIABLES=qn1 [OTHERNM, 5, &x, SUBTOTAL='Valid Values', MISSING, SUBTOTAL='Missing Values', &y]
1691 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1693 ╭──────────────────────────────────────────────────────────────────────────────────────────┬────────────╮
1699 ├──────────────────────────────────────────────────────────────────────────────────────────┼─────┼──────┤
1700 │ 1. How often do you usually drive a car or other motor vehicle? Every day │ 2305│ 2362│
1701 │ Several days a week │ 440│ 834│
1702 │ Once a week or less │ 125│ 236│
1703 │ Only certain times a year│ 58│ 72│
1705 │ Drivers │ 2928│ 3504│
1706 │ Valid Values │ 3120│ 3852│
1707 │ Don't know │ 3│ 5│
1709 │ Missing Values │ 12│ 15│
1710 │ Missing Values 2 │ 12│ 15│
1711 ╰──────────────────────────────────────────────────────────────────────────────────────────┴─────┴──────╯
1715 AT_SETUP([CTABLES PCOMPUTE - THRU])
1716 AT_KEYWORDS([postcompute])
1717 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1718 AT_DATA([ctables.sps],
1721 /PCOMPUTE &x=EXPR([1 THRU 2])
1722 /PCOMPUTE &y=EXPR([3 THRU 4])
1723 /PCOMPUTE &z=EXPR([5] + MISSING)
1724 /PPROPERTIES &x LABEL='Frequent Drivers'
1725 /PPROPERTIES &y LABEL='Infrequent Drivers'
1726 /PPROPERTIES &z LABEL='Not Drivers or Missing'
1728 /CATEGORIES VARIABLES=qn1 [1 THRU 2, &x, 3 THRU 4, &y, SUBTOTAL='Drivers', 5, MISSING, &z]
1730 AT_CHECK([pspp ctables.sps -O box=unicode -O width=140], [0], [dnl
1732 ╭──────────────────────────────────────────────────────────────────────────────────────────┬────────────╮
1738 ├──────────────────────────────────────────────────────────────────────────────────────────┼─────┼──────┤
1739 │ 1. How often do you usually drive a car or other motor vehicle? Every day │ 2305│ 2362│
1740 │ Several days a week │ 440│ 834│
1741 │ Frequent Drivers │ 2745│ 3196│
1742 │ Once a week or less │ 125│ 236│
1743 │ Only certain times a year│ 58│ 72│
1744 │ Infrequent Drivers │ 183│ 308│
1745 │ Drivers │ 2928│ 3504│
1747 │ Don't know │ 3│ 5│
1749 │ Not Drivers or Missing │ 204│ 363│
1750 ╰──────────────────────────────────────────────────────────────────────────────────────────┴─────┴──────╯
1754 dnl I'm not sure that this is the correct behavior (see
1755 dnl https://mail.gnu.org/archive/html/pspp-users/2022-07/msg00002.html)
1756 dnl but at least this test will notify us if the behavior changes.
1757 AT_SETUP([CTABLES intersecting PCOMPUTEs])
1758 AT_KEYWORDS([PCOMPUTE postcompute])
1759 AT_DATA([ctables.sps],
1760 [[DATA LIST LIST NOTABLE/x y z.
1763 VARIABLE LEVEL x y (NOMINAL).
1777 /PCOMPUTE &a = EXPR([1] + [2])
1778 /PCOMPUTE &b = EXPR([2] + [3])
1779 /PCOMPUTE &c = EXPR([4] * [5])
1780 /PCOMPUTE &d = EXPR([5] * [6])
1782 /CATEGORIES VARIABLES=x [1, &a, 2, &b, 3]
1783 /CATEGORIES VARIABLES=y [4, &c, 5, &d, 6].
1785 AT_CHECK([pspp ctables.sps -O box=unicode], [0],
1787 ╭───────────┬─────────────────────────────────────╮
1789 │ ├─────┬─────────┬─────┬─────────┬─────┤
1790 │ │ 4 │[4] * [5]│ 5 │[5] * [6]│ 6 │
1791 │ ├─────┼─────────┼─────┼─────────┼─────┤
1792 │ │Count│ Count │Count│ Count │Count│
1793 ├───────────┼─────┼─────────┼─────┼─────────┼─────┤
1794 │x 1 │ 5│ 10│ 2│ 18│ 9│
1795 │ [1] + [2]│ 7│ .│ 5│ .│ 13│
1796 │ 2 │ 2│ 6│ 3│ 12│ 4│
1797 │ [2] + [3]│ 3│ .│ 9│ .│ 5│
1798 │ 3 │ 1│ 6│ 6│ 6│ 1│
1799 ╰───────────┴─────┴─────────┴─────┴─────────┴─────╯
1803 AT_SETUP([CTABLES string and date and time])
1806 for gender in F M; do
1807 for month in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec; do
1808 for wkday in Sun Mon Tue Wed Thu Fri Sat Sun; do
1809 printf "$weight $gender $month $wkday\n"
1810 weight=$(expr \( $weight + 3 \) % 7 + 2)
1815 AT_DATA([ctables.sps],
1816 [[DATA LIST LIST NOTABLE FILE='ctables.txt'
1817 /w (F5.0) gender (A1) fmon (MONTH3) fday (WKDAY3).
1819 VARIABLE LEVEL w (SCALE).
1820 VARIABLE LEVEL gender fmon fday (NOMINAL).
1823 fmon 'Favorite month'
1824 fday 'Favorite day of the week'.
1825 VALUE LABELS /gender 'M' 'Male' 'F' 'Female'.
1827 /PCOMPUTE &q2 = EXPR(['APR' THRU 'June'])
1828 /PPROPERTIES &q2 LABEL='Q2'
1829 /PCOMPUTE &weekend = EXPR(['sun'] + ['Sat'])
1830 /PPROPERTIES &weekend LABEL='Weekend'
1831 /TABLE fmon BY gender > fday
1832 /CATEGORIES VARIABLES=fmon ['JAN', 'FEB', 'Mar', SUBTOTAL="Q1",
1834 'JUL' THRU 'sep', SUBTOTAL="Q3",
1835 OTHERNM, SUBTOTAL='Q4']
1836 /CATEGORIES VARIABLES=gender ['M', 'F']
1837 /CATEGORIES VARIABLE=fday ['Sun', 2 THRU 6, 'Sat', &weekend] TOTAL=YES
1838 /SLABELS VISIBLE=NO.
1840 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
1842 ╭──────────────────┬───────────────────────────────────────────────────────────────────────────────────╮
1844 │ ├─────────────────────────────────────────┬─────────────────────────────────────────┤
1846 │ ├─────────────────────────────────────────┼─────────────────────────────────────────┤
1847 │ │ Favorite day of the week │ Favorite day of the week │
1848 │ ├───┬───┬───┬───┬───┬───┬───┬───────┬─────┼───┬───┬───┬───┬───┬───┬───┬───────┬─────┤
1849 │ │SUN│MON│TUE│WED│THU│FRI│SAT│Weekend│Total│SUN│MON│TUE│WED│THU│FRI│SAT│Weekend│Total│
1850 ├──────────────────┼───┼───┼───┼───┼───┼───┼───┼───────┼─────┼───┼───┼───┼───┼───┼───┼───┼───────┼─────┤
1851 │Favorite month JAN│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│ 9│ 6│ 4│ 2│ 7│ 5│ 3│ 12│ 36│
1852 │ FEB│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│
1853 │ MAR│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│
1854 │ Q1 │ 32│ 17│ 18│ 12│ 13│ 14│ 15│ │ │ 29│ 12│ 13│ 14│ 15│ 16│ 17│ │ │
1855 │ APR│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│
1856 │ MAY│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│
1857 │ JUN│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│
1858 │ Q2 │ 24│ 13│ 14│ 15│ 16│ 17│ 18│ .│ │ 28│ 15│ 16│ 17│ 18│ 12│ 13│ .│ │
1859 │ JUL│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│
1860 │ AUG│ 10│ 3│ 8│ 6│ 4│ 2│ 7│ 17│ 40│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│
1861 │ SEP│ 6│ 8│ 6│ 4│ 2│ 7│ 5│ 11│ 38│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│
1862 │ Q3 │ 54│ 29│ 31│ 33│ 28│ 30│ 32│ │ │ 62│ 33│ 28│ 30│ 32│ 27│ 29│ │ │
1863 │ OCT│ 16│ 6│ 4│ 2│ 7│ 5│ 3│ 19│ 43│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│
1864 │ NOV│ 12│ 4│ 2│ 7│ 5│ 3│ 8│ 20│ 41│ 4│ 7│ 5│ 3│ 8│ 6│ 4│ 8│ 37│
1865 │ DEC│ 8│ 2│ 7│ 5│ 3│ 8│ 6│ 14│ 39│ 14│ 5│ 3│ 8│ 6│ 4│ 2│ 16│ 42│
1866 │ Q4 │ 36│ 12│ 13│ 14│ 15│ 16│ 17│ │ │ 26│ 14│ 15│ 16│ 17│ 18│ 12│ │ │
1867 ╰──────────────────┴───┴───┴───┴───┴───┴───┴───┴───────┴─────┴───┴───┴───┴───┴───┴───┴───┴───────┴─────╯
1871 AT_SETUP([CTABLES CLABELS])
1872 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
1873 AT_DATA([ctables.sps],
1875 CTABLES /TABLE AgeGroup BY qns3a.
1876 CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=OPPOSITE.
1877 CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=OPPOSITE.
1878 CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=LAYER.
1879 CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=LAYER.
1881 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
1883 ╭───────────────────────┬────────────╮
1889 ├───────────────────────┼─────┼──────┤
1890 │Age group 15 or younger│ 0│ 0│
1891 │ 16 to 25 │ 594│ 505│
1892 │ 26 to 35 │ 476│ 491│
1893 │ 36 to 45 │ 489│ 548│
1894 │ 46 to 55 │ 526│ 649│
1895 │ 56 to 65 │ 516│ 731│
1896 │ 66 or older │ 531│ 943│
1897 ╰───────────────────────┴─────┴──────╯
1900 ╭───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
1902 │ ├──────────────────────────────────────────────────────┬───────────────────────────────────────────────────────┤
1904 │ ├─────────┬───────┬──────┬──────┬──────┬───────┬───────┼──────────┬──────┬───────┬──────┬──────┬──────┬────────┤
1905 │ │ 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 │
1906 │ │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │ younger │ 25 │ 35 │ 45 │ 55 │ 65 │ older │
1907 │ ├─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
1908 │ │ Count │ Count │ Count│ Count│ Count│ Count │ Count │ Count │ Count│ Count │ Count│ Count│ Count│ Count │
1909 ├───────┼─────────┼───────┼──────┼──────┼──────┼───────┼───────┼──────────┼──────┼───────┼──────┼──────┼──────┼────────┤
1910 │Age │ 0│ 594│ 476│ 489│ 526│ 516│ 531│ 0│ 505│ 491│ 548│ 649│ 731│ 943│
1911 │group │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1912 ╰───────┴─────────┴───────┴──────┴──────┴──────┴───────┴───────┴──────────┴──────┴───────┴──────┴──────┴──────┴────────╯
1915 ╭──────────────────────────────┬────────────╮
1919 ├──────────────────────────────┼────────────┤
1920 │Age group 15 or younger Male │ 0│
1922 │ ╶────────────────────┼────────────┤
1923 │ 16 to 25 Male │ 594│
1925 │ ╶────────────────────┼────────────┤
1926 │ 26 to 35 Male │ 476│
1928 │ ╶────────────────────┼────────────┤
1929 │ 36 to 45 Male │ 489│
1931 │ ╶────────────────────┼────────────┤
1932 │ 46 to 55 Male │ 526│
1934 │ ╶────────────────────┼────────────┤
1935 │ 56 to 65 Male │ 516│
1937 │ ╶────────────────────┼────────────┤
1938 │ 66 or older Male │ 531│
1940 ╰──────────────────────────────┴────────────╯
1944 ╭─────────┬────────────╮
1950 ├─────────┼─────┼──────┤
1952 ╰─────────┴─────┴──────╯
1956 ╭─────────┬────────────╮
1962 ├─────────┼─────┼──────┤
1963 │Age group│ 594│ 505│
1964 ╰─────────┴─────┴──────╯
1968 ╭─────────┬────────────╮
1974 ├─────────┼─────┼──────┤
1975 │Age group│ 476│ 491│
1976 ╰─────────┴─────┴──────╯
1980 ╭─────────┬────────────╮
1986 ├─────────┼─────┼──────┤
1987 │Age group│ 489│ 548│
1988 ╰─────────┴─────┴──────╯
1992 ╭─────────┬────────────╮
1998 ├─────────┼─────┼──────┤
1999 │Age group│ 526│ 649│
2000 ╰─────────┴─────┴──────╯
2004 ╭─────────┬────────────╮
2010 ├─────────┼─────┼──────┤
2011 │Age group│ 516│ 731│
2012 ╰─────────┴─────┴──────╯
2016 ╭─────────┬────────────╮
2022 ├─────────┼─────┼──────┤
2023 │Age group│ 531│ 943│
2024 ╰─────────┴─────┴──────╯
2028 ╭───────────────────────┬────────────╮
2032 ├───────────────────────┼────────────┤
2033 │Age group 15 or younger│ 0│
2039 │ 66 or older │ 531│
2040 ╰───────────────────────┴────────────╯
2044 ╭───────────────────────┬────────────╮
2048 ├───────────────────────┼────────────┤
2049 │Age group 15 or younger│ 0│
2055 │ 66 or older │ 943│
2056 ╰───────────────────────┴────────────╯
2060 AT_SETUP([CTABLES missing values])
2061 AT_DATA([ctables.sps],
2062 [[DATA LIST LIST NOTABLE/x y.
2101 MISSING VALUES x (1, 2) y (2, 3).
2102 VARIABLE LEVEL ALL (NOMINAL).
2104 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN,
2105 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
2106 /CATEGORIES VARIABLES=ALL TOTAL=YES.
2107 CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN,
2108 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
2109 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
2110 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2111 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2112 /CATEGORIES VARIABLES=ALL TOTAL=YES
2113 /SLABELS POSITION=ROW.
2114 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2115 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2116 /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE
2117 /SLABELS POSITION=ROW.
2118 CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN,
2119 TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
2120 /CATEGORIES VARIABLES=x [1, 2, 3, 4] TOTAL=YES
2121 /CATEGORIES VARIABLES=y [1, 3, 4, 5] TOTAL=YES
2122 /SLABELS POSITION=ROW.
2124 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
2126 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
2127 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
2128 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
2129 │x 3.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2130 │ 4.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2131 │ 5.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
2132 │ Total│ 18│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
2133 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
2134 dnl Note that Column Total N % doesn't add up to 100 because missing
2135 dnl values are included in the total but not shown as a category and this
2136 dnl is expected behavior.
2139 ╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
2140 │ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
2141 ├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
2142 │x 1.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
2143 │ 2.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
2144 │ 3.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2145 │ 4.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2146 │ 5.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
2147 │ Total│ 30│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
2148 ╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
2149 dnl Note that Column Total N % doesn't add up to 100 because system-missing
2150 dnl values are included in the total but not shown as a category and this
2151 dnl is expected behavior.
2154 ╭────────────────────────┬───────────────────────────╮
2156 │ ├──────┬──────┬──────┬──────┤
2157 │ │ 1.00 │ 4.00 │ 5.00 │ Total│
2158 ├────────────────────────┼──────┼──────┼──────┼──────┤
2159 │x 3.00 Count │ 1│ 1│ 1│ 3│
2160 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2161 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2162 │ Column Total N %│ 33.3%│ 33.3%│ 33.3%│ .│
2163 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2164 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2165 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2166 │ Valid N │ │ │ │ 3│
2167 │ Total N │ │ │ │ 6│
2168 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2169 │ 4.00 Count │ 1│ 1│ 1│ 3│
2170 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2171 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2172 │ Column Total N %│ 33.3%│ 33.3%│ 33.3%│ .│
2173 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2174 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2175 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2176 │ Valid N │ │ │ │ 3│
2177 │ Total N │ │ │ │ 6│
2178 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2179 │ 5.00 Count │ 1│ 1│ 1│ 3│
2180 │ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
2181 │ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
2182 │ Column Total N %│ 33.3%│ 33.3%│ 33.3%│ .│
2183 │ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2184 │ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
2185 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
2186 │ Valid N │ │ │ │ 3│
2187 │ Total N │ │ │ │ 6│
2188 │ ╶──────────────────────┼──────┼──────┼──────┼──────┤
2189 │ Total Count │ 3│ 3│ 3│ 9│
2190 │ Column % │100.0%│100.0%│100.0%│ .│
2191 │ Column Valid N %│100.0%│100.0%│100.0%│ .│
2192 │ Column Total N %│100.0%│100.0%│100.0%│ .│
2193 │ Row % │ .│ .│ .│ .│
2194 │ Row Valid N % │ .│ .│ .│ .│
2195 │ Row Total N % │ .│ .│ .│ .│
2196 │ Valid N │ 3│ 3│ 3│ 9│
2197 │ Total N │ 3│ 3│ 3│ 18│
2198 ╰────────────────────────┴──────┴──────┴──────┴──────╯
2201 ╭────────────────────────┬─────────────────────────────────────────╮
2203 │ ├──────┬──────┬──────┬──────┬──────┬──────┤
2204 │ │ 1.00 │ 2.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
2205 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2206 │x 1.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2207 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2208 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2209 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2210 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2211 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2212 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2213 │ Valid N │ │ │ │ │ │ 3│
2214 │ Total N │ │ │ │ │ │ 6│
2215 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2216 │ 2.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2217 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2218 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2219 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2220 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2221 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2222 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2223 │ Valid N │ │ │ │ │ │ 3│
2224 │ Total N │ │ │ │ │ │ 6│
2225 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2226 │ 3.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2227 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2228 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2229 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2230 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2231 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2232 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2233 │ Valid N │ │ │ │ │ │ 3│
2234 │ Total N │ │ │ │ │ │ 6│
2235 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2236 │ 4.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2237 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2238 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2239 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2240 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2241 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2242 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2243 │ Valid N │ │ │ │ │ │ 3│
2244 │ Total N │ │ │ │ │ │ 6│
2245 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2246 │ 5.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
2247 │ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2248 │ Column Valid N %│ 20.0%│ .│ .│ 20.0%│ 20.0%│ .│
2249 │ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
2250 │ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
2251 │ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
2252 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2253 │ Valid N │ │ │ │ │ │ 3│
2254 │ Total N │ │ │ │ │ │ 6│
2255 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
2256 │ Total Count │ 5│ 5│ 5│ 5│ 5│ 25│
2257 │ Column % │100.0%│100.0%│100.0%│100.0%│100.0%│ .│
2258 │ Column Valid N %│100.0%│ .│ .│100.0%│100.0%│ .│
2259 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│100.0%│ .│
2260 │ Row % │ .│ .│ .│ .│ .│ .│
2261 │ Row Valid N % │ .│ .│ .│ .│ .│ .│
2262 │ Row Total N % │ .│ .│ .│ .│ .│ .│
2263 │ Valid N │ 5│ 0│ 0│ 5│ 5│ 15│
2264 │ Total N │ 5│ 5│ 5│ 5│ 5│ 30│
2265 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────╯
2268 ╭────────────────────────┬──────────────────────────────────╮
2270 │ ├──────┬──────┬──────┬──────┬──────┤
2271 │ │ 1.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
2272 ├────────────────────────┼──────┼──────┼──────┼──────┼──────┤
2273 │x 1.00 Count │ 1│ 1│ 1│ 1│ 4│
2274 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2275 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2276 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2277 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2278 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2279 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2280 │ Valid N │ │ │ │ │ 3│
2281 │ Total N │ │ │ │ │ 6│
2282 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2283 │ 2.00 Count │ 1│ 1│ 1│ 1│ 4│
2284 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2285 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2286 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2287 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2288 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2289 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2290 │ Valid N │ │ │ │ │ 3│
2291 │ Total N │ │ │ │ │ 6│
2292 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2293 │ 3.00 Count │ 1│ 1│ 1│ 1│ 4│
2294 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2295 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2296 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2297 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2298 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2299 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2300 │ Valid N │ │ │ │ │ 3│
2301 │ Total N │ │ │ │ │ 6│
2302 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2303 │ 4.00 Count │ 1│ 1│ 1│ 1│ 4│
2304 │ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2305 │ Column Valid N %│ 25.0%│ .│ 25.0%│ 25.0%│ .│
2306 │ Column Total N %│ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
2307 │ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
2308 │ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
2309 │ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
2310 │ Valid N │ │ │ │ │ 3│
2311 │ Total N │ │ │ │ │ 6│
2312 │ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
2313 │ Total Count │ 4│ 4│ 4│ 4│ 16│
2314 │ Column % │100.0%│100.0%│100.0%│100.0%│ .│
2315 │ Column Valid N %│100.0%│ .│100.0%│100.0%│ .│
2316 │ Column Total N %│100.0%│100.0%│100.0%│100.0%│ .│
2317 │ Row % │ .│ .│ .│ .│ .│
2318 │ Row Valid N % │ .│ .│ .│ .│ .│
2319 │ Row Total N % │ .│ .│ .│ .│ .│
2320 │ Valid N │ 4│ 0│ 4│ 4│ 12│
2321 │ Total N │ 4│ 4│ 4│ 4│ 24│
2322 ╰────────────────────────┴──────┴──────┴──────┴──────┴──────╯
2326 AT_SETUP([CTABLES SMISSING=LISTWISE])
2327 AT_KEYWORDS([SMISSING LISTWISE])
2328 AT_DATA([ctables.sps],
2329 [[DATA LIST LIST NOTABLE/x y z.
2337 VARIABLE LEVEL x (NOMINAL).
2339 CTABLES /TABLE (y + z) > x.
2340 CTABLES /SMISSING LISTWISE /TABLE (y + z) > x.
2342 * The following doesn't come out as listwise because the tables are
2343 separate, not linked by an > operator.
2344 CTABLES /SMISSING LISTWISE /TABLE (y > x) + (z > x).
2346 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
2376 AT_SETUP([CTABLES VLABELS - variables on different axes])
2377 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2378 AT_DATA([ctables.sps],
2380 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=DEFAULT /TABLE qnd5a BY qns3a.
2381 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NAME /TABLE qnd5a BY qns3a.
2382 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=LABEL /TABLE qnd5a BY qns3a.
2383 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=BOTH /TABLE qnd5a BY qns3a.
2384 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a BY qns3a.
2386 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2388 ╭────────────────────────────────────────────────────────────────┬────────────╮
2394 ├────────────────────────────────────────────────────────────────┼─────┼──────┤
2395 │D5a. What would you say is your primary Cuban │ 13│ 7│
2396 │ethnic background? Mexican │ 175│ 136│
2398 │ South American │ 21│ 13│
2399 │ Central American │ 27│ 25│
2400 │ Puerto Rican, OR │ 37│ 41│
2401 │ Something else │ 35│ 33│
2402 │ Multiple - cannot │ 2│ 5│
2404 ╰────────────────────────────────────────────────────────────────┴─────┴──────╯
2407 ╭──────────────────────────────────┬────────────╮
2413 ├──────────────────────────────────┼─────┼──────┤
2414 │QND5A Cuban │ 13│ 7│
2415 │ Mexican │ 175│ 136│
2417 │ South American │ 21│ 13│
2418 │ Central American │ 27│ 25│
2419 │ Puerto Rican, OR │ 37│ 41│
2420 │ Something else │ 35│ 33│
2421 │ Multiple - cannot choose one│ 2│ 5│
2422 ╰──────────────────────────────────┴─────┴──────╯
2425 ╭────────────────────────────────────────────────────────────────┬────────────╮
2431 ├────────────────────────────────────────────────────────────────┼─────┼──────┤
2432 │D5a. What would you say is your primary Cuban │ 13│ 7│
2433 │ethnic background? Mexican │ 175│ 136│
2435 │ South American │ 21│ 13│
2436 │ Central American │ 27│ 25│
2437 │ Puerto Rican, OR │ 37│ 41│
2438 │ Something else │ 35│ 33│
2439 │ Multiple - cannot │ 2│ 5│
2441 ╰────────────────────────────────────────────────────────────────┴─────┴──────╯
2444 ╭────────────────────────────────────────────────────────────┬────────────────╮
2447 │ ├───────┬────────┤
2449 │ ├───────┼────────┤
2451 ├────────────────────────────────────────────────────────────┼───────┼────────┤
2452 │QND5A D5a. What would you say is your Cuban │ 13│ 7│
2453 │primary ethnic background? Mexican │ 175│ 136│
2455 │ South American │ 21│ 13│
2456 │ Central American │ 27│ 25│
2457 │ Puerto Rican, OR │ 37│ 41│
2458 │ Something else │ 35│ 33│
2459 │ Multiple - cannot │ 2│ 5│
2461 ╰────────────────────────────────────────────────────────────┴───────┴────────╯
2464 ╭────────────────────────────┬─────┬──────╮
2468 ├────────────────────────────┼─────┼──────┤
2470 │Mexican │ 175│ 136│
2472 │South American │ 21│ 13│
2473 │Central American │ 27│ 25│
2474 │Puerto Rican, OR │ 37│ 41│
2475 │Something else │ 35│ 33│
2476 │Multiple - cannot choose one│ 2│ 5│
2477 ╰────────────────────────────┴─────┴──────╯
2481 AT_SETUP([CTABLES VLABELS - stacked variables])
2482 AT_KEYWORDS([stack stacking])
2483 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2484 AT_DATA([ctables.sps],
2486 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NAME /TABLE qnd5a + qns3a.
2487 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NAME /TABLE qnd5a + qns3a.
2488 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NONE /TABLE qnd5a + qns3a.
2489 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NONE /TABLE qnd5a + qns3a.
2490 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a + qns3a.
2492 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2494 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2496 ├───────────────────────────────────────────────────────────────────────┼─────┤
2497 │D5a. What would you say is your primary ethnic Cuban │ 20│
2498 │background? Mexican │ 311│
2500 │ South American │ 34│
2501 │ Central American │ 52│
2502 │ Puerto Rican, OR │ 78│
2503 │ Something else │ 68│
2504 │ Multiple - cannot │ 7│
2506 ├───────────────────────────────────────────────────────────────────────┼─────┤
2509 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2512 ╭─────────────────────────────────────────┬─────╮
2514 ├─────────────────────────────────────────┼─────┤
2518 │ South American │ 34│
2519 │ Central American │ 52│
2520 │ Puerto Rican, OR │ 78│
2521 │ Something else │ 68│
2522 │ Multiple - cannot choose one│ 7│
2523 ├─────────────────────────────────────────┼─────┤
2524 │S3a. GENDER: Male │ 3132│
2526 ╰─────────────────────────────────────────┴─────╯
2529 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2531 ├───────────────────────────────────────────────────────────────────────┼─────┤
2532 │D5a. What would you say is your primary ethnic Cuban │ 20│
2533 │background? Mexican │ 311│
2535 │ South American │ 34│
2536 │ Central American │ 52│
2537 │ Puerto Rican, OR │ 78│
2538 │ Something else │ 68│
2539 │ Multiple - cannot │ 7│
2541 ├───────────────────────────────────────────────────────────────────────┼─────┤
2543 ├───────────────────────────────────────────────────────────────────────┼─────┤
2545 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2548 ╭─────────────────────────────┬─────╮
2550 ├─────────────────────────────┼─────┤
2552 ├─────────────────────────────┼─────┤
2554 ├─────────────────────────────┼─────┤
2556 ├─────────────────────────────┼─────┤
2557 │South American │ 34│
2558 ├─────────────────────────────┼─────┤
2559 │Central American │ 52│
2560 ├─────────────────────────────┼─────┤
2561 │Puerto Rican, OR │ 78│
2562 ├─────────────────────────────┼─────┤
2563 │Something else │ 68│
2564 ├─────────────────────────────┼─────┤
2565 │Multiple - cannot choose one │ 7│
2566 ├─────────────────────────────┼─────┤
2567 │S3a. GENDER: Male │ 3132│
2569 ╰─────────────────────────────┴─────╯
2572 ╭────────────────────────────┬─────╮
2574 ├────────────────────────────┼─────┤
2578 │South American │ 34│
2579 │Central American │ 52│
2580 │Puerto Rican, OR │ 78│
2581 │Something else │ 68│
2582 │Multiple - cannot choose one│ 7│
2585 ╰────────────────────────────┴─────╯
2589 AT_SETUP([CTABLES VLABELS - nested variables])
2590 AT_KEYWORDS([nest nesting])
2591 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2592 AT_DATA([ctables.sps],
2594 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NAME /TABLE qnd5a > qns3a.
2595 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NAME /TABLE qnd5a > qns3a.
2596 CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NONE /TABLE qnd5a > qns3a.
2597 CTABLES /VLABELS VARIABLES=qnd5a DISPLAY=NONE /TABLE qnd5a > qns3a.
2598 CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=NONE /TABLE qnd5a > qns3a.
2600 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2602 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2604 ├───────────────────────────────────────────────────────────────────────┼─────┤
2605 │D5a. What would you say is your Cuban QNS3A Male │ 13│
2606 │primary ethnic background? Female│ 7│
2607 │ ╶─────────────────────────────────┼─────┤
2608 │ Mexican QNS3A Male │ 175│
2610 │ ╶─────────────────────────────────┼─────┤
2611 │ Spanish QNS3A Male │ 20│
2613 │ ╶─────────────────────────────────┼─────┤
2614 │ South American QNS3A Male │ 21│
2616 │ ╶─────────────────────────────────┼─────┤
2617 │ Central American QNS3A Male │ 27│
2619 │ ╶─────────────────────────────────┼─────┤
2620 │ Puerto Rican, OR QNS3A Male │ 37│
2622 │ ╶─────────────────────────────────┼─────┤
2623 │ Something else QNS3A Male │ 35│
2625 │ ╶─────────────────────────────────┼─────┤
2626 │ Multiple - cannot QNS3A Male │ 2│
2627 │ choose one Female│ 5│
2628 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2631 ╭──────────────────────────────────────────────────────┬─────╮
2633 ├──────────────────────────────────────────────────────┼─────┤
2634 │QND5A Cuban S3a. GENDER: Male │ 13│
2636 │ ╶────────────────────────────────────────────────┼─────┤
2637 │ Mexican S3a. GENDER: Male │ 175│
2639 │ ╶────────────────────────────────────────────────┼─────┤
2640 │ Spanish S3a. GENDER: Male │ 20│
2642 │ ╶────────────────────────────────────────────────┼─────┤
2643 │ South American S3a. GENDER: Male │ 21│
2645 │ ╶────────────────────────────────────────────────┼─────┤
2646 │ Central American S3a. GENDER: Male │ 27│
2648 │ ╶────────────────────────────────────────────────┼─────┤
2649 │ Puerto Rican, OR S3a. GENDER: Male │ 37│
2651 │ ╶────────────────────────────────────────────────┼─────┤
2652 │ Something else S3a. GENDER: Male │ 35│
2654 │ ╶────────────────────────────────────────────────┼─────┤
2655 │ Multiple - cannot choose one S3a. GENDER: Male │ 2│
2657 ╰──────────────────────────────────────────────────────┴─────╯
2660 ╭───────────────────────────────────────────────────────────────────────┬─────╮
2662 ├───────────────────────────────────────────────────────────────────────┼─────┤
2663 │D5a. What would you say is your primary Cuban Male │ 13│
2664 │ethnic background? Female│ 7│
2665 │ ╶────────────────────────────┼─────┤
2666 │ Mexican Male │ 175│
2668 │ ╶────────────────────────────┼─────┤
2669 │ Spanish Male │ 20│
2671 │ ╶────────────────────────────┼─────┤
2672 │ South American Male │ 21│
2674 │ ╶────────────────────────────┼─────┤
2675 │ Central American Male │ 27│
2677 │ ╶────────────────────────────┼─────┤
2678 │ Puerto Rican, OR Male │ 37│
2680 │ ╶────────────────────────────┼─────┤
2681 │ Something else Male │ 35│
2683 │ ╶────────────────────────────┼─────┤
2684 │ Multiple - cannot Male │ 2│
2685 │ choose one Female│ 5│
2686 ╰───────────────────────────────────────────────────────────────────────┴─────╯
2689 ╭────────────────────────────────────────────────┬─────╮
2691 ├────────────────────────────────────────────────┼─────┤
2692 │Cuban S3a. GENDER: Male │ 13│
2694 ├────────────────────────────────────────────────┼─────┤
2695 │Mexican S3a. GENDER: Male │ 175│
2697 ├────────────────────────────────────────────────┼─────┤
2698 │Spanish S3a. GENDER: Male │ 20│
2700 ├────────────────────────────────────────────────┼─────┤
2701 │South American S3a. GENDER: Male │ 21│
2703 ├────────────────────────────────────────────────┼─────┤
2704 │Central American S3a. GENDER: Male │ 27│
2706 ├────────────────────────────────────────────────┼─────┤
2707 │Puerto Rican, OR S3a. GENDER: Male │ 37│
2709 ├────────────────────────────────────────────────┼─────┤
2710 │Something else S3a. GENDER: Male │ 35│
2712 ├────────────────────────────────────────────────┼─────┤
2713 │Multiple - cannot choose one S3a. GENDER: Male │ 2│
2715 ╰────────────────────────────────────────────────┴─────╯
2718 ╭───────────────────────────────────┬─────╮
2720 ├───────────────────────────────────┼─────┤
2723 ├───────────────────────────────────┼─────┤
2724 │Mexican Male │ 175│
2726 ├───────────────────────────────────┼─────┤
2729 ├───────────────────────────────────┼─────┤
2730 │South American Male │ 21│
2732 ├───────────────────────────────────┼─────┤
2733 │Central American Male │ 27│
2735 ├───────────────────────────────────┼─────┤
2736 │Puerto Rican, OR Male │ 37│
2738 ├───────────────────────────────────┼─────┤
2739 │Something else Male │ 35│
2741 ├───────────────────────────────────┼─────┤
2742 │Multiple - cannot choose one Male │ 2│
2744 ╰───────────────────────────────────┴─────╯
2748 AT_SETUP([CTABLES FORMAT EMPTY])
2749 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2750 AT_DATA([ctables.sps],
2752 CTABLES /FORMAT EMPTY=ZERO /TABLE qnd5a BY qnd5.
2753 CTABLES /FORMAT EMPTY=BLANK /TABLE qnd5a BY qnd5.
2754 CTABLES /FORMAT EMPTY='n/a' /TABLE qnd5a BY qnd5.
2756 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2758 ╭─────────────────────────────────────────────┬───────────────────────────────╮
2759 │ │ D5. ETHNICITY: Are you of │
2760 │ │ Hispanic or Latino origin or │
2762 │ ├───────────────┬───────────────┤
2764 │ ├───────────────┼───────────────┤
2766 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
2767 │D5a. What would you say is Cuban │ 20│ 0│
2768 │your primary ethnic Mexican │ 311│ 0│
2769 │background? Spanish │ 48│ 0│
2770 │ South American │ 34│ 0│
2771 │ Central American│ 52│ 0│
2772 │ Puerto Rican, OR│ 78│ 0│
2773 │ Something else │ 68│ 0│
2774 │ Multiple - │ 7│ 0│
2775 │ cannot choose │ │ │
2777 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
2780 ╭─────────────────────────────────────────────┬───────────────────────────────╮
2781 │ │ D5. ETHNICITY: Are you of │
2782 │ │ Hispanic or Latino origin or │
2784 │ ├───────────────┬───────────────┤
2786 │ ├───────────────┼───────────────┤
2788 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
2789 │D5a. What would you say is Cuban │ 20│ │
2790 │your primary ethnic Mexican │ 311│ │
2791 │background? Spanish │ 48│ │
2792 │ South American │ 34│ │
2793 │ Central American│ 52│ │
2794 │ Puerto Rican, OR│ 78│ │
2795 │ Something else │ 68│ │
2797 │ cannot choose │ │ │
2799 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
2802 ╭─────────────────────────────────────────────┬───────────────────────────────╮
2803 │ │ D5. ETHNICITY: Are you of │
2804 │ │ Hispanic or Latino origin or │
2806 │ ├───────────────┬───────────────┤
2808 │ ├───────────────┼───────────────┤
2810 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
2811 │D5a. What would you say is Cuban │ 20│n/a │
2812 │your primary ethnic Mexican │ 311│n/a │
2813 │background? Spanish │ 48│n/a │
2814 │ South American │ 34│n/a │
2815 │ Central American│ 52│n/a │
2816 │ Puerto Rican, OR│ 78│n/a │
2817 │ Something else │ 68│n/a │
2818 │ Multiple - │ 7│n/a │
2819 │ cannot choose │ │ │
2821 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
2825 AT_SETUP([CTABLES FORMAT MISSING])
2826 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2827 AT_DATA([ctables.sps],
2829 CTABLES /FORMAT MISSING='(no data)' /TABLE qnd5a[COLPCT] BY qnd5.
2831 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2833 ╭─────────────────────────────────────────────┬───────────────────────────────╮
2834 │ │ D5. ETHNICITY: Are you of │
2835 │ │ Hispanic or Latino origin or │
2837 │ ├───────────────┬───────────────┤
2839 │ ├───────────────┼───────────────┤
2840 │ │ Column % │ Column % │
2841 ├─────────────────────────────────────────────┼───────────────┼───────────────┤
2842 │D5a. What would you say is Cuban │ 3.2%│(no data) │
2843 │your primary ethnic Mexican │ 50.3%│(no data) │
2844 │background? Spanish │ 7.8%│(no data) │
2845 │ South American │ 5.5%│(no data) │
2846 │ Central American│ 8.4%│(no data) │
2847 │ Puerto Rican, OR│ 12.6%│(no data) │
2848 │ Something else │ 11.0%│(no data) │
2849 │ Multiple - │ 1.1%│(no data) │
2850 │ cannot choose │ │ │
2852 ╰─────────────────────────────────────────────┴───────────────┴───────────────╯
2856 AT_SETUP([CTABLES HIDESMALLCOUNTS])
2857 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2858 AT_DATA([ctables.sps],
2860 CTABLES /TABLE qn38[c][COUNT, COLPCT].
2861 CTABLES /HIDESMALLCOUNTS /TABLE qn38[c][COUNT, COLPCT].
2862 CTABLES /HIDESMALLCOUNTS COUNT=10 /TABLE qn38[c][COUNT, COLPCT].
2864 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2866 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
2868 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
2869 │38. How many drinks did you have on that Less than one│ 7│ .5%│
2870 │occasion? 1 │ 491│ 34.9%│
2890 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
2893 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
2895 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
2896 │38. How many drinks did you have on that Less than one│ 7│ .5%│
2897 │occasion? 1 │ 491│ 34.9%│
2917 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
2920 ╭──────────────────────────────────────────────────────────────┬─────┬────────╮
2922 ├──────────────────────────────────────────────────────────────┼─────┼────────┤
2923 │38. How many drinks did you have on that Less than one│<10 │ .5%│
2924 │occasion? 1 │ 491│ 34.9%│
2944 ╰──────────────────────────────────────────────────────────────┴─────┴────────╯
2948 AT_SETUP([CTABLES FORMAT MINCOLWIDTH MAXCOLWIDTH])
2949 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2950 AT_DATA([ctables.sps],
2952 CTABLES /FORMAT MINCOLWIDTH=1 MAXCOLWIDTH=2 UNITS=INCHES /TABLE BY qns3a.
2954 AT_CHECK([pspp ctables.sps -o - -O box=unicode -o pspp.spv], [0], [dnl
2966 AT_CHECK([pspp-output get-table-look pspp.spv pspp.stt])
2967 AT_CHECK([sed 's/ /\n/g' pspp.stt | grep ColumnWidth | sort], [0], [dnl
2968 maximumColumnWidth="192"
2969 minimumColumnWidth="96"
2973 AT_SETUP([CTABLES special formats])
2974 AT_KEYWORDS([NEGPAREN NEQUAL PAREN PCTPAREN])
2975 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2976 AT_DATA([ctables.sps],
2978 COMPUTE x = qnd3 - 4.
2979 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].
2981 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
2983 ╭─┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────╮
2984 │ │Minimum│Minimum│Minimum│Minimum│Maximum│Maximum│Maximum│Maximum│
2985 ├─┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
2986 │x│(3.0) │N=-3.0 │(-3.0) │(-3.0%)│8.0 │N=8.0 │(8.0) │(8.0%) │
2987 ╰─┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────╯
2991 AT_SETUP([CTABLES TITLES])
2992 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
2993 AT_DATA([ctables.sps],
2996 /VLABELS VARIABLES=qn1 DISPLAY=NONE
2997 /TABLE ((qn1[c][COUNT])) BY qns3a[c] > qnd5
2998 /TITLES TITLE='How often do you drive?'
2999 CAPTION='Generated )TIME on )DATE'
3002 AT_CHECK([pspp ctables.sps -O box=unicode | sed 's/..:..:../HH:MM:SS/
3003 s&../../..&MM/DD/YY&'], [0], [dnl
3004 How often do you drive?
3005 ╭───────────────────────────────────┬─────────────────────────────────────────╮
3007 │ ├────────────────────┬────────────────────┤
3009 │ ├────────────────────┼────────────────────┤
3010 │ │ D5. ETHNICITY: Are │ D5. ETHNICITY: Are │
3011 │ │ you of Hispanic or │ you of Hispanic or │
3012 │ │ Latino origin or │ Latino origin or │
3013 │( ( 1. How often do you usually │ descent? │ descent? │
3014 │drive a car or other motor ├─────────┬──────────┼─────────┬──────────┤
3015 │vehicle?) ) BY S3a. GENDER: > D5. │ Yes │ No │ Yes │ No │
3016 │ETHNICITY: Are you of Hispanic or ├─────────┼──────────┼─────────┼──────────┤
3017 │Latino origin or descent? │ Count │ Count │ Count │ Count │
3018 ├───────────────────────────────────┼─────────┼──────────┼─────────┼──────────┤
3019 │Every day │ 218│ 2066│ 166│ 2175│
3020 │Several days a week │ 44│ 391│ 45│ 782│
3021 │Once a week or less │ 16│ 109│ 12│ 223│
3022 │Only certain times a year │ 15│ 41│ 11│ 61│
3023 │Never │ 39│ 150│ 56│ 278│
3024 ╰───────────────────────────────────┴─────────┴──────────┴─────────┴──────────╯
3025 Generated HH:MM:SS on MM/DD/YY
3029 AT_SETUP([CTABLES area definitions])
3030 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3031 AT_DATA([ctables.sps],
3034 /VLABELS VARIABLES=ALL DISPLAY=NAME
3035 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3036 /SLABELS POSITION=ROW
3037 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[ROWID, LAYERROWID]
3038 /SLABELS POSITION=ROW
3039 /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[COLID, LAYERCOLID]
3040 /SLABELS POSITION=ROW.
3042 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=80], [0], [dnl
3045 ╭─────────────────────────────┬─────────────┬──────╮
3047 │ ├──────┬──────┼───┬──┤
3049 │ ├──────┼──────┤ │ │
3050 │ │ QN86 │ QN86 │ │ │
3051 │ ├───┬──┼───┬──┤ │ │
3052 │ │Yes│No│Yes│No│Yes│No│
3053 ├─────────────────────────────┼───┼──┼───┼──┼───┼──┤
3054 │QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3055 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3056 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│
3057 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3058 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3059 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3060 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│
3061 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┤
3062 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3063 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3064 │ Subtable ID│ 4│ 4│ 5│ 5│ 6│ 6│
3065 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3066 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3067 │ Layer ID │ 1│ 1│ 1│ 1│ 2│ 2│
3068 │ Subtable ID│ 4│ 4│ 5│ 5│ 6│ 6│
3069 ╰─────────────────────────────┴───┴──┴───┴──┴───┴──╯
3073 ╭─────────────────────────────┬─────────────┬──────╮
3075 │ ├──────┬──────┼───┬──┤
3077 │ ├──────┼──────┤ │ │
3078 │ │ QN86 │ QN86 │ │ │
3079 │ ├───┬──┼───┬──┤ │ │
3080 │ │Yes│No│Yes│No│Yes│No│
3081 ├─────────────────────────────┼───┼──┼───┼──┼───┼──┤
3082 │QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3083 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3084 │ Subtable ID│ 7│ 7│ 8│ 8│ 9│ 9│
3085 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3086 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3087 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3088 │ Subtable ID│ 7│ 7│ 8│ 8│ 9│ 9│
3089 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┤
3090 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3091 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3092 │ Subtable ID│ 10│10│ 11│11│ 12│12│
3093 │ ╶───────────────┼───┼──┼───┼──┼───┼──┤
3094 │ No Table ID │ 1│ 1│ 1│ 1│ 2│ 2│
3095 │ Layer ID │ 3│ 3│ 3│ 3│ 4│ 4│
3096 │ Subtable ID│ 10│10│ 11│11│ 12│12│
3097 ╰─────────────────────────────┴───┴──┴───┴──┴───┴──╯
3101 ╭──────────────────────────────┬─────────────┬──────╮
3103 │ ├──────┬──────┼───┬──┤
3105 │ ├──────┼──────┤ │ │
3106 │ │ QN86 │ QN86 │ │ │
3107 │ ├───┬──┼───┬──┤ │ │
3108 │ │Yes│No│Yes│No│Yes│No│
3109 ├──────────────────────────────┼───┼──┼───┼──┼───┼──┤
3110 │QN61 Yes QN57 Yes Row ID │ 1│ 1│ 2│ 2│ 3│ 3│
3111 │ Layer Row ID│ 1│ 1│ 1│ 1│ 2│ 2│
3112 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3113 │ No Row ID │ 4│ 4│ 5│ 5│ 6│ 6│
3114 │ Layer Row ID│ 3│ 3│ 3│ 3│ 4│ 4│
3115 │ ╶─────────────────────────┼───┼──┼───┼──┼───┼──┤
3116 │ No QN57 Yes Row ID │ 7│ 7│ 8│ 8│ 9│ 9│
3117 │ Layer Row ID│ 5│ 5│ 5│ 5│ 6│ 6│
3118 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3119 │ No Row ID │ 10│10│ 11│11│ 12│12│
3120 │ Layer Row ID│ 7│ 7│ 7│ 7│ 8│ 8│
3121 ╰──────────────────────────────┴───┴──┴───┴──┴───┴──╯
3125 ╭──────────────────────────────┬─────────────┬──────╮
3127 │ ├──────┬──────┼───┬──┤
3129 │ ├──────┼──────┤ │ │
3130 │ │ QN86 │ QN86 │ │ │
3131 │ ├───┬──┼───┬──┤ │ │
3132 │ │Yes│No│Yes│No│Yes│No│
3133 ├──────────────────────────────┼───┼──┼───┼──┼───┼──┤
3134 │QN61 Yes QN57 Yes Row ID │ 13│13│ 14│14│ 15│15│
3135 │ Layer Row ID│ 9│ 9│ 9│ 9│ 10│10│
3136 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3137 │ No Row ID │ 16│16│ 17│17│ 18│18│
3138 │ Layer Row ID│ 11│11│ 11│11│ 12│12│
3139 │ ╶─────────────────────────┼───┼──┼───┼──┼───┼──┤
3140 │ No QN57 Yes Row ID │ 19│19│ 20│20│ 21│21│
3141 │ Layer Row ID│ 13│13│ 13│13│ 14│14│
3142 │ ╶────────────────┼───┼──┼───┼──┼───┼──┤
3143 │ No Row ID │ 22│22│ 23│23│ 24│24│
3144 │ Layer Row ID│ 15│15│ 15│15│ 16│16│
3145 ╰──────────────────────────────┴───┴──┴───┴──┴───┴──╯
3149 ╭─────────────────────────────────┬─────────────┬──────╮
3151 │ ├──────┬──────┼───┬──┤
3153 │ ├──────┼──────┤ │ │
3154 │ │ QN86 │ QN86 │ │ │
3155 │ ├───┬──┼───┬──┤ │ │
3156 │ │Yes│No│Yes│No│Yes│No│
3157 ├─────────────────────────────────┼───┼──┼───┼──┼───┼──┤
3158 │QN61 Yes QN57 Yes Column ID │ 1│ 2│ 3│ 4│ 5│ 6│
3159 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3160 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3161 │ No Column ID │ 1│ 2│ 3│ 4│ 5│ 6│
3162 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3163 │ ╶────────────────────────────┼───┼──┼───┼──┼───┼──┤
3164 │ No QN57 Yes Column ID │ 7│ 8│ 9│10│ 11│12│
3165 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3166 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3167 │ No Column ID │ 7│ 8│ 9│10│ 11│12│
3168 │ Layer Column ID│ 1│ 2│ 3│ 4│ 5│ 6│
3169 ╰─────────────────────────────────┴───┴──┴───┴──┴───┴──╯
3173 ╭─────────────────────────────────┬─────────────┬──────╮
3175 │ ├──────┬──────┼───┬──┤
3177 │ ├──────┼──────┤ │ │
3178 │ │ QN86 │ QN86 │ │ │
3179 │ ├───┬──┼───┬──┤ │ │
3180 │ │Yes│No│Yes│No│Yes│No│
3181 ├─────────────────────────────────┼───┼──┼───┼──┼───┼──┤
3182 │QN61 Yes QN57 Yes Column ID │ 13│14│ 15│16│ 17│18│
3183 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3184 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3185 │ No Column ID │ 13│14│ 15│16│ 17│18│
3186 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3187 │ ╶────────────────────────────┼───┼──┼───┼──┼───┼──┤
3188 │ No QN57 Yes Column ID │ 19│20│ 21│22│ 23│24│
3189 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3190 │ ╶───────────────────┼───┼──┼───┼──┼───┼──┤
3191 │ No Column ID │ 19│20│ 21│22│ 23│24│
3192 │ Layer Column ID│ 7│ 8│ 9│10│ 11│12│
3193 ╰─────────────────────────────────┴───┴──┴───┴──┴───┴──╯
3197 AT_SETUP([CTABLES area definitions with CLABELS ROWLABELS=OPPOSITE])
3198 AT_KEYWORDS([ROWLABELS OPPOSITE])
3199 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3200 AT_DATA([ctables.sps],
3203 /VLABELS VARIABLES=ALL DISPLAY=NAME
3204 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3205 /SLABELS POSITION=ROW
3206 /CLABELS ROWLABELS=OPPOSITE
3207 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3208 /SLABELS POSITION=ROW
3209 /CLABELS ROWLABELS=OPPOSITE
3210 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3211 /SLABELS POSITION=ROW
3212 /CLABELS ROWLABELS=OPPOSITE.
3214 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3217 ╭──────────────────────────────────┬───────────────────────────────────────────────────────╮
3219 │ ├───────────────────────────┬───────────────────────────┤
3221 │ ├───────────────────────────┼───────────────────────────┤
3223 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3224 │ │ Yes │ No │ Yes │ No │
3225 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3226 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3227 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3228 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3229 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3230 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3231 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3232 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3233 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3234 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3235 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3236 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3237 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3238 │ Subtable ID│ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3239 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3240 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3241 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3242 │ Subtable ID│ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3243 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3244 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3245 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3246 │ Subtable ID│ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3247 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3251 ╭──────────────────────────────────┬───────────────────────────────────────────────────────╮
3253 │ ├───────────────────────────┬───────────────────────────┤
3255 │ ├───────────────────────────┼───────────────────────────┤
3257 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3258 │ │ Yes │ No │ Yes │ No │
3259 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3260 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3261 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3262 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3263 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3264 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3265 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3266 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3267 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3268 │ Subtable ID│ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3269 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3270 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3271 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3272 │ Subtable ID│ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3273 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3274 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3275 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3276 │ Subtable ID│ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3277 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3278 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3279 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3280 │ Subtable ID│ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3281 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3285 ╭───────────────────────────────────┬───────────────────────────────────────────────────────╮
3287 │ ├───────────────────────────┬───────────────────────────┤
3289 │ ├───────────────────────────┼───────────────────────────┤
3291 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3292 │ │ Yes │ No │ Yes │ No │
3293 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3294 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3295 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3296 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3297 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3298 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3299 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3300 │QN26 Yes QN61 Yes QN57 Row ID │ 1│ 1│ 2│ 2│ 3│ 3│ 4│ 4│ 5│ 5│ 6│ 6│ 7│ 7│ 8│ 8│
3301 │ Layer Row ID│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3302 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3303 │ No QN57 Row ID │ 9│ 9│ 10│10│ 11│11│ 12│12│ 13│13│ 14│14│ 15│15│ 16│16│
3304 │ Layer Row ID│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3305 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3306 │ No QN61 Yes QN57 Row ID │ 17│17│ 18│18│ 19│19│ 20│20│ 21│21│ 22│22│ 23│23│ 24│24│
3307 │ Layer Row ID│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3308 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3309 │ No QN57 Row ID │ 25│25│ 26│26│ 27│27│ 28│28│ 29│29│ 30│30│ 31│31│ 32│32│
3310 │ Layer Row ID│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3311 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3315 ╭───────────────────────────────────┬───────────────────────────────────────────────────────╮
3317 │ ├───────────────────────────┬───────────────────────────┤
3319 │ ├───────────────────────────┼───────────────────────────┤
3321 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3322 │ │ Yes │ No │ Yes │ No │
3323 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3324 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3325 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3326 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3327 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3328 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3329 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3330 │QN26 Yes QN61 Yes QN57 Row ID │ 33│33│ 34│34│ 35│35│ 36│36│ 37│37│ 38│38│ 39│39│ 40│40│
3331 │ Layer Row ID│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│
3332 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3333 │ No QN57 Row ID │ 41│41│ 42│42│ 43│43│ 44│44│ 45│45│ 46│46│ 47│47│ 48│48│
3334 │ Layer Row ID│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│
3335 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3336 │ No QN61 Yes QN57 Row ID │ 49│49│ 50│50│ 51│51│ 52│52│ 53│53│ 54│54│ 55│55│ 56│56│
3337 │ Layer Row ID│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│
3338 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3339 │ No QN57 Row ID │ 57│57│ 58│58│ 59│59│ 60│60│ 61│61│ 62│62│ 63│63│ 64│64│
3340 │ Layer Row ID│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│
3341 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3345 ╭──────────────────────────────────────┬───────────────────────────────────────────────────────╮
3347 │ ├───────────────────────────┬───────────────────────────┤
3349 │ ├───────────────────────────┼───────────────────────────┤
3351 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3352 │ │ Yes │ No │ Yes │ No │
3353 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3354 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3355 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3356 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3357 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3358 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3359 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3360 │QN26 Yes QN61 Yes QN57 Column ID │ 2│ 1│ 4│ 3│ 6│ 5│ 7│ 8│ 10│ 9│ 11│12│ 14│13│ 15│16│
3361 │ Layer Column ID│ 2│ 1│ 4│ 3│ 6│ 5│ 7│ 8│ 10│ 9│ 11│12│ 14│13│ 15│16│
3362 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3363 │ No QN57 Column ID │ 2│ 1│ 4│ 3│ 6│ 5│ 7│ 8│ 10│ 9│ 11│12│ 14│13│ 15│16│
3364 │ Layer Column ID│ 2│ 1│ 4│ 3│ 6│ 5│ 7│ 8│ 10│ 9│ 11│12│ 14│13│ 15│16│
3365 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3366 │ No QN61 Yes QN57 Column ID │ 18│17│ 19│20│ 21│22│ 23│24│ 25│26│ 28│27│ 29│30│ 32│31│
3367 │ Layer Column ID│ 2│ 1│ 4│ 3│ 6│ 5│ 7│ 8│ 10│ 9│ 11│12│ 14│13│ 15│16│
3368 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3369 │ No QN57 Column ID │ 18│17│ 19│20│ 21│22│ 23│24│ 25│26│ 28│27│ 29│30│ 32│31│
3370 │ Layer Column ID│ 2│ 1│ 4│ 3│ 6│ 5│ 7│ 8│ 10│ 9│ 11│12│ 14│13│ 15│16│
3371 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3375 ╭──────────────────────────────────────┬───────────────────────────────────────────────────────╮
3377 │ ├───────────────────────────┬───────────────────────────┤
3379 │ ├───────────────────────────┼───────────────────────────┤
3381 │ ├─────────────┬─────────────┼─────────────┬─────────────┤
3382 │ │ Yes │ No │ Yes │ No │
3383 │ ├─────────────┼─────────────┼─────────────┼─────────────┤
3384 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3385 │ ├──────┬──────┼──────┬──────┼──────┬──────┼──────┬──────┤
3386 │ │ Yes │ No │ Yes │ No │ Yes │ No │ Yes │ No │
3387 │ ├───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┼───┬──┤
3388 │ │Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│Yes│No│
3389 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3390 │QN26 Yes QN61 Yes QN57 Column ID │ 34│33│ 35│36│ 37│38│ 39│40│ 41│42│ 44│43│ 45│46│ 47│48│
3391 │ Layer Column ID│ 18│17│ 19│20│ 21│22│ 23│24│ 25│26│ 28│27│ 29│30│ 31│32│
3392 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3393 │ No QN57 Column ID │ 34│33│ 35│36│ 37│38│ 39│40│ 41│42│ 44│43│ 45│46│ 47│48│
3394 │ Layer Column ID│ 18│17│ 19│20│ 21│22│ 23│24│ 25│26│ 28│27│ 29│30│ 31│32│
3395 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3396 │ No QN61 Yes QN57 Column ID │ 50│49│ 51│52│ 53│54│ 55│56│ 57│58│ 59│60│ 62│61│ 64│63│
3397 │ Layer Column ID│ 18│17│ 19│20│ 21│22│ 23│24│ 25│26│ 28│27│ 29│30│ 31│32│
3398 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┼───┼──┤
3399 │ No QN57 Column ID │ 50│49│ 51│52│ 53│54│ 55│56│ 57│58│ 59│60│ 62│61│ 64│63│
3400 │ Layer Column ID│ 18│17│ 19│20│ 21│22│ 23│24│ 25│26│ 28│27│ 29│30│ 31│32│
3401 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──┴───┴──╯
3405 AT_SETUP([CTABLES area definitions with CLABELS COLLABELS=OPPOSITE])
3406 AT_KEYWORDS([COLLABELS OPPOSITE])
3407 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3408 AT_DATA([ctables.sps],
3411 /VLABELS VARIABLES=ALL DISPLAY=NAME
3412 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3413 /SLABELS POSITION=ROW
3414 /CLABELS COLLABELS=OPPOSITE
3415 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3416 /SLABELS POSITION=ROW
3417 /CLABELS COLLABELS=OPPOSITE
3418 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3419 /SLABELS POSITION=ROW
3420 /CLABELS COLLABELS=OPPOSITE.
3422 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3425 ╭──────────────────────────────────────────┬───────────────────╮
3427 │ ├─────────┬─────────┤
3429 │ ├─────────┼─────────┤
3431 │ ├────┬────┼────┬────┤
3432 │ │ Yes│ No │ Yes│ No │
3433 │ ├────┼────┼────┼────┤
3434 │ │QN86│QN86│QN86│QN86│
3435 ├──────────────────────────────────────────┼────┼────┼────┼────┤
3436 │QN26 Yes QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3437 │ Layer ID │ 1│ 1│ 1│ 1│
3438 │ Subtable ID│ 1│ 1│ 2│ 2│
3439 │ ╶───────────────┼────┼────┼────┼────┤
3440 │ No Table ID │ 1│ 1│ 1│ 1│
3441 │ Layer ID │ 1│ 1│ 1│ 1│
3442 │ Subtable ID│ 1│ 1│ 2│ 2│
3443 │ ╶───────────────────┼────┼────┼────┼────┤
3444 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3445 │ Layer ID │ 1│ 1│ 1│ 1│
3446 │ Subtable ID│ 3│ 3│ 4│ 4│
3447 │ ╶───────────────┼────┼────┼────┼────┤
3448 │ No Table ID │ 1│ 1│ 1│ 1│
3449 │ Layer ID │ 1│ 1│ 1│ 1│
3450 │ Subtable ID│ 3│ 3│ 4│ 4│
3451 │ ╶────────────────────────────┼────┼────┼────┼────┤
3452 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3453 │ Layer ID │ 1│ 1│ 1│ 1│
3454 │ Subtable ID│ 5│ 5│ 6│ 6│
3455 │ ╶───────────────┼────┼────┼────┼────┤
3456 │ No Table ID │ 1│ 1│ 1│ 1│
3457 │ Layer ID │ 1│ 1│ 1│ 1│
3458 │ Subtable ID│ 5│ 5│ 6│ 6│
3459 │ ╶───────────────────┼────┼────┼────┼────┤
3460 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3461 │ Layer ID │ 1│ 1│ 1│ 1│
3462 │ Subtable ID│ 7│ 7│ 8│ 8│
3463 │ ╶───────────────┼────┼────┼────┼────┤
3464 │ No Table ID │ 1│ 1│ 1│ 1│
3465 │ Layer ID │ 1│ 1│ 1│ 1│
3466 │ Subtable ID│ 7│ 7│ 8│ 8│
3467 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
3468 │ No QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3469 │ Layer ID │ 1│ 1│ 1│ 1│
3470 │ Subtable ID│ 9│ 9│ 10│ 10│
3471 │ ╶───────────────┼────┼────┼────┼────┤
3472 │ No Table ID │ 1│ 1│ 1│ 1│
3473 │ Layer ID │ 1│ 1│ 1│ 1│
3474 │ Subtable ID│ 9│ 9│ 10│ 10│
3475 │ ╶───────────────────┼────┼────┼────┼────┤
3476 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3477 │ Layer ID │ 1│ 1│ 1│ 1│
3478 │ Subtable ID│ 11│ 11│ 12│ 12│
3479 │ ╶───────────────┼────┼────┼────┼────┤
3480 │ No Table ID │ 1│ 1│ 1│ 1│
3481 │ Layer ID │ 1│ 1│ 1│ 1│
3482 │ Subtable ID│ 11│ 11│ 12│ 12│
3483 │ ╶────────────────────────────┼────┼────┼────┼────┤
3484 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3485 │ Layer ID │ 1│ 1│ 1│ 1│
3486 │ Subtable ID│ 13│ 13│ 14│ 14│
3487 │ ╶───────────────┼────┼────┼────┼────┤
3488 │ No Table ID │ 1│ 1│ 1│ 1│
3489 │ Layer ID │ 1│ 1│ 1│ 1│
3490 │ Subtable ID│ 13│ 13│ 14│ 14│
3491 │ ╶───────────────────┼────┼────┼────┼────┤
3492 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3493 │ Layer ID │ 1│ 1│ 1│ 1│
3494 │ Subtable ID│ 15│ 15│ 16│ 16│
3495 │ ╶───────────────┼────┼────┼────┼────┤
3496 │ No Table ID │ 1│ 1│ 1│ 1│
3497 │ Layer ID │ 1│ 1│ 1│ 1│
3498 │ Subtable ID│ 15│ 15│ 16│ 16│
3499 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
3503 ╭──────────────────────────────────────────┬───────────────────╮
3505 │ ├─────────┬─────────┤
3507 │ ├─────────┼─────────┤
3509 │ ├────┬────┼────┬────┤
3510 │ │ Yes│ No │ Yes│ No │
3511 │ ├────┼────┼────┼────┤
3512 │ │QN86│QN86│QN86│QN86│
3513 ├──────────────────────────────────────────┼────┼────┼────┼────┤
3514 │QN26 Yes QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3515 │ Layer ID │ 2│ 2│ 2│ 2│
3516 │ Subtable ID│ 17│ 17│ 18│ 18│
3517 │ ╶───────────────┼────┼────┼────┼────┤
3518 │ No Table ID │ 1│ 1│ 1│ 1│
3519 │ Layer ID │ 2│ 2│ 2│ 2│
3520 │ Subtable ID│ 17│ 17│ 18│ 18│
3521 │ ╶───────────────────┼────┼────┼────┼────┤
3522 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3523 │ Layer ID │ 2│ 2│ 2│ 2│
3524 │ Subtable ID│ 19│ 19│ 20│ 20│
3525 │ ╶───────────────┼────┼────┼────┼────┤
3526 │ No Table ID │ 1│ 1│ 1│ 1│
3527 │ Layer ID │ 2│ 2│ 2│ 2│
3528 │ Subtable ID│ 19│ 19│ 20│ 20│
3529 │ ╶────────────────────────────┼────┼────┼────┼────┤
3530 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3531 │ Layer ID │ 2│ 2│ 2│ 2│
3532 │ Subtable ID│ 21│ 21│ 22│ 22│
3533 │ ╶───────────────┼────┼────┼────┼────┤
3534 │ No Table ID │ 1│ 1│ 1│ 1│
3535 │ Layer ID │ 2│ 2│ 2│ 2│
3536 │ Subtable ID│ 21│ 21│ 22│ 22│
3537 │ ╶───────────────────┼────┼────┼────┼────┤
3538 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3539 │ Layer ID │ 2│ 2│ 2│ 2│
3540 │ Subtable ID│ 23│ 23│ 24│ 24│
3541 │ ╶───────────────┼────┼────┼────┼────┤
3542 │ No Table ID │ 1│ 1│ 1│ 1│
3543 │ Layer ID │ 2│ 2│ 2│ 2│
3544 │ Subtable ID│ 23│ 23│ 24│ 24│
3545 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
3546 │ No QN61 Yes QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3547 │ Layer ID │ 2│ 2│ 2│ 2│
3548 │ Subtable ID│ 25│ 25│ 26│ 26│
3549 │ ╶───────────────┼────┼────┼────┼────┤
3550 │ No Table ID │ 1│ 1│ 1│ 1│
3551 │ Layer ID │ 2│ 2│ 2│ 2│
3552 │ Subtable ID│ 25│ 25│ 26│ 26│
3553 │ ╶───────────────────┼────┼────┼────┼────┤
3554 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3555 │ Layer ID │ 2│ 2│ 2│ 2│
3556 │ Subtable ID│ 27│ 27│ 28│ 28│
3557 │ ╶───────────────┼────┼────┼────┼────┤
3558 │ No Table ID │ 1│ 1│ 1│ 1│
3559 │ Layer ID │ 2│ 2│ 2│ 2│
3560 │ Subtable ID│ 27│ 27│ 28│ 28│
3561 │ ╶────────────────────────────┼────┼────┼────┼────┤
3562 │ No QN57 Yes Yes Table ID │ 1│ 1│ 1│ 1│
3563 │ Layer ID │ 2│ 2│ 2│ 2│
3564 │ Subtable ID│ 29│ 29│ 30│ 30│
3565 │ ╶───────────────┼────┼────┼────┼────┤
3566 │ No Table ID │ 1│ 1│ 1│ 1│
3567 │ Layer ID │ 2│ 2│ 2│ 2│
3568 │ Subtable ID│ 29│ 29│ 30│ 30│
3569 │ ╶───────────────────┼────┼────┼────┼────┤
3570 │ No Yes Table ID │ 1│ 1│ 1│ 1│
3571 │ Layer ID │ 2│ 2│ 2│ 2│
3572 │ Subtable ID│ 31│ 31│ 32│ 32│
3573 │ ╶───────────────┼────┼────┼────┼────┤
3574 │ No Table ID │ 1│ 1│ 1│ 1│
3575 │ Layer ID │ 2│ 2│ 2│ 2│
3576 │ Subtable ID│ 31│ 31│ 32│ 32│
3577 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
3581 ╭───────────────────────────────────────────┬───────────────────╮
3583 │ ├─────────┬─────────┤
3585 │ ├─────────┼─────────┤
3587 │ ├────┬────┼────┬────┤
3588 │ │ Yes│ No │ Yes│ No │
3589 │ ├────┼────┼────┼────┤
3590 │ │QN86│QN86│QN86│QN86│
3591 ├───────────────────────────────────────────┼────┼────┼────┼────┤
3592 │QN26 Yes QN61 Yes QN57 Yes Yes Row ID │ 2│ 2│ 3│ 3│
3593 │ Layer Row ID│ 2│ 2│ 2│ 2│
3594 │ ╶────────────────┼────┼────┼────┼────┤
3595 │ No Row ID │ 1│ 1│ 4│ 4│
3596 │ Layer Row ID│ 1│ 1│ 1│ 1│
3597 │ ╶────────────────────┼────┼────┼────┼────┤
3598 │ No Yes Row ID │ 5│ 5│ 7│ 7│
3599 │ Layer Row ID│ 3│ 3│ 3│ 3│
3600 │ ╶────────────────┼────┼────┼────┼────┤
3601 │ No Row ID │ 6│ 6│ 8│ 8│
3602 │ Layer Row ID│ 4│ 4│ 4│ 4│
3603 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3604 │ No QN57 Yes Yes Row ID │ 10│ 10│ 11│ 11│
3605 │ Layer Row ID│ 6│ 6│ 6│ 6│
3606 │ ╶────────────────┼────┼────┼────┼────┤
3607 │ No Row ID │ 9│ 9│ 12│ 12│
3608 │ Layer Row ID│ 5│ 5│ 5│ 5│
3609 │ ╶────────────────────┼────┼────┼────┼────┤
3610 │ No Yes Row ID │ 14│ 14│ 16│ 16│
3611 │ Layer Row ID│ 8│ 8│ 8│ 8│
3612 │ ╶────────────────┼────┼────┼────┼────┤
3613 │ No Row ID │ 13│ 13│ 15│ 15│
3614 │ Layer Row ID│ 7│ 7│ 7│ 7│
3615 │ ╶──────────────────────────────────────┼────┼────┼────┼────┤
3616 │ No QN61 Yes QN57 Yes Yes Row ID │ 17│ 17│ 19│ 19│
3617 │ Layer Row ID│ 9│ 9│ 9│ 9│
3618 │ ╶────────────────┼────┼────┼────┼────┤
3619 │ No Row ID │ 18│ 18│ 20│ 20│
3620 │ Layer Row ID│ 10│ 10│ 10│ 10│
3621 │ ╶────────────────────┼────┼────┼────┼────┤
3622 │ No Yes Row ID │ 21│ 21│ 23│ 23│
3623 │ Layer Row ID│ 11│ 11│ 11│ 11│
3624 │ ╶────────────────┼────┼────┼────┼────┤
3625 │ No Row ID │ 22│ 22│ 24│ 24│
3626 │ Layer Row ID│ 12│ 12│ 12│ 12│
3627 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3628 │ No QN57 Yes Yes Row ID │ 26│ 26│ 28│ 28│
3629 │ Layer Row ID│ 14│ 14│ 14│ 14│
3630 │ ╶────────────────┼────┼────┼────┼────┤
3631 │ No Row ID │ 25│ 25│ 27│ 27│
3632 │ Layer Row ID│ 13│ 13│ 13│ 13│
3633 │ ╶────────────────────┼────┼────┼────┼────┤
3634 │ No Yes Row ID │ 30│ 30│ 32│ 32│
3635 │ Layer Row ID│ 16│ 16│ 16│ 16│
3636 │ ╶────────────────┼────┼────┼────┼────┤
3637 │ No Row ID │ 29│ 29│ 31│ 31│
3638 │ Layer Row ID│ 15│ 15│ 15│ 15│
3639 ╰───────────────────────────────────────────┴────┴────┴────┴────╯
3643 ╭───────────────────────────────────────────┬───────────────────╮
3645 │ ├─────────┬─────────┤
3647 │ ├─────────┼─────────┤
3649 │ ├────┬────┼────┬────┤
3650 │ │ Yes│ No │ Yes│ No │
3651 │ ├────┼────┼────┼────┤
3652 │ │QN86│QN86│QN86│QN86│
3653 ├───────────────────────────────────────────┼────┼────┼────┼────┤
3654 │QN26 Yes QN61 Yes QN57 Yes Yes Row ID │ 33│ 33│ 36│ 36│
3655 │ Layer Row ID│ 17│ 17│ 17│ 17│
3656 │ ╶────────────────┼────┼────┼────┼────┤
3657 │ No Row ID │ 34│ 34│ 35│ 35│
3658 │ Layer Row ID│ 18│ 18│ 18│ 18│
3659 │ ╶────────────────────┼────┼────┼────┼────┤
3660 │ No Yes Row ID │ 37│ 37│ 39│ 39│
3661 │ Layer Row ID│ 19│ 19│ 19│ 19│
3662 │ ╶────────────────┼────┼────┼────┼────┤
3663 │ No Row ID │ 38│ 38│ 40│ 40│
3664 │ Layer Row ID│ 20│ 20│ 20│ 20│
3665 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3666 │ No QN57 Yes Yes Row ID │ 41│ 41│ 44│ 44│
3667 │ Layer Row ID│ 21│ 21│ 21│ 21│
3668 │ ╶────────────────┼────┼────┼────┼────┤
3669 │ No Row ID │ 42│ 42│ 43│ 43│
3670 │ Layer Row ID│ 22│ 22│ 22│ 22│
3671 │ ╶────────────────────┼────┼────┼────┼────┤
3672 │ No Yes Row ID │ 45│ 45│ 48│ 48│
3673 │ Layer Row ID│ 23│ 23│ 23│ 23│
3674 │ ╶────────────────┼────┼────┼────┼────┤
3675 │ No Row ID │ 46│ 46│ 47│ 47│
3676 │ Layer Row ID│ 24│ 24│ 24│ 24│
3677 │ ╶──────────────────────────────────────┼────┼────┼────┼────┤
3678 │ No QN61 Yes QN57 Yes Yes Row ID │ 49│ 49│ 52│ 52│
3679 │ Layer Row ID│ 25│ 25│ 25│ 25│
3680 │ ╶────────────────┼────┼────┼────┼────┤
3681 │ No Row ID │ 50│ 50│ 51│ 51│
3682 │ Layer Row ID│ 26│ 26│ 26│ 26│
3683 │ ╶────────────────────┼────┼────┼────┼────┤
3684 │ No Yes Row ID │ 53│ 53│ 55│ 55│
3685 │ Layer Row ID│ 27│ 27│ 27│ 27│
3686 │ ╶────────────────┼────┼────┼────┼────┤
3687 │ No Row ID │ 54│ 54│ 56│ 56│
3688 │ Layer Row ID│ 28│ 28│ 28│ 28│
3689 │ ╶─────────────────────────────┼────┼────┼────┼────┤
3690 │ No QN57 Yes Yes Row ID │ 58│ 58│ 59│ 59│
3691 │ Layer Row ID│ 30│ 30│ 30│ 30│
3692 │ ╶────────────────┼────┼────┼────┼────┤
3693 │ No Row ID │ 57│ 57│ 60│ 60│
3694 │ Layer Row ID│ 29│ 29│ 29│ 29│
3695 │ ╶────────────────────┼────┼────┼────┼────┤
3696 │ No Yes Row ID │ 62│ 62│ 64│ 64│
3697 │ Layer Row ID│ 32│ 32│ 32│ 32│
3698 │ ╶────────────────┼────┼────┼────┼────┤
3699 │ No Row ID │ 61│ 61│ 63│ 63│
3700 │ Layer Row ID│ 31│ 31│ 31│ 31│
3701 ╰───────────────────────────────────────────┴────┴────┴────┴────╯
3705 ╭──────────────────────────────────────────────┬───────────────────╮
3707 │ ├─────────┬─────────┤
3709 │ ├─────────┼─────────┤
3711 │ ├────┬────┼────┬────┤
3712 │ │ Yes│ No │ Yes│ No │
3713 │ ├────┼────┼────┼────┤
3714 │ │QN86│QN86│QN86│QN86│
3715 ├──────────────────────────────────────────────┼────┼────┼────┼────┤
3716 │QN26 Yes QN61 Yes QN57 Yes Yes Column ID │ 1│ 2│ 3│ 4│
3717 │ Layer Column ID│ 1│ 2│ 3│ 4│
3718 │ ╶───────────────────┼────┼────┼────┼────┤
3719 │ No Column ID │ 1│ 2│ 3│ 4│
3720 │ Layer Column ID│ 1│ 2│ 3│ 4│
3721 │ ╶───────────────────────┼────┼────┼────┼────┤
3722 │ No Yes Column ID │ 5│ 6│ 7│ 8│
3723 │ Layer Column ID│ 1│ 2│ 3│ 4│
3724 │ ╶───────────────────┼────┼────┼────┼────┤
3725 │ No Column ID │ 5│ 6│ 7│ 8│
3726 │ Layer Column ID│ 1│ 2│ 3│ 4│
3727 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3728 │ No QN57 Yes Yes Column ID │ 9│ 10│ 11│ 12│
3729 │ Layer Column ID│ 1│ 2│ 3│ 4│
3730 │ ╶───────────────────┼────┼────┼────┼────┤
3731 │ No Column ID │ 9│ 10│ 11│ 12│
3732 │ Layer Column ID│ 1│ 2│ 3│ 4│
3733 │ ╶───────────────────────┼────┼────┼────┼────┤
3734 │ No Yes Column ID │ 13│ 14│ 15│ 16│
3735 │ Layer Column ID│ 1│ 2│ 3│ 4│
3736 │ ╶───────────────────┼────┼────┼────┼────┤
3737 │ No Column ID │ 13│ 14│ 15│ 16│
3738 │ Layer Column ID│ 1│ 2│ 3│ 4│
3739 │ ╶─────────────────────────────────────────┼────┼────┼────┼────┤
3740 │ No QN61 Yes QN57 Yes Yes Column ID │ 17│ 18│ 19│ 20│
3741 │ Layer Column ID│ 1│ 2│ 3│ 4│
3742 │ ╶───────────────────┼────┼────┼────┼────┤
3743 │ No Column ID │ 17│ 18│ 19│ 20│
3744 │ Layer Column ID│ 1│ 2│ 3│ 4│
3745 │ ╶───────────────────────┼────┼────┼────┼────┤
3746 │ No Yes Column ID │ 21│ 22│ 23│ 24│
3747 │ Layer Column ID│ 1│ 2│ 3│ 4│
3748 │ ╶───────────────────┼────┼────┼────┼────┤
3749 │ No Column ID │ 21│ 22│ 23│ 24│
3750 │ Layer Column ID│ 1│ 2│ 3│ 4│
3751 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3752 │ No QN57 Yes Yes Column ID │ 25│ 26│ 27│ 28│
3753 │ Layer Column ID│ 1│ 2│ 3│ 4│
3754 │ ╶───────────────────┼────┼────┼────┼────┤
3755 │ No Column ID │ 25│ 26│ 27│ 28│
3756 │ Layer Column ID│ 1│ 2│ 3│ 4│
3757 │ ╶───────────────────────┼────┼────┼────┼────┤
3758 │ No Yes Column ID │ 29│ 30│ 31│ 32│
3759 │ Layer Column ID│ 1│ 2│ 3│ 4│
3760 │ ╶───────────────────┼────┼────┼────┼────┤
3761 │ No Column ID │ 29│ 30│ 31│ 32│
3762 │ Layer Column ID│ 1│ 2│ 3│ 4│
3763 ╰──────────────────────────────────────────────┴────┴────┴────┴────╯
3767 ╭──────────────────────────────────────────────┬───────────────────╮
3769 │ ├─────────┬─────────┤
3771 │ ├─────────┼─────────┤
3773 │ ├────┬────┼────┬────┤
3774 │ │ Yes│ No │ Yes│ No │
3775 │ ├────┼────┼────┼────┤
3776 │ │QN86│QN86│QN86│QN86│
3777 ├──────────────────────────────────────────────┼────┼────┼────┼────┤
3778 │QN26 Yes QN61 Yes QN57 Yes Yes Column ID │ 33│ 34│ 35│ 36│
3779 │ Layer Column ID│ 5│ 6│ 7│ 8│
3780 │ ╶───────────────────┼────┼────┼────┼────┤
3781 │ No Column ID │ 33│ 34│ 35│ 36│
3782 │ Layer Column ID│ 5│ 6│ 7│ 8│
3783 │ ╶───────────────────────┼────┼────┼────┼────┤
3784 │ No Yes Column ID │ 37│ 38│ 39│ 40│
3785 │ Layer Column ID│ 5│ 6│ 7│ 8│
3786 │ ╶───────────────────┼────┼────┼────┼────┤
3787 │ No Column ID │ 37│ 38│ 39│ 40│
3788 │ Layer Column ID│ 5│ 6│ 7│ 8│
3789 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3790 │ No QN57 Yes Yes Column ID │ 41│ 42│ 43│ 44│
3791 │ Layer Column ID│ 5│ 6│ 7│ 8│
3792 │ ╶───────────────────┼────┼────┼────┼────┤
3793 │ No Column ID │ 41│ 42│ 43│ 44│
3794 │ Layer Column ID│ 5│ 6│ 7│ 8│
3795 │ ╶───────────────────────┼────┼────┼────┼────┤
3796 │ No Yes Column ID │ 45│ 46│ 47│ 48│
3797 │ Layer Column ID│ 5│ 6│ 7│ 8│
3798 │ ╶───────────────────┼────┼────┼────┼────┤
3799 │ No Column ID │ 45│ 46│ 47│ 48│
3800 │ Layer Column ID│ 5│ 6│ 7│ 8│
3801 │ ╶─────────────────────────────────────────┼────┼────┼────┼────┤
3802 │ No QN61 Yes QN57 Yes Yes Column ID │ 49│ 50│ 51│ 52│
3803 │ Layer Column ID│ 5│ 6│ 7│ 8│
3804 │ ╶───────────────────┼────┼────┼────┼────┤
3805 │ No Column ID │ 49│ 50│ 51│ 52│
3806 │ Layer Column ID│ 5│ 6│ 7│ 8│
3807 │ ╶───────────────────────┼────┼────┼────┼────┤
3808 │ No Yes Column ID │ 53│ 54│ 55│ 56│
3809 │ Layer Column ID│ 5│ 6│ 7│ 8│
3810 │ ╶───────────────────┼────┼────┼────┼────┤
3811 │ No Column ID │ 53│ 54│ 55│ 56│
3812 │ Layer Column ID│ 5│ 6│ 7│ 8│
3813 │ ╶────────────────────────────────┼────┼────┼────┼────┤
3814 │ No QN57 Yes Yes Column ID │ 57│ 58│ 59│ 60│
3815 │ Layer Column ID│ 5│ 6│ 7│ 8│
3816 │ ╶───────────────────┼────┼────┼────┼────┤
3817 │ No Column ID │ 57│ 58│ 59│ 60│
3818 │ Layer Column ID│ 5│ 6│ 7│ 8│
3819 │ ╶───────────────────────┼────┼────┼────┼────┤
3820 │ No Yes Column ID │ 61│ 62│ 63│ 64│
3821 │ Layer Column ID│ 5│ 6│ 7│ 8│
3822 │ ╶───────────────────┼────┼────┼────┼────┤
3823 │ No Column ID │ 61│ 62│ 63│ 64│
3824 │ Layer Column ID│ 5│ 6│ 7│ 8│
3825 ╰──────────────────────────────────────────────┴────┴────┴────┴────╯
3829 AT_SETUP([CTABLES area definitions with CLABELS ROWLABELS=LAYER])
3830 AT_KEYWORDS([ROWLABELS LAYER])
3831 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
3832 AT_DATA([ctables.sps],
3835 /VLABELS VARIABLES=ALL DISPLAY=NAME
3836 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
3837 /SLABELS POSITION=ROW
3838 /CLABELS ROWLABELS=LAYER
3839 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
3840 /SLABELS POSITION=ROW
3841 /CLABELS ROWLABELS=LAYER
3842 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
3843 /SLABELS POSITION=ROW
3844 /CLABELS ROWLABELS=LAYER.
3846 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
3850 ╭──────────────────────────────────┬───────────────────────────╮
3852 │ ├─────────────┬─────────────┤
3854 │ ├─────────────┼─────────────┤
3856 │ ├──────┬──────┼──────┬──────┤
3857 │ │ Yes │ No │ Yes │ No │
3858 │ ├──────┼──────┼──────┼──────┤
3859 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3860 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3861 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3862 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3863 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3864 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3865 │ Subtable ID│ 2│ 2│ 3│ 3│ 5│ 5│ 7│ 7│
3866 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3867 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3868 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3869 │ Subtable ID│ 2│ 2│ 3│ 3│ 5│ 5│ 7│ 7│
3870 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3871 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3872 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3873 │ Subtable ID│ 10│10│ 12│12│ 13│13│ 16│16│
3874 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3875 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3876 │ Layer ID │ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
3877 │ Subtable ID│ 10│10│ 12│12│ 13│13│ 16│16│
3878 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
3883 ╭──────────────────────────────────┬───────────────────────────╮
3885 │ ├─────────────┬─────────────┤
3887 │ ├─────────────┼─────────────┤
3889 │ ├──────┬──────┼──────┬──────┤
3890 │ │ Yes │ No │ Yes │ No │
3891 │ ├──────┼──────┼──────┼──────┤
3892 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3893 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3894 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3895 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3896 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3897 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3898 │ Subtable ID│ 1│ 1│ 4│ 4│ 6│ 6│ 8│ 8│
3899 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3900 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3901 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3902 │ Subtable ID│ 1│ 1│ 4│ 4│ 6│ 6│ 8│ 8│
3903 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3904 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3905 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3906 │ Subtable ID│ 9│ 9│ 11│11│ 14│14│ 15│15│
3907 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3908 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3909 │ Layer ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3910 │ Subtable ID│ 9│ 9│ 11│11│ 14│14│ 15│15│
3911 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
3916 ╭──────────────────────────────────┬───────────────────────────╮
3918 │ ├─────────────┬─────────────┤
3920 │ ├─────────────┼─────────────┤
3922 │ ├──────┬──────┼──────┬──────┤
3923 │ │ Yes │ No │ Yes │ No │
3924 │ ├──────┼──────┼──────┼──────┤
3925 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3926 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3927 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3928 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3929 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3930 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3931 │ Subtable ID│ 17│17│ 19│19│ 21│21│ 23│23│
3932 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3933 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3934 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3935 │ Subtable ID│ 17│17│ 19│19│ 21│21│ 23│23│
3936 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3937 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3938 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3939 │ Subtable ID│ 25│25│ 28│28│ 29│29│ 32│32│
3940 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3941 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3942 │ Layer ID │ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
3943 │ Subtable ID│ 25│25│ 28│28│ 29│29│ 32│32│
3944 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
3949 ╭──────────────────────────────────┬───────────────────────────╮
3951 │ ├─────────────┬─────────────┤
3953 │ ├─────────────┼─────────────┤
3955 │ ├──────┬──────┼──────┬──────┤
3956 │ │ Yes │ No │ Yes │ No │
3957 │ ├──────┼──────┼──────┼──────┤
3958 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3959 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3960 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3961 ├──────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3962 │QN26 Yes QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3963 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3964 │ Subtable ID│ 18│18│ 20│20│ 22│22│ 24│24│
3965 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3966 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3967 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3968 │ Subtable ID│ 18│18│ 20│20│ 22│22│ 24│24│
3969 │ ╶─────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3970 │ No QN61 Yes QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3971 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3972 │ Subtable ID│ 26│26│ 27│27│ 30│30│ 31│31│
3973 │ ╶────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3974 │ No QN57 Table ID │ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3975 │ Layer ID │ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
3976 │ Subtable ID│ 26│26│ 27│27│ 30│30│ 31│31│
3977 ╰──────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
3982 ╭───────────────────────────────────┬───────────────────────────╮
3984 │ ├─────────────┬─────────────┤
3986 │ ├─────────────┼─────────────┤
3988 │ ├──────┬──────┼──────┬──────┤
3989 │ │ Yes │ No │ Yes │ No │
3990 │ ├──────┼──────┼──────┼──────┤
3991 │ │ QN86 │ QN86 │ QN86 │ QN86 │
3992 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
3993 │ │Yes│No│Yes│No│Yes│No│Yes│No│
3994 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3995 │QN26 Yes QN61 Yes QN57 Row ID │ 1│ 1│ 3│ 3│ 6│ 6│ 8│ 8│
3996 │ Layer Row ID│ 1│ 1│ 1│ 1│ 1│ 1│ 1│ 1│
3997 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
3998 │ No QN57 Row ID │ 9│ 9│ 11│11│ 14│14│ 15│15│
3999 │ Layer Row ID│ 3│ 3│ 3│ 3│ 3│ 3│ 3│ 3│
4000 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4001 │ No QN61 Yes QN57 Row ID │ 18│18│ 20│20│ 22│22│ 23│23│
4002 │ Layer Row ID│ 6│ 6│ 6│ 6│ 6│ 6│ 6│ 6│
4003 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4004 │ No QN57 Row ID │ 26│26│ 28│28│ 29│29│ 32│32│
4005 │ Layer Row ID│ 8│ 8│ 8│ 8│ 8│ 8│ 8│ 8│
4006 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4011 ╭───────────────────────────────────┬───────────────────────────╮
4013 │ ├─────────────┬─────────────┤
4015 │ ├─────────────┼─────────────┤
4017 │ ├──────┬──────┼──────┬──────┤
4018 │ │ Yes │ No │ Yes │ No │
4019 │ ├──────┼──────┼──────┼──────┤
4020 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4021 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4022 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4023 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4024 │QN26 Yes QN61 Yes QN57 Row ID │ 2│ 2│ 4│ 4│ 5│ 5│ 7│ 7│
4025 │ Layer Row ID│ 2│ 2│ 2│ 2│ 2│ 2│ 2│ 2│
4026 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4027 │ No QN57 Row ID │ 10│10│ 12│12│ 13│13│ 16│16│
4028 │ Layer Row ID│ 4│ 4│ 4│ 4│ 4│ 4│ 4│ 4│
4029 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4030 │ No QN61 Yes QN57 Row ID │ 17│17│ 19│19│ 21│21│ 24│24│
4031 │ Layer Row ID│ 5│ 5│ 5│ 5│ 5│ 5│ 5│ 5│
4032 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4033 │ No QN57 Row ID │ 25│25│ 27│27│ 30│30│ 31│31│
4034 │ Layer Row ID│ 7│ 7│ 7│ 7│ 7│ 7│ 7│ 7│
4035 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4040 ╭───────────────────────────────────┬───────────────────────────╮
4042 │ ├─────────────┬─────────────┤
4044 │ ├─────────────┼─────────────┤
4046 │ ├──────┬──────┼──────┬──────┤
4047 │ │ Yes │ No │ Yes │ No │
4048 │ ├──────┼──────┼──────┼──────┤
4049 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4050 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4051 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4052 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4053 │QN26 Yes QN61 Yes QN57 Row ID │ 33│33│ 36│36│ 38│38│ 40│40│
4054 │ Layer Row ID│ 9│ 9│ 9│ 9│ 9│ 9│ 9│ 9│
4055 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4056 │ No QN57 Row ID │ 42│42│ 43│43│ 45│45│ 47│47│
4057 │ Layer Row ID│ 12│12│ 12│12│ 12│12│ 12│12│
4058 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4059 │ No QN61 Yes QN57 Row ID │ 50│50│ 52│52│ 53│53│ 56│56│
4060 │ Layer Row ID│ 14│14│ 14│14│ 14│14│ 14│14│
4061 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4062 │ No QN57 Row ID │ 57│57│ 60│60│ 61│61│ 63│63│
4063 │ Layer Row ID│ 15│15│ 15│15│ 15│15│ 15│15│
4064 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4069 ╭───────────────────────────────────┬───────────────────────────╮
4071 │ ├─────────────┬─────────────┤
4073 │ ├─────────────┼─────────────┤
4075 │ ├──────┬──────┼──────┬──────┤
4076 │ │ Yes │ No │ Yes │ No │
4077 │ ├──────┼──────┼──────┼──────┤
4078 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4079 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4080 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4081 ├───────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4082 │QN26 Yes QN61 Yes QN57 Row ID │ 34│34│ 35│35│ 37│37│ 39│39│
4083 │ Layer Row ID│ 10│10│ 10│10│ 10│10│ 10│10│
4084 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4085 │ No QN57 Row ID │ 41│41│ 44│44│ 46│46│ 48│48│
4086 │ Layer Row ID│ 11│11│ 11│11│ 11│11│ 11│11│
4087 │ ╶──────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4088 │ No QN61 Yes QN57 Row ID │ 49│49│ 51│51│ 54│54│ 55│55│
4089 │ Layer Row ID│ 13│13│ 13│13│ 13│13│ 13│13│
4090 │ ╶─────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4091 │ No QN57 Row ID │ 58│58│ 59│59│ 62│62│ 64│64│
4092 │ Layer Row ID│ 16│16│ 16│16│ 16│16│ 16│16│
4093 ╰───────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4098 ╭──────────────────────────────────────┬───────────────────────────╮
4100 │ ├─────────────┬─────────────┤
4102 │ ├─────────────┼─────────────┤
4104 │ ├──────┬──────┼──────┬──────┤
4105 │ │ Yes │ No │ Yes │ No │
4106 │ ├──────┼──────┼──────┼──────┤
4107 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4108 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4109 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4110 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4111 │QN26 Yes QN61 Yes QN57 Column ID │ 2│ 4│ 6│ 7│ 10│11│ 14│15│
4112 │ Layer Column ID│ 2│ 4│ 6│ 7│ 10│11│ 14│15│
4113 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4114 │ No QN57 Column ID │ 2│ 4│ 6│ 7│ 10│11│ 14│15│
4115 │ Layer Column ID│ 2│ 4│ 6│ 7│ 10│11│ 14│15│
4116 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4117 │ No QN61 Yes QN57 Column ID │ 18│19│ 21│23│ 25│28│ 29│32│
4118 │ Layer Column ID│ 2│ 4│ 6│ 7│ 10│11│ 14│15│
4119 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4120 │ No QN57 Column ID │ 18│19│ 21│23│ 25│28│ 29│32│
4121 │ Layer Column ID│ 2│ 4│ 6│ 7│ 10│11│ 14│15│
4122 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4127 ╭──────────────────────────────────────┬───────────────────────────╮
4129 │ ├─────────────┬─────────────┤
4131 │ ├─────────────┼─────────────┤
4133 │ ├──────┬──────┼──────┬──────┤
4134 │ │ Yes │ No │ Yes │ No │
4135 │ ├──────┼──────┼──────┼──────┤
4136 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4137 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4138 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4139 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4140 │QN26 Yes QN61 Yes QN57 Column ID │ 1│ 3│ 5│ 8│ 9│12│ 13│16│
4141 │ Layer Column ID│ 1│ 3│ 5│ 8│ 9│12│ 13│16│
4142 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4143 │ No QN57 Column ID │ 1│ 3│ 5│ 8│ 9│12│ 13│16│
4144 │ Layer Column ID│ 1│ 3│ 5│ 8│ 9│12│ 13│16│
4145 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4146 │ No QN61 Yes QN57 Column ID │ 17│20│ 22│24│ 26│27│ 30│31│
4147 │ Layer Column ID│ 1│ 3│ 5│ 8│ 9│12│ 13│16│
4148 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4149 │ No QN57 Column ID │ 17│20│ 22│24│ 26│27│ 30│31│
4150 │ Layer Column ID│ 1│ 3│ 5│ 8│ 9│12│ 13│16│
4151 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4156 ╭──────────────────────────────────────┬───────────────────────────╮
4158 │ ├─────────────┬─────────────┤
4160 │ ├─────────────┼─────────────┤
4162 │ ├──────┬──────┼──────┬──────┤
4163 │ │ Yes │ No │ Yes │ No │
4164 │ ├──────┼──────┼──────┼──────┤
4165 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4166 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4167 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4168 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4169 │QN26 Yes QN61 Yes QN57 Column ID │ 34│35│ 37│39│ 41│44│ 45│47│
4170 │ Layer Column ID│ 18│19│ 21│23│ 25│28│ 29│31│
4171 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4172 │ No QN57 Column ID │ 34│35│ 37│39│ 41│44│ 45│47│
4173 │ Layer Column ID│ 18│19│ 21│23│ 25│28│ 29│31│
4174 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4175 │ No QN61 Yes QN57 Column ID │ 50│51│ 53│55│ 57│59│ 62│64│
4176 │ Layer Column ID│ 18│19│ 21│23│ 25│28│ 29│31│
4177 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4178 │ No QN57 Column ID │ 50│51│ 53│55│ 57│59│ 62│64│
4179 │ Layer Column ID│ 18│19│ 21│23│ 25│28│ 29│31│
4180 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4185 ╭──────────────────────────────────────┬───────────────────────────╮
4187 │ ├─────────────┬─────────────┤
4189 │ ├─────────────┼─────────────┤
4191 │ ├──────┬──────┼──────┬──────┤
4192 │ │ Yes │ No │ Yes │ No │
4193 │ ├──────┼──────┼──────┼──────┤
4194 │ │ QN86 │ QN86 │ QN86 │ QN86 │
4195 │ ├───┬──┼───┬──┼───┬──┼───┬──┤
4196 │ │Yes│No│Yes│No│Yes│No│Yes│No│
4197 ├──────────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4198 │QN26 Yes QN61 Yes QN57 Column ID │ 33│36│ 38│40│ 42│43│ 46│48│
4199 │ Layer Column ID│ 17│20│ 22│24│ 26│27│ 30│32│
4200 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4201 │ No QN57 Column ID │ 33│36│ 38│40│ 42│43│ 46│48│
4202 │ Layer Column ID│ 17│20│ 22│24│ 26│27│ 30│32│
4203 │ ╶─────────────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4204 │ No QN61 Yes QN57 Column ID │ 49│52│ 54│56│ 58│60│ 61│63│
4205 │ Layer Column ID│ 17│20│ 22│24│ 26│27│ 30│32│
4206 │ ╶────────────────────────┼───┼──┼───┼──┼───┼──┼───┼──┤
4207 │ No QN57 Column ID │ 49│52│ 54│56│ 58│60│ 61│63│
4208 │ Layer Column ID│ 17│20│ 22│24│ 26│27│ 30│32│
4209 ╰──────────────────────────────────────┴───┴──┴───┴──┴───┴──┴───┴──╯
4213 AT_SETUP([CTABLES area definitions with CLABELS COLLABELS=LAYER])
4214 AT_KEYWORDS([COLLABELS LAYER])
4215 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4216 AT_DATA([ctables.sps],
4219 /VLABELS VARIABLES=ALL DISPLAY=NAME
4220 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[TABLEID, LAYERID, SUBTABLEID]
4221 /SLABELS POSITION=ROW
4222 /CLABELS COLLABELS=LAYER
4223 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[ROWID, LAYERROWID]
4224 /SLABELS POSITION=ROW
4225 /CLABELS COLLABELS=LAYER
4226 /TABLE qn26 > qn61 > qn57 BY qn27 > qnd7a > qn86 BY qns3a[COLID, LAYERCOLID]
4227 /SLABELS POSITION=ROW
4228 /CLABELS COLLABELS=LAYER.
4230 AT_CHECK([pspp ctables.sps --table-look="$builddir"/all-layers.stt -O box=unicode -O width=120], [0], [dnl
4234 ╭──────────────────────────────────────┬───────────────────╮
4236 │ ├─────────┬─────────┤
4238 │ ├─────────┼─────────┤
4240 │ ├────┬────┼────┬────┤
4241 │ │ Yes│ No │ Yes│ No │
4242 │ ├────┼────┼────┼────┤
4243 │ │QN86│QN86│QN86│QN86│
4244 ├──────────────────────────────────────┼────┼────┼────┼────┤
4245 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4246 │ Layer ID │ 2│ 2│ 2│ 2│
4247 │ Subtable ID│ 2│ 2│ 4│ 4│
4248 │ ╶───────────────┼────┼────┼────┼────┤
4249 │ No Table ID │ 1│ 1│ 1│ 1│
4250 │ Layer ID │ 2│ 2│ 2│ 2│
4251 │ Subtable ID│ 2│ 2│ 4│ 4│
4252 │ ╶────────────────────────┼────┼────┼────┼────┤
4253 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4254 │ Layer ID │ 2│ 2│ 2│ 2│
4255 │ Subtable ID│ 5│ 5│ 7│ 7│
4256 │ ╶───────────────┼────┼────┼────┼────┤
4257 │ No Table ID │ 1│ 1│ 1│ 1│
4258 │ Layer ID │ 2│ 2│ 2│ 2│
4259 │ Subtable ID│ 5│ 5│ 7│ 7│
4260 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4261 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4262 │ Layer ID │ 2│ 2│ 2│ 2│
4263 │ Subtable ID│ 10│ 10│ 12│ 12│
4264 │ ╶───────────────┼────┼────┼────┼────┤
4265 │ No Table ID │ 1│ 1│ 1│ 1│
4266 │ Layer ID │ 2│ 2│ 2│ 2│
4267 │ Subtable ID│ 10│ 10│ 12│ 12│
4268 │ ╶────────────────────────┼────┼────┼────┼────┤
4269 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4270 │ Layer ID │ 2│ 2│ 2│ 2│
4271 │ Subtable ID│ 13│ 13│ 15│ 15│
4272 │ ╶───────────────┼────┼────┼────┼────┤
4273 │ No Table ID │ 1│ 1│ 1│ 1│
4274 │ Layer ID │ 2│ 2│ 2│ 2│
4275 │ Subtable ID│ 13│ 13│ 15│ 15│
4276 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4281 ╭──────────────────────────────────────┬───────────────────╮
4283 │ ├─────────┬─────────┤
4285 │ ├─────────┼─────────┤
4287 │ ├────┬────┼────┬────┤
4288 │ │ Yes│ No │ Yes│ No │
4289 │ ├────┼────┼────┼────┤
4290 │ │QN86│QN86│QN86│QN86│
4291 ├──────────────────────────────────────┼────┼────┼────┼────┤
4292 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4293 │ Layer ID │ 1│ 1│ 1│ 1│
4294 │ Subtable ID│ 1│ 1│ 3│ 3│
4295 │ ╶───────────────┼────┼────┼────┼────┤
4296 │ No Table ID │ 1│ 1│ 1│ 1│
4297 │ Layer ID │ 1│ 1│ 1│ 1│
4298 │ Subtable ID│ 1│ 1│ 3│ 3│
4299 │ ╶────────────────────────┼────┼────┼────┼────┤
4300 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4301 │ Layer ID │ 1│ 1│ 1│ 1│
4302 │ Subtable ID│ 6│ 6│ 8│ 8│
4303 │ ╶───────────────┼────┼────┼────┼────┤
4304 │ No Table ID │ 1│ 1│ 1│ 1│
4305 │ Layer ID │ 1│ 1│ 1│ 1│
4306 │ Subtable ID│ 6│ 6│ 8│ 8│
4307 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4308 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4309 │ Layer ID │ 1│ 1│ 1│ 1│
4310 │ Subtable ID│ 9│ 9│ 11│ 11│
4311 │ ╶───────────────┼────┼────┼────┼────┤
4312 │ No Table ID │ 1│ 1│ 1│ 1│
4313 │ Layer ID │ 1│ 1│ 1│ 1│
4314 │ Subtable ID│ 9│ 9│ 11│ 11│
4315 │ ╶────────────────────────┼────┼────┼────┼────┤
4316 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4317 │ Layer ID │ 1│ 1│ 1│ 1│
4318 │ Subtable ID│ 14│ 14│ 16│ 16│
4319 │ ╶───────────────┼────┼────┼────┼────┤
4320 │ No Table ID │ 1│ 1│ 1│ 1│
4321 │ Layer ID │ 1│ 1│ 1│ 1│
4322 │ Subtable ID│ 14│ 14│ 16│ 16│
4323 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4328 ╭──────────────────────────────────────┬───────────────────╮
4330 │ ├─────────┬─────────┤
4332 │ ├─────────┼─────────┤
4334 │ ├────┬────┼────┬────┤
4335 │ │ Yes│ No │ Yes│ No │
4336 │ ├────┼────┼────┼────┤
4337 │ │QN86│QN86│QN86│QN86│
4338 ├──────────────────────────────────────┼────┼────┼────┼────┤
4339 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4340 │ Layer ID │ 4│ 4│ 4│ 4│
4341 │ Subtable ID│ 18│ 18│ 19│ 19│
4342 │ ╶───────────────┼────┼────┼────┼────┤
4343 │ No Table ID │ 1│ 1│ 1│ 1│
4344 │ Layer ID │ 4│ 4│ 4│ 4│
4345 │ Subtable ID│ 18│ 18│ 19│ 19│
4346 │ ╶────────────────────────┼────┼────┼────┼────┤
4347 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4348 │ Layer ID │ 4│ 4│ 4│ 4│
4349 │ Subtable ID│ 22│ 22│ 23│ 23│
4350 │ ╶───────────────┼────┼────┼────┼────┤
4351 │ No Table ID │ 1│ 1│ 1│ 1│
4352 │ Layer ID │ 4│ 4│ 4│ 4│
4353 │ Subtable ID│ 22│ 22│ 23│ 23│
4354 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4355 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4356 │ Layer ID │ 4│ 4│ 4│ 4│
4357 │ Subtable ID│ 26│ 26│ 28│ 28│
4358 │ ╶───────────────┼────┼────┼────┼────┤
4359 │ No Table ID │ 1│ 1│ 1│ 1│
4360 │ Layer ID │ 4│ 4│ 4│ 4│
4361 │ Subtable ID│ 26│ 26│ 28│ 28│
4362 │ ╶────────────────────────┼────┼────┼────┼────┤
4363 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4364 │ Layer ID │ 4│ 4│ 4│ 4│
4365 │ Subtable ID│ 29│ 29│ 31│ 31│
4366 │ ╶───────────────┼────┼────┼────┼────┤
4367 │ No Table ID │ 1│ 1│ 1│ 1│
4368 │ Layer ID │ 4│ 4│ 4│ 4│
4369 │ Subtable ID│ 29│ 29│ 31│ 31│
4370 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4375 ╭──────────────────────────────────────┬───────────────────╮
4377 │ ├─────────┬─────────┤
4379 │ ├─────────┼─────────┤
4381 │ ├────┬────┼────┬────┤
4382 │ │ Yes│ No │ Yes│ No │
4383 │ ├────┼────┼────┼────┤
4384 │ │QN86│QN86│QN86│QN86│
4385 ├──────────────────────────────────────┼────┼────┼────┼────┤
4386 │QN26 Yes QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4387 │ Layer ID │ 3│ 3│ 3│ 3│
4388 │ Subtable ID│ 17│ 17│ 20│ 20│
4389 │ ╶───────────────┼────┼────┼────┼────┤
4390 │ No Table ID │ 1│ 1│ 1│ 1│
4391 │ Layer ID │ 3│ 3│ 3│ 3│
4392 │ Subtable ID│ 17│ 17│ 20│ 20│
4393 │ ╶────────────────────────┼────┼────┼────┼────┤
4394 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4395 │ Layer ID │ 3│ 3│ 3│ 3│
4396 │ Subtable ID│ 21│ 21│ 24│ 24│
4397 │ ╶───────────────┼────┼────┼────┼────┤
4398 │ No Table ID │ 1│ 1│ 1│ 1│
4399 │ Layer ID │ 3│ 3│ 3│ 3│
4400 │ Subtable ID│ 21│ 21│ 24│ 24│
4401 │ ╶─────────────────────────────────┼────┼────┼────┼────┤
4402 │ No QN61 Yes QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4403 │ Layer ID │ 3│ 3│ 3│ 3│
4404 │ Subtable ID│ 25│ 25│ 27│ 27│
4405 │ ╶───────────────┼────┼────┼────┼────┤
4406 │ No Table ID │ 1│ 1│ 1│ 1│
4407 │ Layer ID │ 3│ 3│ 3│ 3│
4408 │ Subtable ID│ 25│ 25│ 27│ 27│
4409 │ ╶────────────────────────┼────┼────┼────┼────┤
4410 │ No QN57 Yes Table ID │ 1│ 1│ 1│ 1│
4411 │ Layer ID │ 3│ 3│ 3│ 3│
4412 │ Subtable ID│ 30│ 30│ 32│ 32│
4413 │ ╶───────────────┼────┼────┼────┼────┤
4414 │ No Table ID │ 1│ 1│ 1│ 1│
4415 │ Layer ID │ 3│ 3│ 3│ 3│
4416 │ Subtable ID│ 30│ 30│ 32│ 32│
4417 ╰──────────────────────────────────────┴────┴────┴────┴────╯
4422 ╭───────────────────────────────────────┬───────────────────╮
4424 │ ├─────────┬─────────┤
4426 │ ├─────────┼─────────┤
4428 │ ├────┬────┼────┬────┤
4429 │ │ Yes│ No │ Yes│ No │
4430 │ ├────┼────┼────┼────┤
4431 │ │QN86│QN86│QN86│QN86│
4432 ├───────────────────────────────────────┼────┼────┼────┼────┤
4433 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 2│ 2│ 3│ 3│
4434 │ Layer Row ID│ 2│ 2│ 2│ 2│
4435 │ ╶────────────────┼────┼────┼────┼────┤
4436 │ No Row ID │ 5│ 5│ 7│ 7│
4437 │ Layer Row ID│ 3│ 3│ 3│ 3│
4438 │ ╶─────────────────────────┼────┼────┼────┼────┤
4439 │ No QN57 Yes Row ID │ 10│ 10│ 11│ 11│
4440 │ Layer Row ID│ 6│ 6│ 6│ 6│
4441 │ ╶────────────────┼────┼────┼────┼────┤
4442 │ No Row ID │ 14│ 14│ 16│ 16│
4443 │ Layer Row ID│ 8│ 8│ 8│ 8│
4444 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4445 │ No QN61 Yes QN57 Yes Row ID │ 17│ 17│ 19│ 19│
4446 │ Layer Row ID│ 9│ 9│ 9│ 9│
4447 │ ╶────────────────┼────┼────┼────┼────┤
4448 │ No Row ID │ 21│ 21│ 23│ 23│
4449 │ Layer Row ID│ 11│ 11│ 11│ 11│
4450 │ ╶─────────────────────────┼────┼────┼────┼────┤
4451 │ No QN57 Yes Row ID │ 26│ 26│ 28│ 28│
4452 │ Layer Row ID│ 14│ 14│ 14│ 14│
4453 │ ╶────────────────┼────┼────┼────┼────┤
4454 │ No Row ID │ 30│ 30│ 32│ 32│
4455 │ Layer Row ID│ 16│ 16│ 16│ 16│
4456 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4461 ╭───────────────────────────────────────┬───────────────────╮
4463 │ ├─────────┬─────────┤
4465 │ ├─────────┼─────────┤
4467 │ ├────┬────┼────┬────┤
4468 │ │ Yes│ No │ Yes│ No │
4469 │ ├────┼────┼────┼────┤
4470 │ │QN86│QN86│QN86│QN86│
4471 ├───────────────────────────────────────┼────┼────┼────┼────┤
4472 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 1│ 1│ 4│ 4│
4473 │ Layer Row ID│ 1│ 1│ 1│ 1│
4474 │ ╶────────────────┼────┼────┼────┼────┤
4475 │ No Row ID │ 6│ 6│ 8│ 8│
4476 │ Layer Row ID│ 4│ 4│ 4│ 4│
4477 │ ╶─────────────────────────┼────┼────┼────┼────┤
4478 │ No QN57 Yes Row ID │ 9│ 9│ 12│ 12│
4479 │ Layer Row ID│ 5│ 5│ 5│ 5│
4480 │ ╶────────────────┼────┼────┼────┼────┤
4481 │ No Row ID │ 13│ 13│ 15│ 15│
4482 │ Layer Row ID│ 7│ 7│ 7│ 7│
4483 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4484 │ No QN61 Yes QN57 Yes Row ID │ 18│ 18│ 20│ 20│
4485 │ Layer Row ID│ 10│ 10│ 10│ 10│
4486 │ ╶────────────────┼────┼────┼────┼────┤
4487 │ No Row ID │ 22│ 22│ 24│ 24│
4488 │ Layer Row ID│ 12│ 12│ 12│ 12│
4489 │ ╶─────────────────────────┼────┼────┼────┼────┤
4490 │ No QN57 Yes Row ID │ 25│ 25│ 27│ 27│
4491 │ Layer Row ID│ 13│ 13│ 13│ 13│
4492 │ ╶────────────────┼────┼────┼────┼────┤
4493 │ No Row ID │ 29│ 29│ 31│ 31│
4494 │ Layer Row ID│ 15│ 15│ 15│ 15│
4495 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4500 ╭───────────────────────────────────────┬───────────────────╮
4502 │ ├─────────┬─────────┤
4504 │ ├─────────┼─────────┤
4506 │ ├────┬────┼────┬────┤
4507 │ │ Yes│ No │ Yes│ No │
4508 │ ├────┼────┼────┼────┤
4509 │ │QN86│QN86│QN86│QN86│
4510 ├───────────────────────────────────────┼────┼────┼────┼────┤
4511 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 33│ 33│ 36│ 36│
4512 │ Layer Row ID│ 17│ 17│ 17│ 17│
4513 │ ╶────────────────┼────┼────┼────┼────┤
4514 │ No Row ID │ 37│ 37│ 39│ 39│
4515 │ Layer Row ID│ 19│ 19│ 19│ 19│
4516 │ ╶─────────────────────────┼────┼────┼────┼────┤
4517 │ No QN57 Yes Row ID │ 41│ 41│ 44│ 44│
4518 │ Layer Row ID│ 21│ 21│ 21│ 21│
4519 │ ╶────────────────┼────┼────┼────┼────┤
4520 │ No Row ID │ 45│ 45│ 48│ 48│
4521 │ Layer Row ID│ 23│ 23│ 23│ 23│
4522 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4523 │ No QN61 Yes QN57 Yes Row ID │ 49│ 49│ 52│ 52│
4524 │ Layer Row ID│ 25│ 25│ 25│ 25│
4525 │ ╶────────────────┼────┼────┼────┼────┤
4526 │ No Row ID │ 53│ 53│ 55│ 55│
4527 │ Layer Row ID│ 27│ 27│ 27│ 27│
4528 │ ╶─────────────────────────┼────┼────┼────┼────┤
4529 │ No QN57 Yes Row ID │ 58│ 58│ 59│ 59│
4530 │ Layer Row ID│ 30│ 30│ 30│ 30│
4531 │ ╶────────────────┼────┼────┼────┼────┤
4532 │ No Row ID │ 62│ 62│ 64│ 64│
4533 │ Layer Row ID│ 32│ 32│ 32│ 32│
4534 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4539 ╭───────────────────────────────────────┬───────────────────╮
4541 │ ├─────────┬─────────┤
4543 │ ├─────────┼─────────┤
4545 │ ├────┬────┼────┬────┤
4546 │ │ Yes│ No │ Yes│ No │
4547 │ ├────┼────┼────┼────┤
4548 │ │QN86│QN86│QN86│QN86│
4549 ├───────────────────────────────────────┼────┼────┼────┼────┤
4550 │QN26 Yes QN61 Yes QN57 Yes Row ID │ 34│ 34│ 35│ 35│
4551 │ Layer Row ID│ 18│ 18│ 18│ 18│
4552 │ ╶────────────────┼────┼────┼────┼────┤
4553 │ No Row ID │ 38│ 38│ 40│ 40│
4554 │ Layer Row ID│ 20│ 20│ 20│ 20│
4555 │ ╶─────────────────────────┼────┼────┼────┼────┤
4556 │ No QN57 Yes Row ID │ 42│ 42│ 43│ 43│
4557 │ Layer Row ID│ 22│ 22│ 22│ 22│
4558 │ ╶────────────────┼────┼────┼────┼────┤
4559 │ No Row ID │ 46│ 46│ 47│ 47│
4560 │ Layer Row ID│ 24│ 24│ 24│ 24│
4561 │ ╶──────────────────────────────────┼────┼────┼────┼────┤
4562 │ No QN61 Yes QN57 Yes Row ID │ 50│ 50│ 51│ 51│
4563 │ Layer Row ID│ 26│ 26│ 26│ 26│
4564 │ ╶────────────────┼────┼────┼────┼────┤
4565 │ No Row ID │ 54│ 54│ 56│ 56│
4566 │ Layer Row ID│ 28│ 28│ 28│ 28│
4567 │ ╶─────────────────────────┼────┼────┼────┼────┤
4568 │ No QN57 Yes Row ID │ 57│ 57│ 60│ 60│
4569 │ Layer Row ID│ 29│ 29│ 29│ 29│
4570 │ ╶────────────────┼────┼────┼────┼────┤
4571 │ No Row ID │ 61│ 61│ 63│ 63│
4572 │ Layer Row ID│ 31│ 31│ 31│ 31│
4573 ╰───────────────────────────────────────┴────┴────┴────┴────╯
4578 ╭──────────────────────────────────────────┬───────────────────╮
4580 │ ├─────────┬─────────┤
4582 │ ├─────────┼─────────┤
4584 │ ├────┬────┼────┬────┤
4585 │ │ Yes│ No │ Yes│ No │
4586 │ ├────┼────┼────┼────┤
4587 │ │QN86│QN86│QN86│QN86│
4588 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4589 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 1│ 4│ 5│ 7│
4590 │ Layer Column ID│ 1│ 4│ 5│ 7│
4591 │ ╶───────────────────┼────┼────┼────┼────┤
4592 │ No Column ID │ 1│ 4│ 5│ 7│
4593 │ Layer Column ID│ 1│ 4│ 5│ 7│
4594 │ ╶────────────────────────────┼────┼────┼────┼────┤
4595 │ No QN57 Yes Column ID │ 9│ 12│ 14│ 15│
4596 │ Layer Column ID│ 1│ 4│ 5│ 7│
4597 │ ╶───────────────────┼────┼────┼────┼────┤
4598 │ No Column ID │ 9│ 12│ 14│ 15│
4599 │ Layer Column ID│ 1│ 4│ 5│ 7│
4600 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4601 │ No QN61 Yes QN57 Yes Column ID │ 18│ 20│ 22│ 24│
4602 │ Layer Column ID│ 1│ 4│ 5│ 7│
4603 │ ╶───────────────────┼────┼────┼────┼────┤
4604 │ No Column ID │ 18│ 20│ 22│ 24│
4605 │ Layer Column ID│ 1│ 4│ 5│ 7│
4606 │ ╶────────────────────────────┼────┼────┼────┼────┤
4607 │ No QN57 Yes Column ID │ 26│ 27│ 30│ 31│
4608 │ Layer Column ID│ 1│ 4│ 5│ 7│
4609 │ ╶───────────────────┼────┼────┼────┼────┤
4610 │ No Column ID │ 26│ 27│ 30│ 31│
4611 │ Layer Column ID│ 1│ 4│ 5│ 7│
4612 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4617 ╭──────────────────────────────────────────┬───────────────────╮
4619 │ ├─────────┬─────────┤
4621 │ ├─────────┼─────────┤
4623 │ ├────┬────┼────┬────┤
4624 │ │ Yes│ No │ Yes│ No │
4625 │ ├────┼────┼────┼────┤
4626 │ │QN86│QN86│QN86│QN86│
4627 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4628 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 2│ 3│ 6│ 8│
4629 │ Layer Column ID│ 2│ 3│ 6│ 8│
4630 │ ╶───────────────────┼────┼────┼────┼────┤
4631 │ No Column ID │ 2│ 3│ 6│ 8│
4632 │ Layer Column ID│ 2│ 3│ 6│ 8│
4633 │ ╶────────────────────────────┼────┼────┼────┼────┤
4634 │ No QN57 Yes Column ID │ 10│ 11│ 13│ 16│
4635 │ Layer Column ID│ 2│ 3│ 6│ 8│
4636 │ ╶───────────────────┼────┼────┼────┼────┤
4637 │ No Column ID │ 10│ 11│ 13│ 16│
4638 │ Layer Column ID│ 2│ 3│ 6│ 8│
4639 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4640 │ No QN61 Yes QN57 Yes Column ID │ 17│ 19│ 21│ 23│
4641 │ Layer Column ID│ 2│ 3│ 6│ 8│
4642 │ ╶───────────────────┼────┼────┼────┼────┤
4643 │ No Column ID │ 17│ 19│ 21│ 23│
4644 │ Layer Column ID│ 2│ 3│ 6│ 8│
4645 │ ╶────────────────────────────┼────┼────┼────┼────┤
4646 │ No QN57 Yes Column ID │ 25│ 28│ 29│ 32│
4647 │ Layer Column ID│ 2│ 3│ 6│ 8│
4648 │ ╶───────────────────┼────┼────┼────┼────┤
4649 │ No Column ID │ 25│ 28│ 29│ 32│
4650 │ Layer Column ID│ 2│ 3│ 6│ 8│
4651 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4656 ╭──────────────────────────────────────────┬───────────────────╮
4658 │ ├─────────┬─────────┤
4660 │ ├─────────┼─────────┤
4662 │ ├────┬────┼────┬────┤
4663 │ │ Yes│ No │ Yes│ No │
4664 │ ├────┼────┼────┼────┤
4665 │ │QN86│QN86│QN86│QN86│
4666 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4667 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 34│ 36│ 37│ 39│
4668 │ Layer Column ID│ 10│ 12│ 13│ 15│
4669 │ ╶───────────────────┼────┼────┼────┼────┤
4670 │ No Column ID │ 34│ 36│ 37│ 39│
4671 │ Layer Column ID│ 10│ 12│ 13│ 15│
4672 │ ╶────────────────────────────┼────┼────┼────┼────┤
4673 │ No QN57 Yes Column ID │ 41│ 43│ 46│ 48│
4674 │ Layer Column ID│ 10│ 12│ 13│ 15│
4675 │ ╶───────────────────┼────┼────┼────┼────┤
4676 │ No Column ID │ 41│ 43│ 46│ 48│
4677 │ Layer Column ID│ 10│ 12│ 13│ 15│
4678 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4679 │ No QN61 Yes QN57 Yes Column ID │ 50│ 51│ 53│ 55│
4680 │ Layer Column ID│ 10│ 12│ 13│ 15│
4681 │ ╶───────────────────┼────┼────┼────┼────┤
4682 │ No Column ID │ 50│ 51│ 53│ 55│
4683 │ Layer Column ID│ 10│ 12│ 13│ 15│
4684 │ ╶────────────────────────────┼────┼────┼────┼────┤
4685 │ No QN57 Yes Column ID │ 58│ 60│ 62│ 64│
4686 │ Layer Column ID│ 10│ 12│ 13│ 15│
4687 │ ╶───────────────────┼────┼────┼────┼────┤
4688 │ No Column ID │ 58│ 60│ 62│ 64│
4689 │ Layer Column ID│ 10│ 12│ 13│ 15│
4690 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4695 ╭──────────────────────────────────────────┬───────────────────╮
4697 │ ├─────────┬─────────┤
4699 │ ├─────────┼─────────┤
4701 │ ├────┬────┼────┬────┤
4702 │ │ Yes│ No │ Yes│ No │
4703 │ ├────┼────┼────┼────┤
4704 │ │QN86│QN86│QN86│QN86│
4705 ├──────────────────────────────────────────┼────┼────┼────┼────┤
4706 │QN26 Yes QN61 Yes QN57 Yes Column ID │ 33│ 35│ 38│ 40│
4707 │ Layer Column ID│ 9│ 11│ 14│ 16│
4708 │ ╶───────────────────┼────┼────┼────┼────┤
4709 │ No Column ID │ 33│ 35│ 38│ 40│
4710 │ Layer Column ID│ 9│ 11│ 14│ 16│
4711 │ ╶────────────────────────────┼────┼────┼────┼────┤
4712 │ No QN57 Yes Column ID │ 42│ 44│ 45│ 47│
4713 │ Layer Column ID│ 9│ 11│ 14│ 16│
4714 │ ╶───────────────────┼────┼────┼────┼────┤
4715 │ No Column ID │ 42│ 44│ 45│ 47│
4716 │ Layer Column ID│ 9│ 11│ 14│ 16│
4717 │ ╶─────────────────────────────────────┼────┼────┼────┼────┤
4718 │ No QN61 Yes QN57 Yes Column ID │ 49│ 52│ 54│ 56│
4719 │ Layer Column ID│ 9│ 11│ 14│ 16│
4720 │ ╶───────────────────┼────┼────┼────┼────┤
4721 │ No Column ID │ 49│ 52│ 54│ 56│
4722 │ Layer Column ID│ 9│ 11│ 14│ 16│
4723 │ ╶────────────────────────────┼────┼────┼────┼────┤
4724 │ No QN57 Yes Column ID │ 57│ 59│ 61│ 63│
4725 │ Layer Column ID│ 9│ 11│ 14│ 16│
4726 │ ╶───────────────────┼────┼────┼────┼────┤
4727 │ No Column ID │ 57│ 59│ 61│ 63│
4728 │ Layer Column ID│ 9│ 11│ 14│ 16│
4729 ╰──────────────────────────────────────────┴────┴────┴────┴────╯
4733 AT_SETUP([CTABLES categorical summary functions])
4734 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4735 AT_DATA([ctables.sps],
4738 /TABLE region BY qnd5a[COUNT, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, TOTAL[COUNT, VALIDN, TOTALN]]
4739 /CATEGORIES VARIABLES=qnd5a TOTAL=YES MISSING=INCLUDE
4740 /SLABELS POSITION=ROW.
4742 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
4744 ╭─────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────╮
4745 │ │ D5a. What would you say is your primary ethnic background? │
4746 │ ├─────┬───────┬───────┬──────────┬──────────┬─────────┬──────────┬──────────────┬──────┬───────┬─────┤
4747 │ │ │ │ │ │ │ │ │ Multiple - │ │ │ │
4748 │ │ │ │ │ South │ Central │ Puerto │ Something│ cannot choose│ Don't│ │ │
4749 │ │Cuban│Mexican│Spanish│ American │ American │Rican, OR│ else │ one │ know │Refused│Total│
4750 ├─────────────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4751 │Region NE Count │ 6│ 8│ 8│ 11│ 7│ 39│ 23│ 2│ 0│ 1│ 105│
4752 │ Row % │ 5.7%│ 7.6%│ 7.6%│ 10.5%│ 6.7%│ 37.1%│ 21.9%│ 1.9%│ .0%│ 1.0%│ │
4753 │ Row │ 5.8%│ 7.7%│ 7.7%│ 10.6%│ 6.7%│ 37.5%│ 22.1%│ 1.9%│ .0%│ .0%│ │
4754 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
4755 │ % │ │ │ │ │ │ │ │ │ │ │ │
4756 │ Row │ .4%│ .6%│ .6%│ .8%│ .5%│ 2.8%│ 1.6%│ .1%│ .0%│ .1%│ │
4757 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
4758 │ % │ │ │ │ │ │ │ │ │ │ │ │
4759 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 104│
4760 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1409│
4761 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4762 │ MW Count │ 3│ 24│ 1│ 4│ 5│ 9│ 6│ 0│ 0│ 1│ 53│
4763 │ Row % │ 5.7%│ 45.3%│ 1.9%│ 7.5%│ 9.4%│ 17.0%│ 11.3%│ .0%│ .0%│ 1.9%│ │
4764 │ Row │ 5.8%│ 46.2%│ 1.9%│ 7.7%│ 9.6%│ 17.3%│ 11.5%│ .0%│ .0%│ .0%│ │
4765 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
4766 │ % │ │ │ │ │ │ │ │ │ │ │ │
4767 │ Row │ .2%│ 1.5%│ .1%│ .2%│ .3%│ .5%│ .4%│ .0%│ .0%│ .1%│ │
4768 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
4769 │ % │ │ │ │ │ │ │ │ │ │ │ │
4770 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 52│
4771 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1654│
4772 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4773 │ S Count │ 10│ 113│ 11│ 14│ 25│ 23│ 20│ 2│ 3│ 2│ 223│
4774 │ Row % │ 4.5%│ 50.7%│ 4.9%│ 6.3%│ 11.2%│ 10.3%│ 9.0%│ .9%│ 1.3%│ .9%│ │
4775 │ Row │ 4.6%│ 51.8%│ 5.0%│ 6.4%│ 11.5%│ 10.6%│ 9.2%│ .9%│ .0%│ .0%│ │
4776 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
4777 │ % │ │ │ │ │ │ │ │ │ │ │ │
4778 │ Row │ .4%│ 4.7%│ .5%│ .6%│ 1.0%│ 1.0%│ .8%│ .1%│ .1%│ .1%│ │
4779 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
4780 │ % │ │ │ │ │ │ │ │ │ │ │ │
4781 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 218│
4782 │ Total N│ │ │ │ │ │ │ │ │ │ │ 2390│
4783 │ ╶──────────┼─────┼───────┼───────┼──────────┼──────────┼─────────┼──────────┼──────────────┼──────┼───────┼─────┤
4784 │ W Count │ 1│ 166│ 28│ 5│ 15│ 7│ 19│ 3│ 0│ 1│ 245│
4785 │ Row % │ .4%│ 67.8%│ 11.4%│ 2.0%│ 6.1%│ 2.9%│ 7.8%│ 1.2%│ .0%│ .4%│ │
4786 │ Row │ .4%│ 68.0%│ 11.5%│ 2.0%│ 6.1%│ 2.9%│ 7.8%│ 1.2%│ .0%│ .0%│ │
4787 │ Valid N│ │ │ │ │ │ │ │ │ │ │ │
4788 │ % │ │ │ │ │ │ │ │ │ │ │ │
4789 │ Row │ .1%│ 10.7%│ 1.8%│ .3%│ 1.0%│ .5%│ 1.2%│ .2%│ .0%│ .1%│ │
4790 │ Total N│ │ │ │ │ │ │ │ │ │ │ │
4791 │ % │ │ │ │ │ │ │ │ │ │ │ │
4792 │ Valid N│ │ │ │ │ │ │ │ │ │ │ 244│
4793 │ Total N│ │ │ │ │ │ │ │ │ │ │ 1546│
4794 ╰─────────────────┴─────┴───────┴───────┴──────────┴──────────┴─────────┴──────────┴──────────────┴──────┴───────┴─────╯
4798 AT_SETUP([CTABLES scale summary functions])
4799 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
4800 AT_DATA([ctables.sps],
4804 * Use SPLIT FILE with FREQUENCIES to generate output equivalent to
4805 CTABLES later, to make the results easier to verify.
4806 SPLIT FILE BY REGION.
4809 /STATISTICS=MEAN SEMEAN MEDIAN MODE STDDEV VARIANCE RANGE MINIMUM MAXIMUM SUM
4810 /FORMAT NOTABLE /MISSING=INCLUDE.
4814 /VLABELS VARIABLE=qn19a DISPLAY=NONE
4815 /TABLE region BY qn19a[VALIDN, MISSING, MEAN, SEMEAN, MEDIAN, MODE, STDDEV, VARIANCE, RANGE, MINIMUM, MAXIMUM, SUM, COUNT, TOTALN, ROWPCT.SUM]
4816 /CATEGORIES VARIABLES=qn19a TOTAL=YES MISSING=INCLUDE
4817 /SLABELS POSITION=ROW
4818 /CLABELS ROWLABELS=OPPOSITE.
4820 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
4822 ╭─────────┬───────────────────────────────────╮
4824 │ ├────────┬────────┬────────┬────────┤
4825 │ │ NE │ MW │ S │ W │
4826 │ ├────────┼────────┼────────┼────────┤
4827 │ │ QN19A │ QN19A │ QN19A │ QN19A │
4828 ├─────────┼────────┼────────┼────────┼────────┤
4829 │N Valid │ 936│ 1019│ 1276│ 950│
4830 │ Missing│ 473│ 635│ 1114│ 596│
4831 ├─────────┼────────┼────────┼────────┼────────┤
4832 │Mean │ 19.33│ 19.83│ 20.29│ 19.87│
4833 ├─────────┼────────┼────────┼────────┼────────┤
4834 │S.E. Mean│ .14│ .16│ .18│ .17│
4835 ├─────────┼────────┼────────┼────────┼────────┤
4836 │Median │ 18.00│ 19.00│ 19.00│ 19.00│
4837 ├─────────┼────────┼────────┼────────┼────────┤
4838 │Mode │ 18.00│ 18.00│ 18.00│ 18.00│
4839 ├─────────┼────────┼────────┼────────┼────────┤
4840 │Std Dev │ 4.41│ 5.15│ 6.44│ 5.25│
4841 ├─────────┼────────┼────────┼────────┼────────┤
4842 │Variance │ 19.41│ 26.47│ 41.43│ 27.59│
4843 ├─────────┼────────┼────────┼────────┼────────┤
4844 │Range │ 59.00│ 71.00│ 75.00│ 61.00│
4845 ├─────────┼────────┼────────┼────────┼────────┤
4846 │Minimum │ .00│ 4.00│ 4.00│ 4.00│
4847 ├─────────┼────────┼────────┼────────┼────────┤
4848 │Maximum │ 59.00│ 75.00│ 79.00│ 65.00│
4849 ├─────────┼────────┼────────┼────────┼────────┤
4850 │Sum │18092.00│20206.00│25886.00│18877.00│
4851 ╰─────────┴────────┴────────┴────────┴────────╯
4854 ╭────────────────────────┬────────┬────────┬────────┬────────╮
4855 │ │ NE │ MW │ S │ W │
4856 ├────────────────────────┼────────┼────────┼────────┼────────┤
4857 │REGION Valid N │ 936│ 1019│ 1276│ 950│
4858 │ Missing │ 473.00│ 635.00│ 1114.00│ 596.00│
4859 │ Mean │ 19.33│ 19.83│ 20.29│ 19.87│
4860 │ Std Error of Mean│ .14│ .16│ .18│ .17│
4861 │ Median │ 18.00│ 19.00│ 19.00│ 19.00│
4862 │ Mode │ 18.00│ 18.00│ 18.00│ 18.00│
4863 │ Std Deviation │ 4.41│ 5.15│ 6.44│ 5.25│
4864 │ Variance │ 19.41│ 26.47│ 41.43│ 27.59│
4865 │ Range │ 59.00│ 71.00│ 75.00│ 61.00│
4866 │ Minimum │ .00│ 4.00│ 4.00│ 4.00│
4867 │ Maximum │ 59.00│ 75.00│ 79.00│ 65.00│
4868 │ Sum │18092.00│20206.00│25886.00│18877.00│
4869 │ Count │ 1409│ 1654│ 2390│ 1546│
4870 │ Total N │ 1409│ 1654│ 2390│ 1546│
4871 │ Row Sum % │ 21.8%│ 24.3%│ 31.2%│ 22.7%│
4872 ╰────────────────────────┴────────┴────────┴────────┴────────╯
4876 AT_SETUP([CTABLES scale summary functions - weighting])
4881 for n in 1 2 3 4 5 6 7 8 9 10; do
4882 if test $c -lt 15; then
4887 printf "$weight $a $b $cval\n"
4888 weight=$(expr \( $weight + 3 \) % 7 + 2)
4889 c=$(expr \( $c + 13 \) % 29 + 7)
4894 AT_DATA([analysis.sps],
4895 [[* Use SPLIT FILE with FREQUENCIES to generate output equivalent to
4896 CTABLES later, to make the results easier to verify.
4900 /STATISTICS=MEAN SEMEAN MEDIAN MODE STDDEV VARIANCE RANGE MINIMUM MAXIMUM SUM
4901 /FORMAT NOTABLE /MISSING=INCLUDE.
4905 /TABLE c[VALIDN, MISSING, MEAN F8.2, SEMEAN F8.2, MEDIAN F8.2, MODE, STDDEV F8.2, VARIANCE F8.2, RANGE F8.2, MINIMUM, MAXIMUM, SUM F8.2, COUNT, TOTALN, LAYERROWPCT.SUM] BY a>b
4906 /SLABELS POSITION=ROW
4907 /CATEGORIES VARIABLES=a b MISSING=INCLUDE.
4910 AT_DATA([ctables.sps],
4911 [[DATA LIST LIST NOTABLE FILE='ctables.txt'
4912 /w (F5.0) a b c (f2.0).
4913 VAR LEVEL w c (SCALE) a b (NOMINAL).
4914 MISSING VALUES a b (9).
4916 INCLUDE 'analysis.sps'.
4919 INCLUDE 'analysis.sps'.
4921 * Same as original analysis using unweighted versions of summaries.
4923 /TABLE c[UVALIDN, UMISSING, UMEAN F8.2, USEMEAN F8.2, UMEDIAN F8.2, UMODE, USTDDEV F8.2, UVARIANCE F8.2, USUM F8.2, UCOUNT, UTOTALN, ULAYERROWPCT.SUM] BY a>b
4924 /SLABELS POSITION=ROW
4925 /CATEGORIES VARIABLES=a b MISSING=INCLUDE.
4927 AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
4929 ╭─────────┬──────────────────────────────────────────────────────────────╮
4931 │ ├────────────────────┬────────────────────┬────────────────────┤
4933 │ ├────────────────────┼────────────────────┼────────────────────┤
4935 │ ├──────┬──────┬──────┼──────┬──────┬──────┼──────┬──────┬──────┤
4936 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
4937 │ ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4938 │ │ c │ c │ c │ c │ c │ c │ c │ c │ c │
4939 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4940 │N Valid │ 7│ 6│ 8│ 7│ 7│ 8│ 7│ 7│ 8│
4941 │ Missing│ 3│ 4│ 2│ 3│ 3│ 2│ 3│ 3│ 2│
4942 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4943 │Mean │ 25.86│ 24.50│ 24.63│ 25.86│ 25.71│ 24.25│ 25.43│ 25.29│ 23.88│
4944 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4945 │S.E. Mean│ 2.44│ 2.14│ 2.58│ 2.44│ 2.18│ 2.43│ 2.36│ 2.18│ 2.47│
4946 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4947 │Median │ 25.00│ 24.50│ 25.00│ 25.00│ 27.00│ 25.00│ 25.00│ 24.00│ 23.50│
4948 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4949 │Mode │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
4950 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4951 │Std Dev │ 6.47│ 5.24│ 7.31│ 6.47│ 5.77│ 6.88│ 6.24│ 5.77│ 6.98│
4952 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4953 │Variance │ 41.81│ 27.50│ 53.41│ 41.81│ 33.24│ 47.36│ 38.95│ 33.24│ 48.70│
4954 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4955 │Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
4956 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4957 │Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
4958 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4959 │Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
4960 ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4961 │Sum │181.00│147.00│197.00│181.00│180.00│194.00│178.00│177.00│191.00│
4962 ╰─────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
4965 ╭───────────────────┬──────────────────────────────────────────────────────────────╮
4967 │ ├────────────────────┬────────────────────┬────────────────────┤
4969 │ ├────────────────────┼────────────────────┼────────────────────┤
4971 │ ├──────┬──────┬──────┼──────┬──────┬──────┼──────┬──────┬──────┤
4972 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
4973 ├───────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
4974 │c Valid N │ 7│ 6│ 8│ 7│ 7│ 8│ 7│ 7│ 8│
4975 │ Missing │ 3│ 4│ 2│ 3│ 3│ 2│ 3│ 3│ 2│
4976 │ Mean │ 25.86│ 24.50│ 24.63│ 25.86│ 25.71│ 24.25│ 25.43│ 25.29│ 23.88│
4977 │ Std Error of Mean│ 2.44│ 2.14│ 2.58│ 2.44│ 2.18│ 2.43│ 2.36│ 2.18│ 2.47│
4978 │ Median │ 25.00│ 24.50│ 25.00│ 25.00│ 27.00│ 25.00│ 25.00│ 24.00│ 23.50│
4979 │ Mode │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
4980 │ Std Deviation │ 6.47│ 5.24│ 7.31│ 6.47│ 5.77│ 6.88│ 6.24│ 5.77│ 6.98│
4981 │ Variance │ 41.81│ 27.50│ 53.41│ 41.81│ 33.24│ 47.36│ 38.95│ 33.24│ 48.70│
4982 │ Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
4983 │ Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
4984 │ Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
4985 │ Sum │181.00│147.00│197.00│181.00│180.00│194.00│178.00│177.00│191.00│
4986 │ Count │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
4987 │ Total N │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
4988 │ Layer Row Sum % │ 11.1%│ 9.0%│ 12.1%│ 11.1%│ 11.1%│ 11.9%│ 10.9%│ 10.9%│ 11.7%│
4989 ╰───────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
4992 ╭─────────┬─────────────────────────────────────────────────────────────────╮
4994 │ ├─────────────────────┬─────────────────────┬─────────────────────┤
4996 │ ├─────────────────────┼─────────────────────┼─────────────────────┤
4998 │ ├───────┬──────┬──────┼──────┬───────┬──────┼──────┬──────┬───────┤
4999 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5000 │ ├───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5001 │ │ c │ c │ c │ c │ c │ c │ c │ c │ c │
5002 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5003 │N Valid │ 40│ 35│ 41│ 26│ 38│ 40│ 34│ 32│ 39│
5004 │ Missing│ 6│ 14│ 11│ 22│ 13│ 7│ 16│ 21│ 10│
5005 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5006 │Mean │ 27.23│ 24.20│ 22.63│ 27.96│ 27.21│ 23.48│ 23.71│ 25.47│ 26.03│
5007 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5008 │S.E. Mean│ .93│ .75│ 1.03│ 1.12│ .84│ .87│ 1.01│ 1.05│ 1.01│
5009 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5010 │Median │ 30.00│ 22.00│ 19.00│ 30.00│ 29.00│ 24.00│ 23.00│ 24.00│ 28.00│
5011 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5012 │Mode │ 34│ 29│ 19│ 34│ 33│ 28│ 23│ 18│ 30│
5013 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5014 │Std Dev │ 5.89│ 4.42│ 6.59│ 5.69│ 5.16│ 5.50│ 5.87│ 5.94│ 6.30│
5015 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5016 │Variance │ 34.64│ 19.52│ 43.39│ 32.36│ 26.66│ 30.20│ 34.46│ 35.29│ 39.71│
5017 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5018 │Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5019 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5020 │Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5021 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5022 │Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5023 ├─────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5024 │Sum │1089.00│847.00│928.00│727.00│1034.00│939.00│806.00│815.00│1015.00│
5025 ╰─────────┴───────┴──────┴──────┴──────┴───────┴──────┴──────┴──────┴───────╯
5028 ╭───────────────────┬─────────────────────────────────────────────────────────────────╮
5030 │ ├─────────────────────┬─────────────────────┬─────────────────────┤
5032 │ ├─────────────────────┼─────────────────────┼─────────────────────┤
5034 │ ├───────┬──────┬──────┼──────┬───────┬──────┼──────┬──────┬───────┤
5035 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5036 ├───────────────────┼───────┼──────┼──────┼──────┼───────┼──────┼──────┼──────┼───────┤
5037 │c Valid N │ 40│ 35│ 41│ 26│ 38│ 40│ 34│ 32│ 39│
5038 │ Missing │ 6│ 14│ 11│ 22│ 13│ 7│ 16│ 21│ 10│
5039 │ Mean │ 27.22│ 24.20│ 22.63│ 27.96│ 27.21│ 23.48│ 23.71│ 25.47│ 26.03│
5040 │ Std Error of Mean│ .93│ .75│ 1.03│ 1.12│ .84│ .87│ 1.01│ 1.05│ 1.01│
5041 │ Median │ 30.00│ 22.00│ 19.00│ 30.00│ 29.00│ 24.00│ 23.00│ 24.00│ 28.00│
5042 │ Mode │ 34│ 29│ 19│ 34│ 33│ 28│ 23│ 18│ 30│
5043 │ Std Deviation │ 5.89│ 4.42│ 6.59│ 5.69│ 5.16│ 5.50│ 5.87│ 5.94│ 6.30│
5044 │ Variance │ 34.64│ 19.52│ 43.39│ 32.36│ 26.66│ 30.20│ 34.46│ 35.29│ 39.71│
5045 │ Range │ 18.00│ 13.00│ 20.00│ 18.00│ 15.00│ 20.00│ 18.00│ 15.00│ 20.00│
5046 │ Minimum │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5047 │ Maximum │ 34│ 31│ 35│ 34│ 33│ 35│ 34│ 33│ 35│
5048 │ Sum │1089.00│847.00│928.00│727.00│1034.00│939.00│806.00│815.00│1015.00│
5049 │ Count │ 46│ 49│ 52│ 48│ 51│ 47│ 50│ 53│ 49│
5050 │ Total N │ 46│ 49│ 52│ 48│ 51│ 47│ 50│ 53│ 49│
5051 │ Layer Row Sum % │ 13.3%│ 10.3%│ 11.3%│ 8.9%│ 12.6%│ 11.5%│ 9.8%│ 9.9%│ 12.4%│
5052 ╰───────────────────┴───────┴──────┴──────┴──────┴───────┴──────┴──────┴──────┴───────╯
5055 ╭────────────────────────────┬──────────────────────────────────────────────────────────────╮
5057 │ ├────────────────────┬────────────────────┬────────────────────┤
5059 │ ├────────────────────┼────────────────────┼────────────────────┤
5061 │ ├──────┬──────┬──────┼──────┬──────┬──────┼──────┬──────┬──────┤
5062 │ │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │ 3 │ 4 │ 9 │
5063 ├────────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
5064 │c Valid N │ 7│ 6│ 8│ 7│ 7│ 8│ 7│ 7│ 8│
5065 │ Missing │ 3│ 4│ 2│ 3│ 3│ 2│ 3│ 3│ 2│
5066 │ Unweighted Mean │ 25.86│ 24.50│ 24.63│ 25.86│ 25.71│ 24.25│ 25.43│ 25.29│ 23.88│
5067 │ Std Error of Mean │ 2.44│ 2.14│ 2.58│ 2.44│ 2.18│ 2.43│ 2.36│ 2.18│ 2.47│
5068 │ Median │ 25.00│ 24.50│ 25.00│ 25.00│ 27.00│ 25.00│ 25.00│ 24.00│ 23.50│
5069 │ Mode │ 16│ 18│ 15│ 16│ 18│ 15│ 16│ 18│ 15│
5070 │ Std Deviation │ 6.47│ 5.24│ 7.31│ 6.47│ 5.77│ 6.88│ 6.24│ 5.77│ 6.98│
5071 │ Variance │ 41.81│ 27.50│ 53.41│ 41.81│ 33.24│ 47.36│ 38.95│ 33.24│ 48.70│
5072 │ Sum │181.00│147.00│197.00│181.00│180.00│194.00│178.00│177.00│191.00│
5073 │ Unweighted Count │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5074 │ Total N │ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│ 10│
5075 │ Unweighted Layer Row Sum %│ 11.1%│ 9.0%│ 12.1%│ 11.1%│ 11.1%│ 11.9%│ 10.9%│ 10.9%│ 11.7%│
5076 ╰────────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────╯
5080 AT_SETUP([CTABLES hidden scale VLABELS])
5081 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
5082 AT_DATA([ctables.sps],
5085 /TABLE region BY qn19a + qn35
5086 /SLABELS POSITION=ROW.
5088 /VLABELS VARIABLE=qn19a DISPLAY=NONE
5089 /TABLE region BY qn19a + qn35
5090 /SLABELS POSITION=ROW.
5092 /VLABELS VARIABLE=qn35 DISPLAY=NONE
5093 /TABLE region BY qn19a + qn35
5094 /SLABELS POSITION=ROW.
5096 * This one in particular caused a crash because no categories were
5097 created on the column axis, so passing in 0 for the index was still
5098 too big for that number of categories. It was fixed by creating a
5099 name-only category for each variable despite the "NONE" request,
5100 then hiding the entire dimension's labels if all its labels were
5103 /VLABELS VARIABLE=qn19a qn35 DISPLAY=NONE
5104 /TABLE region BY qn19a + qn35
5105 /SLABELS POSITION=ROW.
5107 AT_CHECK([pspp ctables.sps -O box=unicode], [0], [dnl
5109 ╭──────────────┬────────────────────────────┬─────────────────────────────────╮
5110 │ │ 19a. About how old were you│ 35. In the past thirty days, how│
5111 │ │ when you first starting │ many times have you driven a │
5112 │ │ drinking alcohol, not │ motor vehicle WITHIN TWO HOURS │
5113 │ │ counting small tastes or │ AFTER drinking alcoholic │
5114 │ │ sips of alcohol. │ beverages? │
5115 ├──────────────┼────────────────────────────┼─────────────────────────────────┤
5116 │Region NE Mean│ 19.33│ 2│
5117 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5118 │ MW Mean│ 19.83│ 2│
5119 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5121 │ ╶───────┼────────────────────────────┼─────────────────────────────────┤
5123 ╰──────────────┴────────────────────────────┴─────────────────────────────────╯
5126 ╭──────────────┬─────┬────────────────────────────────────────────────────────╮
5127 │ │ │ 35. In the past thirty days, how many times have you │
5128 │ │ │ driven a motor vehicle WITHIN TWO HOURS AFTER drinking │
5129 │ │QN19A│ alcoholic beverages? │
5130 ├──────────────┼─────┼────────────────────────────────────────────────────────┤
5131 │Region NE Mean│19.33│ 2│
5132 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5134 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5136 │ ╶───────┼─────┼────────────────────────────────────────────────────────┤
5138 ╰──────────────┴─────┴────────────────────────────────────────────────────────╯
5141 ╭──────────────┬─────────────────────────────────────────────────────────┬────╮
5142 │ │ 19a. About how old were you when you first starting │ │
5143 │ │ drinking alcohol, not counting small tastes or sips of │ │
5145 ├──────────────┼─────────────────────────────────────────────────────────┼────┤
5146 │Region NE Mean│ 19.33│ 2│
5147 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5148 │ MW Mean│ 19.83│ 2│
5149 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5151 │ ╶───────┼─────────────────────────────────────────────────────────┼────┤
5153 ╰──────────────┴─────────────────────────────────────────────────────────┴────╯
5156 ╭──────────────┬───────╮
5157 │Region NE Mean│19.33 2│
5164 ╰──────────────┴───────╯
5168 AT_SETUP([CTABLES with SPLIT FILE])
5169 AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
5170 AT_DATA([ctables.sps],
5173 SORT CASES BY qns3a.
5175 CTABLES /TABLE qn105ba.
5177 * Layered split has no effect on output.
5178 SPLIT FILE BY qns3a.
5179 CTABLES /TABLE qn105ba.
5181 * Add column variable qns3a to compare against separate splits.
5182 CTABLES /TABLE qn105ba BY qns3a.
5184 * Separate splits are truly output separately.
5185 SPLIT FILE SEPARATE BY qns3a.
5186 CTABLES /TABLE qn105ba.
5188 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
5190 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5192 ├────────────────────────────────────────────────────────────────────────┼─────┤
5193 │105b. How likely is it that drivers who have had too much Almost │ 700│
5194 │to drink to drive safely will A. Get stopped by the police? certain │ │
5195 │ Very likely │ 1502│
5202 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5205 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5207 ├────────────────────────────────────────────────────────────────────────┼─────┤
5208 │105b. How likely is it that drivers who have had too much Almost │ 700│
5209 │to drink to drive safely will A. Get stopped by the police? certain │ │
5210 │ Very likely │ 1502│
5217 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5220 ╭─────────────────────────────────────────────────────────────────┬────────────╮
5226 ├─────────────────────────────────────────────────────────────────┼─────┼──────┤
5227 │105b. How likely is it that drivers who have had too Almost │ 297│ 403│
5228 │much to drink to drive safely will A. Get stopped by certain │ │ │
5229 │the police? Very likely │ 660│ 842│
5230 │ Somewhat │ 1174│ 1589│
5232 │ Somewhat │ 640│ 667│
5236 ╰─────────────────────────────────────────────────────────────────┴─────┴──────╯
5239 ╭────────────┬─────╮
5241 ├────────────┼─────┤
5242 │S3a. GENDER:│Male │
5243 ╰────────────┴─────╯
5246 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5248 ├────────────────────────────────────────────────────────────────────────┼─────┤
5249 │105b. How likely is it that drivers who have had too much Almost │ 297│
5250 │to drink to drive safely will A. Get stopped by the police? certain │ │
5251 │ Very likely │ 660│
5258 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5261 ╭────────────┬──────╮
5263 ├────────────┼──────┤
5264 │S3a. GENDER:│Female│
5265 ╰────────────┴──────╯
5268 ╭────────────────────────────────────────────────────────────────────────┬─────╮
5270 ├────────────────────────────────────────────────────────────────────────┼─────┤
5271 │105b. How likely is it that drivers who have had too much Almost │ 403│
5272 │to drink to drive safely will A. Get stopped by the police? certain │ │
5273 │ Very likely │ 842│
5280 ╰────────────────────────────────────────────────────────────────────────┴─────╯
5284 AT_SETUP([CTABLES variable level inference])
5285 AT_DATA([data.txt], [dnl
5286 dnl n1 has 10 unique small values -> nominal.
5287 dnl n2 has 23 unique small values -> nominal.
5288 dnl n3 is all missing -> nominal.
5289 dnl s1 has 24 unique small values -> scale.
5290 dnl s2 has one negative value -> scale.
5291 dnl s3 has one non-integer value -> scale.
5292 dnl s4 has no valid values less than 10 -> scale.
5293 dnl s5 has no valid values less than 10,000 -> scale.
5294 1 1 . 1 1 1 10 10001
5295 2 2 . 2 2 2 11 10002
5296 3 3 . 3 3 3 12 10003
5297 4 4 . 4 4 4 13 10004
5298 5 5 . 5 5 5 14 10005
5299 6 6 . 6 6 6 15 10006
5300 7 7 . 7 7 7 16 10007
5301 8 8 . 8 8 8 17 10008
5302 9 9 . 9 9 9 18 10009
5303 10 10 . 10 10 10.5 19 110000
5304 1 11 . 11 -1 1 11 10001
5305 2 12 . 12 2 2 12 10002
5306 3 13 . 13 3 3 13 10003
5307 4 14 . 14 4 4 14 10004
5308 5 15 . 15 5 5 15 10005
5309 6 16 . 16 6 6 16 10006
5310 7 17 . 17 7 7 17 10007
5311 8 18 . 18 8 8 18 10008
5312 9 19 . 19 9 9 19 10009
5313 1 20 . 20 1 1 20 10001
5314 2 21 . 21 2 2 21 10002
5315 3 22 . 22 3 3 22 10003
5316 4 23 . 23 4 4 23 10004
5317 5 23 . 24 5 5 24 10005
5318 6 23 . 24 6 6 25 10006
5321 AT_DATA([ctables.sps], [dnl
5322 DATA LIST LIST file='data.txt' NOTABLE /n1 to n3 s1 to s5.
5324 * Nominal formats (copied from data that will default to scale).
5327 FORMATS n4(WKDAY5) n5(MONTH5).
5329 * Scale formats (copied from data that will default to nominal).
5333 FORMATS s6(DOLLAR6.2) s7(CCA8.2) s8(DATETIME17).
5338 CTABLES /TABLE n1 + n2 + n3 + string + s1 + s2 + s3 + s4 + s5.
5342 AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
5344 ╭──────┬────────┬──────────────┬─────┬─────┬─────────┬────────────┬────────────╮
5345 │ │ │ Measurement │ │ │ │ │ │
5346 │Name │Position│ Level │ Role│Width│Alignment│Print Format│Write Format│
5347 ├──────┼────────┼──────────────┼─────┼─────┼─────────┼────────────┼────────────┤
5348 │n1 │ 1│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5349 │n2 │ 2│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5350 │n3 │ 3│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5351 │s1 │ 4│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5352 │s2 │ 5│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5353 │s3 │ 6│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5354 │s4 │ 7│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5355 │s5 │ 8│Unknown │Input│ 8│Right │F8.2 │F8.2 │
5356 │n4 │ 9│Unknown │Input│ 8│Right │WKDAY5 │WKDAY5 │
5357 │n5 │ 10│Unknown │Input│ 8│Right │MONTH5 │MONTH5 │
5358 │s6 │ 11│Unknown │Input│ 8│Right │DOLLAR6.2 │DOLLAR6.2 │
5359 │s7 │ 12│Unknown │Input│ 8│Right │CCA8.2 │CCA8.2 │
5360 │s8 │ 13│Unknown │Input│ 8│Right │DATETIME17.0│DATETIME17.0│
5361 │string│ 14│Nominal │Input│ 8│Left │A8 │A8 │
5362 ╰──────┴────────┴──────────────┴─────┴─────┴─────────┴────────────┴────────────╯
5365 ╭────────────┬─────┬────────╮
5367 ├────────────┼─────┼────────┤
5378 ├────────────┼─────┼────────┤
5402 ├────────────┼─────┼────────┤
5404 ├────────────┼─────┼────────┤
5406 ├────────────┼─────┼────────┤
5408 ├────────────┼─────┼────────┤
5410 ├────────────┼─────┼────────┤
5412 ├────────────┼─────┼────────┤
5414 ╰────────────┴─────┴────────╯
5417 ╭──────┬────────┬──────────────┬─────┬─────┬─────────┬────────────┬────────────╮
5418 │ │ │ Measurement │ │ │ │ │ │
5419 │Name │Position│ Level │ Role│Width│Alignment│Print Format│Write Format│
5420 ├──────┼────────┼──────────────┼─────┼─────┼─────────┼────────────┼────────────┤
5421 │n1 │ 1│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5422 │n2 │ 2│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5423 │n3 │ 3│Nominal │Input│ 8│Right │F8.2 │F8.2 │
5424 │s1 │ 4│Scale │Input│ 8│Right │F8.2 │F8.2 │
5425 │s2 │ 5│Scale │Input│ 8│Right │F8.2 │F8.2 │
5426 │s3 │ 6│Scale │Input│ 8│Right │F8.2 │F8.2 │
5427 │s4 │ 7│Scale │Input│ 8│Right │F8.2 │F8.2 │
5428 │s5 │ 8│Scale │Input│ 8│Right │F8.2 │F8.2 │
5429 │n4 │ 9│Nominal │Input│ 8│Right │WKDAY5 │WKDAY5 │
5430 │n5 │ 10│Nominal │Input│ 8│Right │MONTH5 │MONTH5 │
5431 │s6 │ 11│Scale │Input│ 8│Right │DOLLAR6.2 │DOLLAR6.2 │
5432 │s7 │ 12│Scale │Input│ 8│Right │CCA8.2 │CCA8.2 │
5433 │s8 │ 13│Scale │Input│ 8│Right │DATETIME17.0│DATETIME17.0│
5434 │string│ 14│Nominal │Input│ 8│Left │A8 │A8 │
5435 ╰──────┴────────┴──────────────┴─────┴─────┴─────────┴────────────┴────────────╯