/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.
-*CTABLES /TABLE x BY y /CATEGORIES VARIABLES=ALL MISSING=INCLUDE.
-*CTABLES /TABLE y BY x /CATEGORIES VARIABLES=ALL 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
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
\ No newline at end of file