case: Introduce new functions for numbers and substrings in cases.
[pspp] / src / language / stats / kruskal-wallis.c
index 61a05061fdf1a49a2c383299dfab3cf86074d2bc..62c49e48482cd05b5b0d09d7e0f5f231b4a6a4c8 100644 (file)
@@ -137,7 +137,7 @@ kruskal_wallis_execute (const struct dataset *ds,
 
   int total_n_groups = 0.0;
 
-  struct kw *kw = xcalloc (nst->n_vars, sizeof *kw);
+  struct kw *kw = XCALLOC (nst->n_vars,  struct kw);
 
   /* If the independent variable is missing, then we ignore the case */
   input = casereader_create_filter_missing (input,
@@ -192,7 +192,7 @@ kruskal_wallis_execute (const struct dataset *ds,
                           value_hash (&rank->group, group_var_width, 0));
            }
 
-         rank->sum_of_ranks += case_data_idx (c, rank_idx)->f;
+         rank->sum_of_ranks += case_num_idx (c, rank_idx);
          rank->n += dict_get_case_weight (dict, c, &warn);
 
          /* If this assertion fires, then either the data wasn't sorted or some other