/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2008, 2009, 2010 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
dict_set_documents (agr.dict, dict_get_documents (dict));
/* OUTFILE subcommand must be first. */
+ lex_match (lexer, '/');
if (!lex_force_match_id (lexer, "OUTFILE"))
goto error;
lex_match (lexer, '=');
agr.break_var_cnt = subcase_get_n_fields (&agr.sort);
for (i = 0; i < agr.break_var_cnt; i++)
- dict_clone_var_assert (agr.dict, agr.break_vars[i],
- var_get_name (agr.break_vars[i]));
+ dict_clone_var_assert (agr.dict, agr.break_vars[i]);
/* BREAK must follow the options. */
break;
}
if (function->alpha_type == VAL_STRING)
- destvar = dict_clone_var (agr->dict, v->src, dest[i]);
+ destvar = dict_clone_var_as (agr->dict, v->src, dest[i]);
else
{
assert (var_is_numeric (v->src)
case MEDIAN:
{
struct casereader *sorted_reader;
- struct order_stats *median = percentile_create (0.5, i->cc);
+ struct percentile *median = percentile_create (0.5, i->cc);
+ struct order_stats *os = &median->parent;
sorted_reader = casewriter_make_reader (i->writer);
- order_stats_accumulate (&median, 1,
+ order_stats_accumulate (&os, 1,
sorted_reader,
i->weight,
i->subject,
i->exclude);
- v->f = percentile_calculate ((struct percentile *) median,
- PC_HAVERAGE);
+ v->f = percentile_calculate (median, PC_HAVERAGE);
- statistic_destroy ((struct statistic *) median);
+ statistic_destroy (&median->parent.parent);
}
break;
case SD: