From e3093c8acfdde7bbd1846d307d33d27a3eba69e4 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 11 Nov 2021 19:48:36 -0800 Subject: [PATCH] more improvement --- src/language/stats/matrix.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/language/stats/matrix.c b/src/language/stats/matrix.c index 8eb029b7ba..8445e64ac3 100644 --- a/src/language/stats/matrix.c +++ b/src/language/stats/matrix.c @@ -6317,14 +6317,16 @@ matrix_mget_commit_var (struct ccase **rows, size_t n_rows, for (size_t j = 0; j < sn; j++) { struct variable *var = dict_get_var (d, ss + j); + const union value *value = case_data (rows[0], var); pivot_table_put2 (pt, j, var_index, - pivot_value_new_number (case_num (rows[0], var))); + pivot_value_new_var_value (var, value)); } for (size_t j = 0; j < fn; j++) { struct variable *var = dict_get_var (d, fs + j); + const union value *value = case_data (rows[0], var); pivot_table_put2 (pt, j + sn, var_index, - pivot_value_new_number (case_num (rows[0], var))); + pivot_value_new_var_value (var, value)); } for (size_t j = 0; j < sizeof values / sizeof *values; j++) pivot_table_put2 (pt, j + sn + fn, var_index, -- 2.30.2