{N_("Minimum"), "MIN", NULL , min_create, min_update, min_get, simple_destroy},
{N_("Maximum"), "MAX", NULL , max_create, max_update, max_get, simple_destroy},
{N_("Range"), "RANGE", NULL , range_create, range_update, range_get, simple_destroy},
- {N_("Variance"), "VARIANCE", NULL , default_create, default_update, variance_get, default_destroy},
- {N_("Kurtosis"), "KURT", NULL , default_create, default_update, kurt_get, default_destroy},
- {N_("S.E. Kurt"), "SEKURT", NULL , default_create, default_update, sekurt_get, default_destroy},
- {N_("Skewness"), "SKEW", NULL , default_create, default_update, skew_get, default_destroy},
- {N_("S.E. Skew"), "SESKEW", NULL , default_create, default_update, seskew_get, default_destroy},
+ {N_("Variance"), "VARIANCE", PIVOT_RC_OTHER, default_create, default_update, variance_get, default_destroy},
+ {N_("Kurtosis"), "KURT", PIVOT_RC_OTHER, default_create, default_update, kurt_get, default_destroy},
+ {N_("S.E. Kurt"), "SEKURT", PIVOT_RC_OTHER, default_create, default_update, sekurt_get, default_destroy},
+ {N_("Skewness"), "SKEW", PIVOT_RC_OTHER, default_create, default_update, skew_get, default_destroy},
+ {N_("S.E. Skew"), "SESKEW", PIVOT_RC_OTHER, default_create, default_update, seskew_get, default_destroy},
{N_("First"), "FIRST", NULL , first_create, first_update, first_get, simple_destroy},
{N_("Last"), "LAST", NULL , last_create, last_update, last_get, simple_destroy},
#if 0
ds_init_empty (&dss);
for (int dv = 0; dv < mt->n_dep_vars; ++dv)
{
- ds_put_cstr (&dss, var_get_name (mt->dep_vars[dv]));
- if (mt->n_layers > 0)
+ if (dv > 0)
ds_put_cstr (&dss, " * ");
+ ds_put_cstr (&dss, var_get_name (mt->dep_vars[dv]));
}
for (int l = 0; l < mt->n_layers; ++l)
{
+ ds_put_cstr (&dss, " * ");
const struct layer *layer = mt->layers[l];
const struct variable *var = layer->factor_vars[ws->control_idx[l]];
ds_put_cstr (&dss, var_get_name (var));
- if (l < mt->n_layers - 1)
- ds_put_cstr (&dss, " * ");
}
struct pivot_table *pt = pivot_table_create (ds_cstr (&dss));
AT_CLEANUP
+dnl Test the output with unusual dependent variable formats
+AT_SETUP([MEANS formats])
+AT_KEYWORDS([categorical categoricals])
+
+AT_DATA([means-formats.sps], [dnl
+data list notable list /hours (TIME11.0) rate (DOLLAR8.2).
+begin data
+12:00 4.09
+14:01 5.23
+end data.
+
+means hours rate
+ /cells = mean count max range.
+])
+
+AT_CHECK([pspp -O format=csv means-formats.sps], [0], [dnl
+Table: Case Processing Summary
+,Cases,,,,,
+,Included,,Excluded,,Total,
+,N,Percent,N,Percent,N,Percent
+hours,2,100.0%,0,.0%,2,100.0%
+rate,2,100.0%,0,.0%,2,100.0%
+
+Table: hours * rate
+,hours,rate
+Mean,13:00:30,$4.66
+N,2,2
+Maximum,14:01:00,$5.23
+Range,02:01:00,$1.14
+])
+
+AT_CLEANUP
+
+