AT_BANNER([CTABLES])
-dnl TODO:
+dnl Features not yet implemented:
dnl
-dnl - Parsing (positive and negative)
-dnl - String variables and values
-dnl - Date/time variables and values
-dnl - Multiple-response sets.
-dnl * MRSETS subcommand.
dnl - SPLIT FILE with SEPARATE splits
dnl - Definition of columns/rows when labels are rotated from one axis to another.
dnl - Preprocessing to distinguish categorical from scale.
dnl * U-prefix for unweighted summaries.
dnl * .LCL and .UCL suffixes.
dnl * .SE suffixes.
-dnl * Separate summary functions for totals and subtotals.
-dnl - Special formats for summary functions: NEGPAREN, NEQUAL, PAREN, PCTPAREN.
-dnl - Testing details of missing value handling in summaries.
-dnl - test CLABELS ROWLABELS=LAYER.
dnl - CATEGORIES:
-dnl * Special case for explicit category specifications and multiple dichotomy sets
-dnl * THRU
-dnl * OTHERNM
-dnl * String values
-dnl * Date values
dnl * Data-dependent sorting.
-dnl - TITLES: )DATE, )TIME, )TABLE.
-dnl - SIGTEST
-dnl - COMPARETEST
-dnl - FORMAT:
-dnl * MINCOLWIDTH, MAXCOLWIDTH, UNITS.
-dnl * EMPTY.
-dnl * MISSING.
-dnl - VLABELS.
-dnl - SMISSING (see documentation).
-dnl - Test WEIGHT and adjustment weights.
-dnl - Test PCOMPUTE and PPROPERTIES.
dnl - PCOMPUTE:
dnl * multi-dimensional
dnl * MISSING, OTHERNM
dnl - PPROPERTIES:
dnl * )LABEL[N].
dnl * summary statistics and formats?
+dnl
+dnl Features not yet tested:
+dnl - Parsing (positive and negative)
+dnl - String variables and values
+dnl - Testing details of missing value handling in summaries.
+dnl - test CLABELS ROWLABELS=LAYER.
+dnl - Test VLABELS.
+dnl - Test WEIGHT and adjustment weights.
+dnl - Test PCOMPUTE and PPROPERTIES.
+dnl - EMPTY=INCLUDE For string ranges.
+dnl - Summary functions:
+dnl * Separate summary functions for totals and subtotals.
+dnl - CATEGORIES:
+dnl * String values
+dnl * Date values
+dnl * THRU (numeric ranges)
+dnl * THRU (string ranges)
+dnl * OTHERNM
+dnl - FORMAT:
+dnl * MINCOLWIDTH, MAXCOLWIDTH, UNITS.
+dnl * EMPTY.
+dnl * MISSING.
dnl - HIDESMALLCOUNTS.
-dnl - Are string ranges a thing?
+dnl - Date/time variables and values
+dnl - Special formats for summary functions: NEGPAREN, NEQUAL, PAREN, PCTPAREN.
+dnl - TITLES: )DATE, )TIME, )TABLE.
+dnl
+dnl Not for v1:
+dnl - Multiple response sets
+dnl - MRSETS subcommand.
+dnl - CATEGORIES: Special case for explicit category specifications and multiple dichotomy sets.
+dnl - SIGTEST
+dnl - COMPARETEST
+dnl
dnl
dnl Bug:
dnl CTABLES /TABLE=qnd1 [MEAN, MEDIAN] BY qns3a.
AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
-CTABLES /TABLE qnd1[COUNT, MEAN, STDDEV, MINIMUM, MAXIMUM].
+CTABLES /TABLE qnd1[COUNT, VALIDN, TOTALN, MEAN, STDDEV, MINIMUM, MAXIMUM].
CTABLES /TABLE BY qnd1.
CTABLES /TABLE BY BY qnd1.
]])
AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
- Custom Tables
-╭──────────────────────────┬─────┬────┬─────────────┬───────┬───────╮
-│ │Count│Mean│Std Deviation│Minimum│Maximum│
-├──────────────────────────┼─────┼────┼─────────────┼───────┼───────┤
-│D1. AGE: What is your age?│ 6930│ 48│ 19│ 16│ 86│
-╰──────────────────────────┴─────┴────┴─────────────┴───────┴───────╯
+ Custom Tables
+╭──────────────────────┬─────┬───────┬───────┬────┬────────────┬───────┬───────╮
+│ │ │ │ │ │ Std │ │ │
+│ │Count│Valid N│Total N│Mean│ Deviation │Minimum│Maximum│
+├──────────────────────┼─────┼───────┼───────┼────┼────────────┼───────┼───────┤
+│D1. AGE: What is your │ 6999│ 6930│ 6999│ 48│ 19│ 16│ 86│
+│age? │ │ │ │ │ │ │ │
+╰──────────────────────┴─────┴───────┴───────┴────┴────────────┴───────┴───────╯
Custom Tables
╭──────────────────────────╮
[[GET 'nhtsa.sav'.
CTABLES /TABLE=qn17
/CATEGORIES VARIABLES=qn17 TOTAL=YES LABEL='Number responding'.
-CTABLES /TABLE=region > qn18 [MEAN, COUNT]
+DESCRIPTIVES qn18/STATISTICS=MEAN.
+CTABLES /TABLE=region > qn18 [MEAN, COUNT, VALIDN, TOTALN]
/CATEGORIES VARIABLES=region TOTAL=YES LABEL='All regions'.
]])
AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
│ Number responding │ 4221│
╰────────────────────────────────────────────────────────────────────────┴─────╯
+ Descriptive Statistics
+╭────────────────────────────────────────────────────────────────────┬────┬────╮
+│ │ N │Mean│
+├────────────────────────────────────────────────────────────────────┼────┼────┤
+│18. When you drink ANSWERFROM(QN17R1), about how many │4218│4.62│
+│ANSWERFROM(QN17R2) do you usually drink per sitting? │ │ │
+│Valid N (listwise) │6999│ │
+│Missing N (listwise) │2781│ │
+╰────────────────────────────────────────────────────────────────────┴────┴────╯
+
Custom Tables
-╭───────────────────────────────────────────────────────────────────┬────┬─────╮
-│ │Mean│Count│
-├───────────────────────────────────────────────────────────────────┼────┼─────┤
-│Region NE 18. When you drink ANSWERFROM(QN17R1), about how │4.36│ 949│
-│ many ANSWERFROM(QN17R2) do you usually drink per │ │ │
-│ sitting? │ │ │
-│ ╶────────────────────────────────────────────────────────────┼────┼─────┤
-│ MW 18. When you drink ANSWERFROM(QN17R1), about how │4.67│ 1027│
-│ many ANSWERFROM(QN17R2) do you usually drink per │ │ │
-│ sitting? │ │ │
-│ ╶────────────────────────────────────────────────────────────┼────┼─────┤
-│ S 18. When you drink ANSWERFROM(QN17R1), about how │4.71│ 1287│
-│ many ANSWERFROM(QN17R2) do you usually drink per │ │ │
-│ sitting? │ │ │
-│ ╶────────────────────────────────────────────────────────────┼────┼─────┤
-│ W 18. When you drink ANSWERFROM(QN17R1), about how │4.69│ 955│
-│ many ANSWERFROM(QN17R2) do you usually drink per │ │ │
-│ sitting? │ │ │
-│ ╶────────────────────────────────────────────────────────────┼────┼─────┤
-│ All 18. When you drink ANSWERFROM(QN17R1), about how │4.62│ 4218│
-│ regions many ANSWERFROM(QN17R2) do you usually drink per │ │ │
-│ sitting? │ │ │
-╰───────────────────────────────────────────────────────────────────┴────┴─────╯
+╭──────────────────────────────────────────────────────┬────┬─────┬──────┬─────╮
+│ │ │ │ Valid│Total│
+│ │Mean│Count│ N │ N │
+├──────────────────────────────────────────────────────┼────┼─────┼──────┼─────┤
+│Region NE 18. When you drink ANSWERFROM(QN17R1),│4.36│ 1409│ 949│ 1409│
+│ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
+│ you usually drink per sitting? │ │ │ │ │
+│ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
+│ MW 18. When you drink ANSWERFROM(QN17R1),│4.67│ 1654│ 1027│ 1654│
+│ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
+│ you usually drink per sitting? │ │ │ │ │
+│ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
+│ S 18. When you drink ANSWERFROM(QN17R1),│4.71│ 2390│ 1287│ 2390│
+│ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
+│ you usually drink per sitting? │ │ │ │ │
+│ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
+│ W 18. When you drink ANSWERFROM(QN17R1),│4.69│ 1546│ 955│ 1546│
+│ about how many ANSWERFROM(QN17R2) do │ │ │ │ │
+│ you usually drink per sitting? │ │ │ │ │
+│ ╶───────────────────────────────────────────────┼────┼─────┼──────┼─────┤
+│ All 18. When you drink ANSWERFROM(QN17R1),│4.62│ 6999│ 4218│ 6999│
+│ regions about how many ANSWERFROM(QN17R2) do │ │ │ │ │
+│ you usually drink per sitting? │ │ │ │ │
+╰──────────────────────────────────────────────────────┴────┴─────┴──────┴─────╯
])
AT_CLEANUP
│ Female│ 943│
╰──────────────────────────────┴────────────╯
])
-AT_CLEANUP
\ No newline at end of file
+AT_CLEANUP
+
+AT_SETUP([CTABLES missing values])
+AT_DATA([ctables.sps],
+[[DATA LIST LIST NOTABLE/x y.
+BEGIN DATA.
+1 1
+1 2
+1 3
+1 4
+1 5
+1 .
+2 1
+2 2
+2 3
+2 4
+2 5
+2 .
+3 1
+3 2
+3 3
+3 4
+3 5
+3 .
+4 1
+4 2
+4 3
+4 4
+4 5
+4 .
+5 1
+5 2
+5 3
+5 4
+5 5
+5 .
+. 1
+. 2
+. 3
+. 4
+. 5
+. .
+END DATA.
+MISSING VALUES x (1, 2) y (2, 3).
+VARIABLE LEVEL ALL (NOMINAL).
+
+CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
+ /CATEGORIES VARIABLES=ALL TOTAL=YES.
+CTABLES /TABLE x[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, VALIDN, TOTALN]]
+ /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE.
+CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
+ /CATEGORIES VARIABLES=ALL TOTAL=YES
+ /SLABELS POSITION=ROW.
+CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
+ /CATEGORIES VARIABLES=ALL TOTAL=YES MISSING=INCLUDE
+ /SLABELS POSITION=ROW.
+CTABLES /TABLE x BY y[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, TOTALS[COUNT, COLPCT, COLPCT.VALIDN, COLPCT.TOTALN, ROWPCT, ROWPCT.VALIDN, ROWPCT.TOTALN, VALIDN, TOTALN]]
+ /CATEGORIES VARIABLES=x [1, 2, 3, 4] TOTAL=YES
+ /CATEGORIES VARIABLES=y [1, 3, 4, 5] TOTAL=YES
+ /SLABELS POSITION=ROW.
+]])
+AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
+ Custom Tables
+╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
+│ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
+├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
+│x 3.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
+│ 4.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
+│ 5.00 │ 6│ 33.3%│ 33.3%│ 16.7%│ │ │
+│ Total│ 18│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
+╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
+dnl Note that Column Total N % doesn't add up to 100 because missing
+dnl values are included in the total but not shown as a category and this
+dnl is expected behavior.
+
+ Custom Tables
+╭───────┬─────┬────────┬────────────────┬────────────────┬───────┬───────╮
+│ │Count│Column %│Column Valid N %│Column Total N %│Valid N│Total N│
+├───────┼─────┼────────┼────────────────┼────────────────┼───────┼───────┤
+│x 1.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
+│ 2.00 │ 6│ 20.0%│ .0%│ 16.7%│ │ │
+│ 3.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
+│ 4.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
+│ 5.00 │ 6│ 20.0%│ 33.3%│ 16.7%│ │ │
+│ Total│ 30│ 100.0%│ 100.0%│ 100.0%│ 18│ 36│
+╰───────┴─────┴────────┴────────────────┴────────────────┴───────┴───────╯
+dnl Note that Column Total N % doesn't add up to 100 because system-missing
+dnl values are included in the total but not shown as a category and this
+dnl is expected behavior.
+
+ Custom Tables
+╭────────────────────────┬───────────────────────────╮
+│ │ y │
+│ ├──────┬──────┬──────┬──────┤
+│ │ 1.00 │ 4.00 │ 5.00 │ Total│
+├────────────────────────┼──────┼──────┼──────┼──────┤
+│x 3.00 Count │ 1│ 1│ 1│ 3│
+│ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
+│ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
+│ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ .│
+│ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
+│ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
+│ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
+│ Valid N │ │ │ │ 3│
+│ Total N │ │ │ │ 6│
+│ ╶──────────────────────┼──────┼──────┼──────┼──────┤
+│ 4.00 Count │ 1│ 1│ 1│ 3│
+│ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
+│ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
+│ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ .│
+│ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
+│ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
+│ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
+│ Valid N │ │ │ │ 3│
+│ Total N │ │ │ │ 6│
+│ ╶──────────────────────┼──────┼──────┼──────┼──────┤
+│ 5.00 Count │ 1│ 1│ 1│ 3│
+│ Column % │ 33.3%│ 33.3%│ 33.3%│ .│
+│ Column Valid N %│ 33.3%│ 33.3%│ 33.3%│ .│
+│ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ .│
+│ Row % │ 33.3%│ 33.3%│ 33.3%│100.0%│
+│ Row Valid N % │ 33.3%│ 33.3%│ 33.3%│100.0%│
+│ Row Total N % │ 16.7%│ 16.7%│ 16.7%│100.0%│
+│ Valid N │ │ │ │ 3│
+│ Total N │ │ │ │ 6│
+│ ╶──────────────────────┼──────┼──────┼──────┼──────┤
+│ Total Count │ 3│ 3│ 3│ 9│
+│ Column % │100.0%│100.0%│100.0%│ .│
+│ Column Valid N %│100.0%│100.0%│100.0%│ .│
+│ Column Total N %│100.0%│100.0%│100.0%│ .│
+│ Row % │ .│ .│ .│ .│
+│ Row Valid N % │ .│ .│ .│ .│
+│ Row Total N % │ .│ .│ .│ .│
+│ Valid N │ 3│ 3│ 3│ 9│
+│ Total N │ 6│ 6│ 6│ 36│
+╰────────────────────────┴──────┴──────┴──────┴──────╯
+
+ Custom Tables
+╭────────────────────────┬─────────────────────────────────────────╮
+│ │ y │
+│ ├──────┬──────┬──────┬──────┬──────┬──────┤
+│ │ 1.00 │ 2.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
+├────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
+│x 1.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
+│ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
+│ Column Valid N %│ .0%│ .│ .│ .0%│ .0%│ .│
+│ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
+│ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
+│ Row Valid N % │ .│ .│ .│ .│ .│ .│
+│ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
+│ Valid N │ │ │ │ │ │ 0│
+│ Total N │ │ │ │ │ │ 6│
+│ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
+│ 2.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
+│ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
+│ Column Valid N %│ .0%│ .│ .│ .0%│ .0%│ .│
+│ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
+│ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
+│ Row Valid N % │ .│ .│ .│ .│ .│ .│
+│ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
+│ Valid N │ │ │ │ │ │ 0│
+│ Total N │ │ │ │ │ │ 6│
+│ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
+│ 3.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
+│ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
+│ Column Valid N %│ 33.3%│ .│ .│ 33.3%│ 33.3%│ .│
+│ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
+│ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
+│ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
+│ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
+│ Valid N │ │ │ │ │ │ 3│
+│ Total N │ │ │ │ │ │ 6│
+│ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
+│ 4.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
+│ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
+│ Column Valid N %│ 33.3%│ .│ .│ 33.3%│ 33.3%│ .│
+│ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
+│ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
+│ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
+│ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
+│ Valid N │ │ │ │ │ │ 3│
+│ Total N │ │ │ │ │ │ 6│
+│ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
+│ 5.00 Count │ 1│ 1│ 1│ 1│ 1│ 5│
+│ Column % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
+│ Column Valid N %│ 33.3%│ .│ .│ 33.3%│ 33.3%│ .│
+│ Column Total N %│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│ .│
+│ Row % │ 20.0%│ 20.0%│ 20.0%│ 20.0%│ 20.0%│100.0%│
+│ Row Valid N % │ 33.3%│ .0%│ .0%│ 33.3%│ 33.3%│100.0%│
+│ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
+│ Valid N │ │ │ │ │ │ 3│
+│ Total N │ │ │ │ │ │ 6│
+│ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┤
+│ Total Count │ 5│ 5│ 5│ 5│ 5│ 25│
+│ Column % │100.0%│100.0%│100.0%│100.0%│100.0%│ .│
+│ Column Valid N %│100.0%│ .│ .│100.0%│100.0%│ .│
+│ Column Total N %│100.0%│100.0%│100.0%│100.0%│100.0%│ .│
+│ Row % │ .│ .│ .│ .│ .│ .│
+│ Row Valid N % │ .│ .│ .│ .│ .│ .│
+│ Row Total N % │ .│ .│ .│ .│ .│ .│
+│ Valid N │ 3│ 0│ 0│ 3│ 3│ 9│
+│ Total N │ 6│ 6│ 6│ 6│ 6│ 36│
+╰────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────╯
+
+ Custom Tables
+╭────────────────────────┬──────────────────────────────────╮
+│ │ y │
+│ ├──────┬──────┬──────┬──────┬──────┤
+│ │ 1.00 │ 3.00 │ 4.00 │ 5.00 │ Total│
+├────────────────────────┼──────┼──────┼──────┼──────┼──────┤
+│x 1.00 Count │ 1│ 1│ 1│ 1│ 4│
+│ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
+│ Column Valid N %│ .0%│ .│ .0%│ .0%│ .│
+│ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
+│ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
+│ Row Valid N % │ .│ .│ .│ .│ .│
+│ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
+│ Valid N │ │ │ │ │ 0│
+│ Total N │ │ │ │ │ 6│
+│ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
+│ 2.00 Count │ 1│ 1│ 1│ 1│ 4│
+│ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
+│ Column Valid N %│ .0%│ .│ .0%│ .0%│ .│
+│ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
+│ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
+│ Row Valid N % │ .│ .│ .│ .│ .│
+│ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
+│ Valid N │ │ │ │ │ 0│
+│ Total N │ │ │ │ │ 6│
+│ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
+│ 3.00 Count │ 1│ 1│ 1│ 1│ 4│
+│ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
+│ Column Valid N %│ 50.0%│ .│ 50.0%│ 50.0%│ .│
+│ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
+│ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
+│ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
+│ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
+│ Valid N │ │ │ │ │ 3│
+│ Total N │ │ │ │ │ 6│
+│ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
+│ 4.00 Count │ 1│ 1│ 1│ 1│ 4│
+│ Column % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│ .│
+│ Column Valid N %│ 50.0%│ .│ 50.0%│ 50.0%│ .│
+│ Column Total N %│ 20.0%│ 20.0%│ 20.0%│ 20.0%│ .│
+│ Row % │ 25.0%│ 25.0%│ 25.0%│ 25.0%│100.0%│
+│ Row Valid N % │ 33.3%│ .0%│ 33.3%│ 33.3%│100.0%│
+│ Row Total N % │ 16.7%│ 16.7%│ 16.7%│ 16.7%│100.0%│
+│ Valid N │ │ │ │ │ 3│
+│ Total N │ │ │ │ │ 6│
+│ ╶──────────────────────┼──────┼──────┼──────┼──────┼──────┤
+│ Total Count │ 4│ 4│ 4│ 4│ 16│
+│ Column % │100.0%│100.0%│100.0%│100.0%│ .│
+│ Column Valid N %│100.0%│ .│100.0%│100.0%│ .│
+│ Column Total N %│100.0%│100.0%│100.0%│100.0%│ .│
+│ Row % │ .│ .│ .│ .│ .│
+│ Row Valid N % │ .│ .│ .│ .│ .│
+│ Row Total N % │ .│ .│ .│ .│ .│
+│ Valid N │ 2│ 0│ 2│ 2│ 6│
+│ Total N │ 5│ 5│ 5│ 5│ 30│
+╰────────────────────────┴──────┴──────┴──────┴──────┴──────╯
+])
+AT_CLEANUP
+
+AT_SETUP([CTABLES SMISSING=LISTWISE])
+AT_KEYWORDS([SMISSING LISTWISE])
+AT_DATA([ctables.sps],
+[[DATA LIST LIST NOTABLE/x y z.
+BEGIN DATA.
+1 . 40
+1 10 50
+1 20 60
+1 . .
+1 30 .
+END DATA.
+VARIABLE LEVEL x (NOMINAL).
+
+CTABLES /TABLE (y + z) > x.
+CTABLES /SMISSING LISTWISE /TABLE (y + z) > x.
+
+* The following doesn't come out as listwise because the tables are
+separate, not linked by an > operator.
+CTABLES /SMISSING LISTWISE /TABLE (y > x) + (z > x).
+]])
+AT_CHECK([pspp ctables.sps -O box=unicode -O width=120], [0], [dnl
+ Custom Tables
+╭────────┬─────╮
+│ │ Mean│
+├────────┼─────┤
+│y x 1.00│20.00│
+├────────┼─────┤
+│z x 1.00│50.00│
+╰────────┴─────╯
+
+ Custom Tables
+╭────────┬─────╮
+│ │ Mean│
+├────────┼─────┤
+│y x 1.00│15.00│
+├────────┼─────┤
+│z x 1.00│55.00│
+╰────────┴─────╯
+
+ Custom Tables
+╭────────┬─────╮
+│ │ Mean│
+├────────┼─────┤
+│y x 1.00│20.00│
+├────────┼─────┤
+│z x 1.00│50.00│
+╰────────┴─────╯
+])
+AT_CLEANUP