CTABLES: Don't force the look to include empty rows and columns.
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 17 Feb 2023 17:46:45 +0000 (09:46 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 17 Feb 2023 17:46:45 +0000 (09:46 -0800)
Frans Houweling said that it looked wrong, and I don't have a strong reason
to do it.

src/language/commands/ctables.c
tests/language/commands/ctables.at

index d25832b7e69949921fb84f9c3cd6f49f592206a3..e53a43023db32966031de4721df8f7f321452b72 100644 (file)
@@ -6014,7 +6014,6 @@ cmd_ctables (struct lexer *lexer, struct dataset *ds)
 
   struct pivot_table_look *look = pivot_table_look_unshare (
     pivot_table_look_ref (pivot_table_look_get_default ()));
-  look->omit_empty = false;
 
   struct ctables *ct = xmalloc (sizeof *ct);
   *ct = (struct ctables) {
index 22e1380a58582c74d286e1a09dffcfb659ef9ab0..7f15631d5b014f4a418f971031430a79f08b2adb 100644 (file)
@@ -1782,58 +1782,30 @@ AT_CHECK([pspp ctables.sps -O box=unicode -O width=80], [0], [dnl
 │                                                 │Male│Female│
 ├─────────────────────────────────────────────────┼────┼──────┤
 │QN1  Every day                   Count           │2305│  2362│
-│                                 Unweighted Count│    │      │
-│                                 Mean            │    │      │
 │    ╶────────────────────────────────────────────┼────┼──────┤
 │     Several days a week         Count           │ 440│   834│
-│                                 Unweighted Count│    │      │
-│                                 Mean            │    │      │
 │    ╶────────────────────────────────────────────┼────┼──────┤
 │     Once a week or less         Count           │ 125│   236│
-│                                 Unweighted Count│    │      │
-│                                 Mean            │    │      │
 │    ╶────────────────────────────────────────────┼────┼──────┤
 │     Only certain times a year   Count           │  58│    72│
-│                                 Unweighted Count│    │      │
-│                                 Mean            │    │      │
 │    ╶────────────────────────────────────────────┼────┼──────┤
 │     Never                       Count           │ 192│   348│
-│                                 Unweighted Count│    │      │
-│                                 Mean            │    │      │
 ├─────────────────────────────────────────────────┼────┼──────┤
-│qnd1 Count                                       │    │      │
-│    ╶────────────────────────────────────────────┼────┼──────┤
-│     Unweighted Count                            │    │      │
-│    ╶────────────────────────────────────────────┼────┼──────┤
-│     Mean                                        │  46│    50│
+│qnd1 Mean                                        │  46│    50│
 ├─────────────────────────────────────────────────┼────┼──────┤
-│QN17 OR, something else          Count           │    │      │
-│                                 Unweighted Count│   1│     1│
-│                                 Mean            │    │      │
+│QN17 OR, something else          Unweighted Count│   1│     1│
 │    ╶────────────────────────────────────────────┼────┼──────┤
-│     Beer                        Count           │    │      │
-│                                 Unweighted Count│ 817│   256│
-│                                 Mean            │    │      │
+│     Beer                        Unweighted Count│ 817│   256│
 │    ╶────────────────────────────────────────────┼────┼──────┤
-│     Light beer                  Count           │    │      │
-│                                 Unweighted Count│ 406│   214│
-│                                 Mean            │    │      │
+│     Light beer                  Unweighted Count│ 406│   214│
 │    ╶────────────────────────────────────────────┼────┼──────┤
-│     Wine                        Count           │    │      │
-│                                 Unweighted Count│ 390│  1028│
-│                                 Mean            │    │      │
+│     Wine                        Unweighted Count│ 390│  1028│
 │    ╶────────────────────────────────────────────┼────┼──────┤
-│     Wine coolers                Count           │    │      │
-│                                 Unweighted Count│  20│   117│
-│                                 Mean            │    │      │
+│     Wine coolers                Unweighted Count│  20│   117│
 │    ╶────────────────────────────────────────────┼────┼──────┤
-│     Hard liquor or mixed drinks Count           │    │      │
-│                                 Unweighted Count│ 392│   496│
-│                                 Mean            │    │      │
+│     Hard liquor or mixed drinks Unweighted Count│ 392│   496│
 │    ╶────────────────────────────────────────────┼────┼──────┤
-│     Flavored malt drinks        Count           │    │      │
-│                                 Unweighted Count│  20│    63│
-│                                 Mean            │    │      │
+│     Flavored malt drinks        Unweighted Count│  20│    63│
 ╰─────────────────────────────────────────────────┴────┴──────╯
 ])
 AT_CLEANUP