categoricals_create (struct interaction *const *inter, size_t n_inter,
const struct variable *wv, enum mv_class fctr_excl)
{
- struct categoricals *cat = xzalloc (sizeof *cat);
+ struct categoricals *cat = XZALLOC (struct categoricals);
cat->iap = pool_calloc (cat->pool, n_inter, sizeof *cat->iap);
cat->n_iap = n_inter;
cat->wv = wv;
assert (!cat->cat_to_iact);
double weight;
- weight = cat->wv ? case_data (c, cat->wv)->f : 1.0;
+ weight = cat->wv ? case_num (c, cat->wv) : 1.0;
weight = var_force_valid_weight (cat->wv, weight, NULL);
/* Update the frequency table for each variable. */