- int i;
- const int row_headers = 1;
- const int column_headers = 1;
- struct tab_table *table =
- tab_create (row_headers + otp->n_vars, column_headers + 7);
-
- tab_headers (table, row_headers, 0, column_headers, 0);
-
- tab_title (table, _("Runs Test"));
-
- /* Box around the table and vertical lines inside*/
- tab_box (table, TAL_2, TAL_2, -1, TAL_1,
- 0, 0, tab_nc (table) - 1, tab_nr (table) - 1 );
-
- tab_hline (table, TAL_2, 0, tab_nc (table) -1, column_headers);
- tab_vline (table, TAL_2, row_headers, 0, tab_nr (table) - 1);
-
- for (i = 0 ; i < otp->n_vars; ++i)
+ struct pivot_table *table = pivot_table_create (N_("Runs Test"));
+ pivot_table_set_weight_var (table, dict_get_weight (dict));
+
+ pivot_dimension_create (
+ table, PIVOT_AXIS_ROW, N_("Statistics"),
+ (rt->cp_mode == CP_CUSTOM ? N_("Test Value")
+ : rt->cp_mode == CP_MODE ? N_("Test Value (mode)")
+ : rt->cp_mode == CP_MEAN ? N_("Test Value (mean)")
+ : N_("Test Value (median)")), PIVOT_RC_OTHER,
+ N_("Cases < Test Value"), PIVOT_RC_COUNT,
+ N_("Cases ≥ Test Value"), PIVOT_RC_COUNT,
+ N_("Total Cases"), PIVOT_RC_COUNT,
+ N_("Number of Runs"), PIVOT_RC_INTEGER,
+ N_("Z"), PIVOT_RC_OTHER,
+ N_("Asymp. Sig. (2-tailed)"), PIVOT_RC_SIGNIFICANCE);
+
+ struct pivot_dimension *variables = pivot_dimension_create (
+ table, PIVOT_AXIS_COLUMN, N_("Variable"));
+
+ for (size_t i = 0 ; i < otp->n_vars; ++i)