/* PSPP - a program for statistical analysis.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
double maximum = -DBL_MAX;
double var;
struct moments1 *moments = moments1_create (MOMENT_VARIANCE);
- struct ccase c;
+ struct ccase *c;
const struct variable *v = *vv++;
struct casereader *pass;
pass = casereader_clone (input);
pass = casereader_create_filter_missing (pass,
&v, 1,
- filter, NULL);
+ filter, NULL, NULL);
pass = casereader_create_filter_weight (pass, dict, NULL, NULL);
- while (casereader_read(pass, &c))
+ while ((c = casereader_read (pass)) != NULL)
{
- double val = case_num (&c, v);
- double w = dict_get_case_weight (dict, &c, NULL);
+ double val = case_num (c, v);
+ double w = dict_get_case_weight (dict, c, NULL);
minimum = MIN (minimum, val);
maximum = MAX (maximum, val);
moments1_add (moments, val, w);
- case_destroy (&c);
+ case_unref (c);
}
casereader_destroy (pass);
}
-void
-do_summary_box (const struct descriptives *desc,
- const struct variable *const *vv,
- int n_vars);
-
void
do_summary_box (const struct descriptives *desc,
table = tab_create (columns, 2 + n_vars, 0);
- tab_dim (table, tab_natural_dimensions);
+ tab_dim (table, tab_natural_dimensions, NULL);
tab_title (table, _("Descriptive Statistics"));