From: Ben Pfaff Date: Sat, 13 Aug 2022 22:44:02 +0000 (-0700) Subject: SUBTABLE works (I'm suspicous about ROW though) X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=5327d77be2296f6be3f532c20456eab839dc7c62 SUBTABLE works (I'm suspicous about ROW though) --- diff --git a/src/language/stats/ctables.c b/src/language/stats/ctables.c index 836a974d82..341e68e0d9 100644 --- a/src/language/stats/ctables.c +++ b/src/language/stats/ctables.c @@ -4689,6 +4689,17 @@ ctables_prepare_table (struct ctables_table *t) } } + if (at == CTAT_SUBTABLE && t->label_axis[PIVOT_AXIS_ROW] == PIVOT_AXIS_COLUMN) + { + size_t n_drop = (a == PIVOT_AXIS_LAYER ? 0 + : a == PIVOT_AXIS_ROW ? 2 + : 0); + for (size_t i = 0; i < n_drop; i++) + if (nest->n_areas[at] > 0) + nest->n_areas[at]--; + continue; + } + bool drop_last = (at == CTAT_SUBTABLE ? a != PIVOT_AXIS_LAYER : at == CTAT_ROW ? a == PIVOT_AXIS_COLUMN : at == CTAT_COL ? a == PIVOT_AXIS_ROW